Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[ANY] Map Rewards (v0.159, 12/17/18)


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
  • Disclaimer
    Quote:

    This plugin has some very sensitive syntax, but I have tried to make it intuitive.
    The version number reflects the exact number of times this plugin has been built,
    until a completely bug free version is reached, this will stay below v1.0.
    In its current state, because of the extreme number of features, a few of them may
    have yet to be tested. I have tried to include numerous features so everyone can be
    happy with this plugin.

    Map Rewards is released without warranty of any kind. Damage of any sort that is
    caused by this plugin or misuse of this plugin including, but not limited to, failure
    to follow provided instructions or syntax will be at the direct cost of the end user.
    That being said, the only sort of damage that I really see occurring is either temporary until the map is reset, or caused by providing a not normal path to the sm_mrw_cfg_delete command, causing unwanted files to be deleted.

  • Description
    Map Rewards allows you to create custom entities around the map. In theory, you are free to customize these entities to the full extent that Hammer/Source SDK allows.
    These entities are also able to detect when touched by a player and run a defined command on the server. This command can contain #player in the defintion to use the touching player as targets.
    Also provided with Map Rewards are two seemingly unrelated commands, sm_exec2 and sm_teleplus, they are included because these types of commands are commonly used as the reward for the entities.

  • Cvars
    Quote:

    sm_mrw_version      - Plugin version
    sm_mrw_enable       - (Default: 1.0) - If disabled (0.0), rewards will not be spawned. However, they can be added, and obtained if they already exist.
    sm_mrw_respawn_time - (Default: 5.0) - Default seconds until a reward will respawn.
    sm_mrw_cleanup      - (Default: 8)   - When to release and kill all rewards. OR desired values together:
       0  = never
       1  = plugin end
       2  = map start
       4  = round start
       8  = before auto loading
       16 = before every manual load (through sm_mrw_cfg_load)
       Internally, at round start all rewards are killed and respawned. At plugin end and map start all rewards are killed and released.
    sm_mrw_autoload     - (Default: 2)   - When to auto load map or server cfg saves. OR desired values together:
       0  = never
       1  = map start (maprewards/server.cfg)
       2  = map start (maprewards/<map>.cfg)
       4  = round start (maprewards/<map>.cfg)
    sm_mrw_autosave     - (Default: 0)   - When to auto save map cfg. OR desired values together:
       0  = never
       1  = plugin end
       2  = map start (basically map end; internal data is still intact until cleanup)
       4  = round start (basically round end)
       8  = before cleaning up
       16 = save every edit/addition that's not from the server
       32 = save all removals of rewards
       64 = always backup first (format for backup files: "cfg/maprewards/backup/<map>.cfg.<time>)
    When setting values for the last three Cvars, simply add all the values you want together, so if you wanted to autoload on both map starts you would add 1 and 2 together to get 3.

  • Commands
    The following is a whole bunch of technical information that you probably won't understand until you are actually using it, skip to the next section for examples and demonstrations.
    Quote:

    sm_mrw_info          - ADMFLAG_SLAY - Displays info about a specific reward spawn point.
       Usage: sm_mrw_info <#id|name>
       You may need to run this command from your game console to see the full response.
    sm_mrw_add           - ADMFLAG_RCON - Sets a spawn point on the map for a reward.
       Usage: sm_mrw_add [OPTIONS ...] [command ...]
       At least model or entity_type is required.
           If entity_type is prop_physics_override, both are required.
       command is a full command to run when a player touches the reward.
           If present, #player will be replaced with the target string of the client who activated the reward.
       OPTIONS:
           -h   Display this help text.
           -b <#reward_id|name>
              Uses the provided reward as a base to copy data from.
              This switch should appear before anything else as it overwrites all the data.
              The origin coordinates will be set to this reward unless the origin is set.
           -c <X Y Z>
              Coordinates to spawn the entity at, can be relative to origin using ~'s.
              If not provided, origin will be used.
           -d <respawn_method>
              Must be one of the following:
              pickup: When a player touches it, it will disappear until the respawn time is up.
              static: The reward will stay, but will be inactive until the respawn time is up.
              constant: The reward will stay and never deactivate.
              nohook or nopickup: Default. Just an entity, nothing special about it.
           -e <entity_type>
              The type of entity you wish to create. If not provided, prop_physics_override is used.
              You may use model aliases defined with sm_mrw_model_add.
           -m <model>
              The path to the model file you wish to use.
              You may use model aliases defined with sm_mrw_model_add.
           -n <name>
              Allows you to define a name for the entity, which can be later used when referring to this reward.
              If not defined, the name will default to its corresponding ID number.
           -o <X Y Z>
              Origin coordinates. If not provided client's location will be used.
           -O <#userid|name>
              Set the origin coordinates to a player's location.
           -D <#reward_id|name>
              Set the origin coordinates to a reward's location.
           -p <entity_property_script>
              Allows you to define a series of entity properties using this format:
                 [prop_type:]key,[type=]value
                 prop_type must be 0 for Prop_Data (default) or 1 for Prop_Send.
                 type may be one of the following: int float string ent or vec.
                    For vec, value must be a series of 3 floats seperated by commas.
                 Multiple key,value pairs can be seperated by &'s.
                 Please do not set m_iName here. Use the -n switch to set a name.
              You may use script aliases defined with sm_mrw_script_add.
           -r <RX RY RZ>
              Rotations for the entity. Cannot be relative.
           -s <script>
              A series of variables dispatched to the entity as an overridescript or individual keys to trigger.
              A value of null will erase the script defined by a provided model alias.
              Format:
                 overridescript?key[,[type=]value]
                 type may be one of the following: int float or string.
                 Multiple key[,value]'s can be seperated on the right side of the ? by &'s.
              You may use script aliases defined with sm_mrw_script_add.
           -t <respawn_time>
                 The fractional seconds until the reward respawns.
                 A value of 0 will never respawn.
                 A value of -1 will use the value of sm_mrw_respawn_time.
           -T <SX SY SZ interval>
              Set the reward to rotate every interval.
              interval is in fractional seconds.
           -P   Sets respawn_method to pickup.
           -S   Sets respawn_method to static.
           -C   Sets respawn_method to constant.
           -R   Automatically release the reward from the plugin imediately after spawning it.
    sm_mrw_modify        - ADMFLAG_RCON - Modify a reward spawn point.
       Usage: sm_mrw_modify <#reward_id|name> [OPTIONS ...] [command ...]
       OPTIONS is exactly the same as sm_mrw_add with the following exceptions:
           -o - Origin coordinates default to the reward's if not specified.
           -r - Rotation angles can now be relative.
           -h - No help switch, because it breaks the flow of this command.
       Use sm_mrw_add -h for a detailed paragraph about the OPTIONS.
       If any combination of options that result in a conflict are used, an error explaining why that specific option could not be set will be displayed. Other options will still be applied.
       If any multi-argument options are missing arguments, the command will stop where the error occured. This might cause undefined behaviour, and you will need to manually sm_mrw_respawn the reward.
    sm_mrw_remove        - ADMFLAG_SLAY - Removes a reward on the map (starting with 0, not 1).
       Usage: sm_mrw_remove <#id|name>
    sm_mrw_removeall     - ADMFLAG_SLAY - Removes all rewards on the map.
       Usage: sm_mrw_removeall
    sm_mrw_model_reload  - ADMFLAG_SLAY - Reloads 'cfg/maprewards/aliases.cfg'.
       Usage: sm_mrw_model_reload
    sm_mrw_model_add     - ADMFLAG_SLAY - Adds a model alias. Does not save.
       Usage: sm_mrw_model_add <name> <model> [entity_type] [overridescript] [entity_properties]
       "null" or "0" can be provided for any argument you want to ignore.
       If you are using an entity_type that does not need a model, use "null" for model.
       See sm_mrw_add -h under -s and -p for overridescript and entity_properies format.
    sm_mrw_model_save    - ADMFLAG_SLAY - Saves the current model aliases to 'cfg/maprewards/aliases.cfg'.
       Usage: sm_mrw_model_save
    sm_mrw_model_list    - ADMFLAG_SLAY - Lists all current model aliases.
       Usage: sm_mrw_model_list
    sm_mrw_script_reload - ADMFLAG_SLAY - Reloads 'cfg/maprewards/scripts.cfg'.
       Usage: sm_mrw_script_reload
    sm_mrw_script_add    - ADMFLAG_SLAY - Adds a script alias. Does not save.
       Usage: sm_mrw_script_add <name> <script>
       script can be either an overridescript or entity_properties_script, but not both, when using, you will need to know which it is.
    sm_mrw_script_save   - ADMFLAG_SLAY - Saves the current scripts to 'cfg/maprewards/scripts.cfg'.
       Usage: sm_mrw_script_save
    sm_mrw_script_list   - ADMFLAG_SLAY - Lists all current scripts.
       Usage: sm_mrw_script_list
    sm_mrw_cfg_save      - ADMFLAG_SLAY - Saves current reward spawn points to a cfg file for later reuse.
       Usage: sm_mrw_cfg_save [OPTIONS ...] <file.cfg>
       file.cfg is the cfg file to save to. It will be stored within "cfg/maprewards/".
       OPTIONS:
           -E <reward_id|name>
              Exclude reward_id from the cfg.
              Allows a range: #..#, ..#, or #..
              Ranges do not accept reward names, only their ID numbers.
              Multiple -E switches are accepted.
           -o <X Y Z>
              Set the origin coordinates. Only used if the -R switch is also set.
              The origin will default to your location (or 0,0,0 for the server) unless this option is present.
              Relative coordinates can be used to offset from your current coordinates.
           -O <#userid|name>
              Set the origin coordinates to a player's location.
              May be used in conjunction with -o to offset from a player as long as -O is provided first.
           -D <#reward_id|name>
              Set the origin coordinates to a reward's location.
           -R
              Save the rewards with coordinates relative to the origin.
              If this switch is not present, the -o, -O, and -D switches will be ignored.
    sm_mrw_cfg_load      - ADMFLAG_SLAY - Loads a saved maprewards cfg file.
       Usage: sm_mrw_cfg_load [OPTIONS ...] <file.cfg>
       file.cfg is the name of a previously saved cfg file stored within "cfg/maprewards/".
       OPTIONS:
           -o <X Y Z>
              Set the origin coordinates. Only used for rewards in the cfg that were saved with relative coordinates.
              The origin will default to your location (or 0,0,0 for the server) unless this option is present.
              Relative coordinates can be used to offset from your current coordinates.
           -O <#userid|name>
              Set the origin coordinates to a player's location.
              May be used in conjunction with -o to offset from a player as long as -O is provided first.
           -D <#reward_id|name>
              Set the origin coordinates to a reward's location.
    sm_mrw_cfg_list      - ADMFLAG_SLAY - Lists all saved maprewards cfg files.
       Usage: sm_mrw_cfg_list [directory] - directory starts in 'cfg/maprewards/'.
       If directory is not provided the contents of "cfg/maprewards/" are listed.
    sm_mrw_cfg_delete    - ADMFLAG_ROOT - Deletes a saved maprewards cfg file.
       Usage: sm_mrw_cfg_delete <cfg_file> - Path starts in 'cfg/maprewards/'.
       Caution: using '..' may allow the deletion of unwanted files!
    sm_mrw_cfg_purge     - ADMFLAG_ROOT - Deletes all auto-save backup maprewards cfg files.
       Usage: sm_mrw_cfg_purge
    sm_mrw_tp            - ADMFLAG_SLAY - Teleports you to the provided reward.
       Usage: sm_mrw_tp <#id|name> [#userid|name] [X Y Z] [RX RY RZ] [VX VY VZ]
       If a target is provided, they will be teleported instead.
       Coordinates, angles, and velocity can be relative to the reward using "~".
    sm_mrw_move          - ADMFLAG_SLAY - Relatively moves a reward.
       Usage: sm_mrw_move <#id|name> <X Y Z>
    sm_mrw_turn          - ADMFLAG_SLAY - Relatively rotates a reward.
       Usage: sm_mrw_turn <#id|name> <RX RY RZ>
    sm_mrw_copy          - ADMFLAG_SLAY - Creates an exact copy of a reward at the provided position.
       Usage: sm_mrw_copy <#id|name> <X Y Z> [RX RY RZ] [new_name] [new_script]
    sm_mrw_copy_here     - ADMFLAG_SLAY - Creates an exact copy of a reward at your position.
       Usage: sm_mrw_copy_here <#id|name> [new_name] [new_script]
    sm_mrw_release       - ADMFLAG_SLAY - Releases a reward from local memory. WARNING YOU WILL NOT BE ABLE TO ALTER OR SAVE ANY RELEASED ENTITIES.
       Usage: sm_mrw_release <#id|name>
    sm_mrw_kill          - ADMFLAG_SLAY - Kills an entity by its edict ID. To be used with entities after releasing them.
       Usage: sm_mrw_kill <#entity_id>
    sm_mrw_respawn       - ADMFLAG_SLAY - Respawn or reactivate a reward early.
       Usage: sm_mrw_respawn <#id|name>
    sm_exec2             - ADMFLAG_SLAY - Executes a cfg file provided as the second argument. Accepts a first argument, but is ignored unless the third argument is '0'. If the third argument is anything else, it will be used instead of the player's name. Any additional arguments will be used instead of the default message. If only two arguments are provided, no message will be sent.
       Usage: sm_exec2 <#userid|name> <cfg_file> [custom_name] [message ...]
       Executes cfg_file as the server.
       If custom_name is 0, the message "has earned a reward!" will follow the username of the target.
       If message is provided, it will be used instead.
       If custom_name is set to anything other than 0, it will be used intead of the username.
    sm_teleplus          - ADMFLAG_SLAY - Teleport a player to a set of coordinates with optional rotation and velocity. Relative coords, angles, and velocity are allowed.
       Usage: sm_teleplus <#userid|name> <X Y Z> [RX RY RZ] [VX VY VZ]
       Relative arguments should be preceeded with a "~".
    There is also a sm_mrw_add_custom command. It was one of several commands from a much older version (the others have been completely scrapped). It is only included for legacy support (even though there was no official release with that command to begin with). Just don't use this command. It was before I introduced the OPTION switches. In the loading/saving demonstration video below, "da_haus" is loaded as a legacy save, because of this, there are two entities in the house that do not have hooks which are supposed to. The piano is supposed to kill you when you touch it and the sandvich is supposed to regenerate you. The legacy command can only do so much, because so many more features have been introduced since then.

  • Demonstrations
    Fun rotations: https://streamable.com/8z512
    Example of a full map with rewards spawned all throughout: https://streamable.com/w87q5
    Example of loading/saving configs and relatively loading them too: https://streamable.com/xv22x

  • Example Usage
    If you wanted to spawn an ambulance at your current position that spins horizontally and gives a player godmode when they touch it, you could use this command:
    Code:

    sm_mrw_add -n god -m models/ambulance.mdl -s ?DisableMotion&DisableShadow -T 0 0.5 0 0.1 -P -t 10.0 sm_godmode #player
    -n god sets the name of the entity to "god". You can now use "god" in any command that asks for a reward ID.
    -m models/ambulance.mdl defines the model of the entity to "models/ambulance.mdl".
    -s ?DisableMotion&DisableShadow defines a script that will disable motion and shadows on the entity. If you are using the provided scripts.cfg, you can simply use -s np.
    -T 0 0.5 0 0.1 sets the entity up to rotate 0.5 degrees on the Y axis every 0.1 seconds. Intervals will be rounded up to the nearest tenth of a second by sourcemod internally.
    -P sets the entity in "pickup" mode. This means when a player touches it, the command will run, and the entity will disappear. You can also use -d pickup instead.
    -t 10.0 set the respawn time after the entity is picked up until it comes back to 10.0 seconds. If this option is missing, the value of the sm_mrw_respawn_time cvar will be used.
    sm_godmode #player is the command to run when the entity is picked up. #player will be replaced with the ID of the player who picked up the reward.
    Since -e was absent from the command, the entity_type defaults to prop_physics_override.
    Now let's say you wanted to move this same reward 100 units upward:
    Code:

    sm_mrw_modify god -c ~ ~ ~100
    or
    Code:

    sm_mrw_move god 0 0 100
    Both of these commands will do the exact same thing.
    One reason you may want to use sm_mrw_modify instead is if you were moving the entity to a specific set of coordinates.
    Another reason would be if you wanted to set any additional data at the same time.

    If you did not specify a name when originally adding the reward, you can use its ID # instead. When adding, the command will respond with the ID #.

    Now if you wanted to spawn a simple shipping crate at a specific set of coordinates with rotation that did not run a command or anything when a player touches it:
    Code:

    sm_mrw_add -n crate -m models/props_wasteland/cargo_container01.mdl -c 200 100 250 -r 0 70 50 -d nohook -s np
    I'll only cover new options here.
    -c 200 100 250 sets the coordinates of the entity to be 200,100,250.
    -r 0 70 50 gives the entity a rotation of 70 degrees horizontally on the Y axis, and 50 degrees vertically on the Z axis.
    -d nohook sets the reward to not have any kind of touch event. This is default behavior and not required.
    -s np is the script alias for "?DisableMotion&DisableShadow". It is defined in the provided scripts.cfg file.

    Now if you wanted to spawn a chinese takeout box 110 units above the crate (roughly the height to make the box appear as it is sitting on the crate):
    Code:

    sm_mrw_add -n takeout -D crate -c ~ ~ ~100 -m takeout -r 0 0 50
    -D crate sets the origin coordinates to that of the "crate" reward.
    -m takeout is the model alias for "models/props_junk/garbage_takeoutcarton001a.mdl". It is defined in the provided aliases.cfg file.
    Notice we are not providing a script for this reward. It will have normal physics properties and be movable when hit.
    We also are not defining a [/B]respawn_method[/B] so it will default to "nohook".
    If you want to kill off the old entity and respawn it, incase it gets moved too far away or something, you can use sm_mrw_respawn takeout.

    To spawn a reward that is not a prop_physics_override, you can set what type it is with -e:
    Code:

    sm_mrw_add -n pump -e tf_pumpkin_bomb
    Because it is not a prop_physics_override, we do not need to set a model.
    The only problem with this command is that tf_pumpkin_bomb's explode when hit. This means maprewards will not be able to make it respawn normally, and you will have to manually sm_mrw_respawn it.

    To remove all rewards except for the first five, you can use this command:
    Code:

    sm_mrw_remove 5..
    This will ignore 0-4.
    You can also do #..# or #..
    Ranges are always inclusive.

  • About the CFG files
    The .cfg files that the sm_mrw_cfg_save command creates are actual server cfg files. They can be executed with the exec command to load them.
    If you load the same file twice without removing the rewards inbetween, there will be two copies in each place, unless they are named.
    Rewards with names will fail to load if one already exists with the same name.
    You can modify these files to include other commands as well. Even if using the sm_mrw_cfg_load command with non generated cfg files will succeed, and it will know which commands are from itself. It will still run the other commands too though.
    When generating the cfg file, the most minimal/efficient command configuration to create the same entity will be used, this may create commands that differ from the original.
    Except when it comes to scripts and aliases. These will always be fully evaluated. In the case that the configuration changes, the entities will not.

    If sm_mrw_autoload has is enabled for map start (server.cfg) (OR'd with 1) then when a map loads, the file "cfg/maprewards/server.cfg" is loaded if it exists. It is just passed to the exec command, so any kind of commands can be here. I'm really not quite sure why I added this feature...

    If auto loading is enabled for map start (map.cfg) (OR'd with 2) then when a map loads, the file corresponding to that map within "cfg/maprewards/" with a .cfg extension, will be loaded if it exists. For example: ctf_2fort will be "cfg/maprewards/ctf_2fort.cfg".

    To make a file load automatically for ctf_2fort, you can use the sm_mrw_cfg_save ctf_2fort.cfg command. This will save all current rewards to the file. You also need to make sure sm_mrw_autoload is either set to 2 or can be &'d by 2.

    When saving, you can use the -E switch as many times as you want to exclude certain rewards or ranges of ID's of rewards. Ranges are always inclusive.

  • About the different respawn_methods
    There are four different types of rewards you can spawn.
    nohook or nopickup is the default if not specified and doesn't setup any kind of hooks when a player touches them, it cannot ever run a command. It may contain a command though, incase you want to activate/deactivate it by changing its type with the sm_mrw_modify command.
    pickup acts similar to health or ammo pickups around the map. When a player touches them, or picks them up, they will disappear until the specified (or default sm_mrw_respawn_time if not specified) amount of time has passed, then it will repsawn.
    static similar to pickup except the entity will not disappear. Instead, it will be inactive until the respawn time has passed.
    constant will never disappear, while a player is touching it, the command will run constantly. Useful with sm_teleplus commands.

  • About sm_exec2 and sm_teleplus
    These two commands are useful to use as the commands for rewards when you want to execute more than one command, teleport/rotate a player, or give them a speed boost.

    Usage for both of these commands is described in detail above.

    Here are a few examples used in video #2 above:
    Code:

    sm_exec2 #player freedom 0 has eaten the Freedom Pretzel!
    This is the exact command used on the pretzel. It executes "cfg/freedom.cfg" and displays the message: "#player has eaten the Freedom Pretzel!".
    Code:

    sm_exec2 #player grapple_on 0 has raided Batman's grappling hook stash!
    This is the command used on the ambulance (Bat Mobile). It executes "cfg/grapple_on.cfg" and displays the message: "#player has raided Batman ' s grappling hook stash!".
    Because of how sourcemod processes argument input, I've yet to fix the extra spaces around the single quote :(
    Code:

    sm_exec2 notused grapple_off Batman has recovered his stolen grappling hooks!
    This command isn't shown in the video, but inside of the grapple_on.cfg file, there is a command that schedules that command to run after 15 minutes.
    When it runs that command, it executes "cfg/grapple_off.cfg" and displays the message "Batman has recovered his stolen grappling hooks!".

    Code:

    sm_teleplus #player ~ ~ ~ ~ ~ ~ ~1000 ~ ~
    This is the command that is used on the two red crates above spawn in video #2 that create a sort of player cannon. It keeps the player's coordinates and angles, but adds 1000 to their X velocity.
    Code:

    sm_teleplus #player ~ ~ ~ ~ ~ ~ ~ ~ ~9999
    This is the command used on the dome at the end of video #2 that launches the player up high into the air. Like the previous command, keeps the player's coords and angles, but adds 9999 to their Z velocity.
    Code:

    sm_teleplus #player -14085 0 -7095 ~ ~ ~ 0 0 ~-9999
    This is the command used on the spy target from video #2 that teleports the player to the bottom of the end and makes the screen shake. The coordinates are set to specifically, the angles are kept intact, the X and Y velocity is set to 0, and their Z velocity is decreased by 9999 shooting them directly downward.
    Code:

    sm_mrw_add -c -9565.000000 0.000000 2820.000000 -r 0.000000 180.000000 0.000000 -m models/props_2fort/sink001.mdl -s ?DisableMotion&DisableShadow -P -t 1.00 sm_teleplus #player ~ ~ ~ ~ ~ ~ ~-3500 ~ ~150
    This one I'm showing the full command, to show how to properly add horizontal momentum without friction coming into play.
    The respawn_mode for this reward is pickup with a 1 second delay before respawning. This gives the player enough time to be launched away before coming back and either being inside the player, or applying friction. The teleplus command simply adds 3500 units of velocity to their negative X and adds 150 to their Z acting as an almost half jump upward.

  • About models
    Anywhere a model is accepted is expecting the full path to the model file, including extension. This can be anywhere the game looks for models, meaning in the base game or the current mod. You can also use custom models as well.

    Provided in the package is an aliases.cfg file of a couple handfuls of models I have found that work in TF2. Most are probably not limited to TF2 though.

  • About scripts, overridescript and entity_property_script
    An overridescript is a series of variables dispatched to the entity as an overridescript or individual keys to trigger.
    Format:
       overridescript?key[,[type=]value]
       type may be one of the following: int float or string.
       Multiple key[,value]'s can be seperated on the right side of the ? by &'s.
    On the left side of the ? is all one string sent to the entity as a overridescript, this can often simplify a series of key dispatches in one go.
    For all other key,value dispatching, you may provide individual ones on the right hand side of the ?. Only the first found ? is evaluated, so if you need to send one in a key,value pair, this will be fine as long as it appears after the initial ?.
    If you need to dispatch a key that does not have a value (accept entity input), simply do not include a , (comma).

    An entity_property_script allows you to define a series of entity properties.
    Format:
       [prop_type:]key,[type=]value
       prop_type must be 0 for Prop_Data (default) or 1 for Prop_Send.
       type may be one of the following: int float string ent or vec.
          For vec, value must be a series of 3 floats seperated by commas.
       Multiple key,value pairs can be seperated by &'s.
       Please do not set m_iName here. Use the -n switch to set a name.
    This format is exactly the same as the right side of the ? for an [/B]overridescript[/B].
    The difference is that these key,value pairs are sent using a different method, SetEntProp[type].
    The reason for not setting m_iName here is because internally, the plugin will always set a name (whether one was provided or not), to ensure the correct entity was found when killing. If you set it here, the plugin will never be able to locate the entity.

    I am not very familiar with Hammer/Source SDK, but I believe this allows you to set just about every piece of data any entity may ever need.

    Provided in the package is a scripts.cfg file with a couple of scripts to get you started.
    np short for "no physics" disables all physics and shadows for the entity. Shadows tend to cause more lag when you have a lot of them, so for constant map-like entities or structures, this script should be used.
    dreidel gives the entity sort of "dreidel" like physics, it will spin like a top when hit and is fairly difficult to move in any given direction.

  • Dependencies
    This plugin only has two include dependencies. colors.inc and strplus.inc.
    colors.inc is written by exvel and can be obtained here: https://forums.alliedmods.net/showthread.php?t=96831
    strplus.inc is my own string manipulation library based on C++ STL strings, so it is bundled in the package.

  • Installation
    Simply extract the package to the top of your mod's folder. The plugin binary as well as source is included. No real configuration is necessary, but you are urged to go over the Cvars and set any desired changes in your cfg/server.cfg file.

  • Changelog
    Quote:

    0.159 - 12/17/18
    Initial Release
  • Todo
    • Add an option to sm_mrw_tp to teleport to the entity's current coordinates instead of its spawn coordinates.
    • Add an -E switch for sm_mrw_cfg_load that does the same thing as save.

  • Additional notes
    As of writing this, there are no known bugs. There are, however, somewhat unseemly effects with the Cvars.
    For example, if you want to cleanup on round start, you better auto load on round start too.
    Even though there aren't any known bugs, there will surely be some changes soon.
    I don't like releasing anything until I am completely happy with it, but being completely happy with this plugin required additions that I did not need. So some of those things have yet to be tested to an extent I am satisfied with and therefore may contain bugs I've yet to find.

    Furthermore, this is the first plugin like this I have made, I also do not know PAWN at all, so if anyone notices that I'm going about something entirely the wrong way or has any tips, I would love to hear about it.


    Get the plugin

Attached Files
File Type: zip maprewards.zip (71.6 KB)

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...