Point clientcommand: Difference between revisions
m (🤓 edit of grammar) |
(Add 2013/TF2 commands) |
||
Line 22: | Line 22: | ||
{{varcom|echo|<string>||Echo text to console.}} | {{varcom|echo|<string>||Echo text to console.}} | ||
{{varcom|cancelselect|||In {{hl}} style hud cancels currently selected weapon}} | {{varcom|cancelselect|||In {{hl}} style hud cancels currently selected weapon}} | ||
{{varcom|firstperson|||Go into firstperson view}} | |||
{{varcom|invnext|||In {{hl}} style hud selects next weapon}} | {{varcom|invnext|||In {{hl}} style hud selects next weapon}} | ||
{{varcom|invprev|||In {{hl}} style hud selects previous weapon}} | {{varcom|invprev|||In {{hl}} style hud selects previous weapon}} | ||
{{varcom|lastinv|||Equips previously used weapon}} | {{varcom|lastinv|||Equips previously used weapon}} | ||
{{varcom|{{only|{{tf2}}}}+inspect|||Force weapon inspection}} | |||
{{varcom|{{only|{{tf2}}}}-inspect|||Cancel weapon inspection}} | |||
{{varcom|slot0 - slot10|||In {{hl}} style hud selects slot with the given number}} | {{varcom|slot0 - slot10|||In {{hl}} style hud selects slot with the given number}} | ||
{{varcom|{{only|{{l4d2}}}}cl_consistencycheck|||Triggers the client to perform a consistency check}} | {{varcom|{{only|{{l4d2}}}}cl_consistencycheck|||Triggers the client to perform a consistency check}} | ||
Line 30: | Line 33: | ||
{{varcom|play|<string>|<sound path>|Play a sound.}} | {{varcom|play|<string>|<sound path>|Play a sound.}} | ||
{{varcom|playgamesound|<string>|<soundscript>|Play a sound from the game sounds txt file}} | {{varcom|playgamesound|<string>|<soundscript>|Play a sound from the game sounds txt file}} | ||
{{varcom|soundfade|<float> <float> [<float> <float>]|<percent> <hold> [<out> <int>]|Fade in/out all client volume}} | |||
{{varcom|sndplaydelay|<float> <string>|<delay_in_sec> <soundname>|Play a sound with a given delay. Negative to skip ahead}} | |||
{{varcom|{{only| | {{varcom|{{only| | ||
{{l4d2}}}}snd_playsounds|<string> [<float> <float> <float>]|<soundscript> [<x> <y> <z>]|Play sounds from the game sounds txt file at a given location}} | {{l4d2}}}}snd_playsounds|<string> [<float> <float> <float>]|<soundscript> [<x> <y> <z>]|Play sounds from the game sounds txt file at a given location}} | ||
{{varcom|snd_setsoundparam|<string> <volume <float 0.0-1.0> {{!}}level SNDLVL_<int 1-179>>|<soundscript> <volume <vol> {{!}}level SNDLVL_<db>>|Can change level or volume of a soundscript. | {{varcom|snd_setsoundparam|<string> <volume <float 0.0-1.0> {{!}}level SNDLVL_<int 1-179>>|<soundscript> <volume <vol> {{!}}level SNDLVL_<db>>|Can change level or volume of a soundscript. | ||
<br>examples: <code>snd_setsoundparam Flaregun.Detonate volume 0.1</code><br><code>snd_setsoundparam Flaregun.Detonate level SNDLVL_120</code>}} | <br>examples: <code>snd_setsoundparam Flaregun.Detonate volume 0.1</code><br><code>snd_setsoundparam Flaregun.Detonate level SNDLVL_120</code>}} | ||
{{varcom|redirect|<string>|<server ip address>|Redirect client to specified server.}} | {{varcom|redirect|<string>|<server ip address>|Redirect client to specified server. {{note|In {{tf2}}, the client must have the server favorited in the server browser for this to work.}}}} | ||
{{varcom|retry|||Retry connection to last server.}} | {{varcom|retry|||Retry connection to current (or last) server.}} | ||
{{varcom|rpt_connect|||}} | {{varcom|rpt_connect|||}} | ||
{{varcom|r_screenoverlay {{bug|Cannot be used without sv_cheats 1 in {{l4d2}}<br> | {{varcom|r_cleardecals|||Clear all client decals}} | ||
{{varcom|r_screenoverlay {{bug|Cannot be used without sv_cheats 1 in {{l4d2}}<br>In other games, this command will only work without cheats but ONLY on [[Dedicated server|dedicated servers]].}}|<string>|<material name>|Draw specified material as an overlay}} | |||
{{varcom|end}} | {{varcom|end}} | ||
=== ConVars === | === ConVars === | ||
{{varcom|start}} | {{varcom|start}} | ||
{{varcom| | {{varcom|cl_spec_mode/{{l4ds}}cl_ideal_spec_mode|5||desired spectator mode (4 {{=}} in-eye, 5 {{=}} chase, 6 {{=}} roaming)}} | ||
{{varcom|cl_session|""||}} | {{varcom|cl_session|""||}} | ||
{{varcom|dsp_player|0||}} | {{varcom|dsp_player|0||}} |
Revision as of 08:21, 18 December 2023
![]() |
---|
CPointClientCommand |
![]() |
Template:Entity It issues commands to the client console as if they were typed manually by the player. The client commands are sent as parameters of the Command input. Only one instance of the entity is ever needed in a map.
In multiplayer games, the commands are only executed on the Activator's client. If the activator was not a player, then it simply won't do anything (unless it's in commentary mode; then the command will be executed from the first player). If you require all players to execute the command, use the point_broadcastclientcommand entity instead.
This command (in conjunction with point_servercommand and the config (cfg) file) used to allow a client to cheat on multiplayer servers through changing player names, execute client commands, and other things. On multiplayer servers, any command that DOES NOT HAVE the FCVAR_SERVER_CAN_EXECUTE flag set cannot be executed by this entity; any attempt will be reported and blocked.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
- Command <string >
- Command to execute.
Usable ConVars/ConCommands in multiplayer



Following commands have "server_can_execute" flag.
ConCommands
Cvar/Command | Parameters or default value | Descriptor | Effect |
---|---|---|---|
echo | <string> | Echo text to console. | |
cancelselect | In ![]() |
||
firstperson | Go into firstperson view | ||
invnext | In ![]() |
||
invprev | In ![]() |
||
lastinv | Equips previously used weapon | ||
(only in ![]() |
Force weapon inspection | ||
(only in ![]() |
Cancel weapon inspection | ||
slot0 - slot10 | In ![]() |
||
(only in ![]() |
Triggers the client to perform a consistency check | ||
cl_soundscape_flush | Flushes the client side soundscapes | ||
play | <string> | <sound path> | Play a sound. |
playgamesound | <string> | <soundscript> | Play a sound from the game sounds txt file |
soundfade | <float> <float> [<float> <float>] | <percent> <hold> [<out> <int>] | Fade in/out all client volume |
sndplaydelay | <float> <string> | <delay_in_sec> <soundname> | Play a sound with a given delay. Negative to skip ahead |
(only in ![]() |
<string> [<float> <float> <float>] | <soundscript> [<x> <y> <z>] | Play sounds from the game sounds txt file at a given location |
snd_setsoundparam | <string> <volume <float 0.0-1.0> |level SNDLVL_<int 1-179>> | <soundscript> <volume <vol> |level SNDLVL_<db>> | Can change level or volume of a soundscript.
examples: snd_setsoundparam Flaregun.Detonate volume 0.1 snd_setsoundparam Flaregun.Detonate level SNDLVL_120 |
redirect | <string> | <server ip address> | Redirect client to specified server. |
retry | Retry connection to current (or last) server. | ||
rpt_connect | |||
r_cleardecals | Clear all client decals | ||
r_screenoverlay ![]() ![]() In other games, this command will only work without cheats but ONLY on dedicated servers. [todo tested in ?] |
<string> | <material name> | Draw specified material as an overlay |
ConVars