Point clientcommand: Difference between revisions
Jump to navigation
Jump to search
Warning:This entity can corrupt the vmf file if used improperly. If your map crashes when you open it, this could be the problem. Open the vmf file in notepad and press Ctrl+F. Search for command and remove that line.
One way in which this entity can become corrupted is by enclosing commands that contain spaces in quotation marks. In some other contexts this is necessary to make sure the computer does not interpret a space as the end of the command, but here it will cause an immediate map crash on attempting to compile or open the map. The map can be repaired by removing the superfluous quotation marks in Notepad or with a tool such as PSPad. Attempting to open the map in Object Viewer may fail but yield a useful error message that gives the exact line of code to be edited, referred to as a "malformed expression."
(Cleanup) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | {{toc-right}} | ||
{{base point|point_clientcommand}} 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). | 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). | ||
Line 12: | Line 10: | ||
One way in which this entity can become corrupted is by enclosing commands that contain spaces in quotation marks. In some other contexts this is necessary to make sure the computer does not interpret a space as the end of the command, but here it will cause an immediate map crash on attempting to compile or open the map. The map can be repaired by removing the superfluous quotation marks in Notepad or with a tool such as PSPad. Attempting to open the map in [[Object Viewer]] may fail but yield a useful error message that gives the exact line of code to be edited, referred to as a "malformed expression."}} | One way in which this entity can become corrupted is by enclosing commands that contain spaces in quotation marks. In some other contexts this is necessary to make sure the computer does not interpret a space as the end of the command, but here it will cause an immediate map crash on attempting to compile or open the map. The map can be repaired by removing the superfluous quotation marks in Notepad or with a tool such as PSPad. Attempting to open the map in [[Object Viewer]] may fail but yield a useful error message that gives the exact line of code to be edited, referred to as a "malformed expression."}} | ||
== Keyvalues == | == Keyvalues == | ||
Line 26: | Line 20: | ||
== Outputs == | == Outputs == | ||
{{O Targetname}} | {{O Targetname}} | ||
== See also == | |||
* [[Unlocking chapters in your mod]] | |||
* [[point_servercommand]] |
Revision as of 03:37, 28 July 2011
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).
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.

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.