From EventScripts Community Encyclopedia
|
Overview
Syntax: playerset <command> <userid> [various parameters]
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.
Variation of this command that doesn't expand variables: {{{x}}}
Description
- userid - userid of the player who you wish to emulate
- command - the command you wish the server to execute on behalf of the player.
Parameters
- command - Command you want to perform - one of the following
- clip <userid> <weapon / slot> <amount> - Set the amount of ammo in the player's clip
- ammo <userid> <weapon / slot> <amount> - Set the amount of ammo in the player's reserve
- health <userid> <amount> - Set the player's health
- cash <userid> <amount> - Set the player's cash
- armor <userid> <amount> - Set the player's armor
- speed <userid> <amount> - Set the player's speed
- defuser <userid> <1/0> - Set 1/0 to give/take a player's defuser
- nightvision <userid> <1/0> - Set 1/0 to give/take a player's night vision
- nightvisionon <userid> <1/0> - Set 1/0 to turn on/off a player's night vision
- viewplayer <userid> <userid to view> - Force the player to look at another player(does not work on bots)
- viewcoord <userid> <x> <y> <z> - Set the player to look at a coordinate
- push <userid> <horiz> <vert> <0 - multiply vert/1 - use value for vert> - Give the player a push in the horizontal and vertical direction
- model <userid> <model> - Set the player's model
- color <userid> <red> <green> <blue> - Set the player's color
- Commands below were added after the release of ES 1.5. See the Library section of the forum for updates to playergetset.
- color <userid> <red> <green> <blue> [alpha] - Set the player's color and alpha
- noclip <userid> <1/0> - Turn on or off noclip
- jetpack <userid> <1/0> - Turn on or off jetpack
- freeze <userid> <1/0> - Turn on or off player freeze
- location <userid> <x> <y> <z> - Set the player's location
- moveto <userid to move> <userid to move to> - Set the player close to another player (like teleport)
- flash <userid> <alpha(0-255)> <duration> - Set the players view as if hit with a flashbang
- cashadd <userid> <value to add/subtract> - Adds cash if value is positive or subtracts if value is negative
- healthadd <userid> <value to add/subtract> - Adds health if value is positive or subtracts if value is negative
- armoradd <userid> <value to add/subtract> - Adds armor if value is positive or subtracts if value is negative
- speedadd <userid> <value to add/subtract> - Adds speed if value is positive or subtracts if value is negative
Examples
// Set a variable to 16000
es_setinfo myvar 16000
// Set the players cash
es playerset cash event_var(userid) server_var(myvar)
// Force the player to look at another player
es playerset viewplayer event_var(userid) event_var(attackerid)
// Set a player's model
es playerset model event_var(userid) player/b4p/b4p_jawa/b4p_jawa
Notes
- These commands are similar to ES Tools "Set" commands
- You can use the userid, Steam ID, or a partial player name for the userid.
- To see the syntax just type playerset on the command line or playerset command to see specific commands
- Although this is included in ES2 refer to playerlib for the Python equivalent.
See also
External links
none
{{{category}}}
|
|