Point servercommand: Difference between revisions
Jump to navigation
Jump to search
Confirm:Any ConCommands/ConVars that aren't cheat flagged or hidden can be used.
Note:Due to a high risk of abuse, it is gated by the sv_allow_point_servercommand console variable.
Note:In
Garry's Mod , due to abuse, the point_servercommand and point_clientcommand is removed.
Workaround:Use lua_run RunConsoleCommand('command')
Solokiller (talk | contribs) m (reworded sentence and removed signature (signatures are not used in articles)) |
No edit summary |
||
(35 intermediate revisions by 16 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{ | __NOTOC__ | ||
{{CD|CPointServerCommand|file1=client.cpp}} | |||
{{this is a|logical entity|name=point_servercommand}} It issues commands to the server console. It's used by simply placing it in a map and triggering the Command input, the parameter override should be the exact [[console command]] to run or [[console variable]] to change.{{confirm|Any ConCommands/ConVars that aren't cheat flagged or hidden can be used.}} | |||
{{note|Due to a high risk of abuse, it is gated by the <var>sv_allow_point_servercommand</var> console variable.}} | |||
{{note|In {{gmod|4}} , due to abuse, the [[point_servercommand]] and [[point_clientcommand]] is removed.{{workaround|Use [[lua_run]] {{code|RunConsoleCommand('command')}} }}}} | |||
== Keyvalues == | |||
{{KV Targetname}} | |||
== | == Inputs == | ||
{{ | {{I|Command|Command to execute.{{Bugfix|In Hammer, using " symbol in parameter field will corrupt the [[VMF]] file's structure, making the file unviewable for the next Hammer session.|Remove the string argument manually with a text editor.}}|param=string}} | ||
{{in | |||
== | == ConVars == | ||
{{varcom|start}} | |||
{{varcom|sv_allow_point_servercommand|"always"<br><br>{{tf2}} "official" | |||
|string|Allow use of point_servercommand entities in map. Potentially dangerous for untrusted maps. | |||
: | disallow : Always disallow<br> | ||
official : Allowed for valve maps only {{tf2|only}}<br> | |||
always : Allow for all maps | |||
}} | |||
{{varcom|end}} | |||
== | == See also == | ||
* | * [https://github.com/ValveSoftware/source-sdk-2013/blob/master/mp/src/game/server/client.cpp#L609 CPointServerCommand] | ||
* [[point_broadcastclientcommand]] | |||
* [[point_clientcommand]] |
Latest revision as of 02:06, 30 June 2025
![]() |
---|
CPointServerCommand |
![]() |
point_servercommand
is a logical entity available in all Source games. It issues commands to the server console. It's used by simply placing it in a map and triggering the Command input, the parameter override should be the exact console command to run or console variable to change.





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.
Fix:Remove the string argument manually with a text editor.