Point clientcommand

From Valve Developer Community
Revision as of 16:50, 19 August 2022 by MrFunreal (talk | contribs) (reworded the warning because it was quite long and a bit hard to understand.)
Jump to navigation Jump to search

Template:Base point 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. 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.

Warning.pngWarning:This entity can corrupt the map.vmf file if used improperly. Inputs using quotation marks " in the parameter field will cause the vmf to be broken in such a way that hammer refuses to open and compile it. This is because the vmf uses the same quotation marks to determine the end of a string. It will read the quotation mark or your input, assume that to be the end of the string and then realise that the subsequently written words are nonsensical.
Note.pngFix:Either remove the quotation marks while hammer is still running, or open the vmf in a text editor, search for this entity and manually remove the unnecessary quotation marks.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Inputs

Command <stringRedirectInput/string>
Command to execute.


Outputs

See also