This article's documentation is for anything that uses the Source engine. Click here for more information.

Point servercommand: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 3: Line 3:
{{this is a |point|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.{{confirm|Any ConCommands/ConVars that aren't cheat flagged or hidden can be used.}}  
{{this is a |point|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.{{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. {{tf2|only}}}}
{{note|Due to a high risk of abuse, it is gated by the <var>sv_allow_point_servercommand</var> console variable. {{tf2|only}} {{bms|also}}}}
{{note|In {{gmod|4}} , due to abuse, the [[point_servercommand]] and [[point_clientcommand]] is removed.{{workaround|Use [[lua_run]] {{code|RunConsoleCommand('command')}} }}}}
{{note|In {{gmod|4}} , due to abuse, the [[point_servercommand]] and [[point_clientcommand]] is removed.{{workaround|Use [[lua_run]] {{code|RunConsoleCommand('command')}} }}}}


Line 15: Line 15:


{{varcom|start}}
{{varcom|start}}
{{varcom|{{tf2|only}} sv_allow_point_servercommand|"official"|string|Allow use of point_servercommand entities in map. Potentially dangerous for untrusted maps.  
{{varcom|{{tf2|only}}{{bms|also}} sv_allow_point_servercommand|"official"{{tf2}}
 
"always"{{bms}}
|string|Allow use of point_servercommand entities in map. Potentially dangerous for untrusted maps.  
disallow : Always disallow<br>
disallow : Always disallow<br>
official : Allowed for valve maps only<br>
official : Allowed for valve maps only {{tf2|only}}<br>
always  : Allow for all maps
always  : Allow for all maps
}}
}}

Revision as of 03:48, 19 June 2024

C++ Class hierarchy
CPointServerCommand
CPointEntity
CBaseEntity
C++ client.cpp

point_servercommand is a point available in all Source 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.

Confirm:Any ConCommands/ConVars that aren't cheat flagged or hidden can be used.
Note.pngNote:Due to a high risk of abuse, it is gated by the sv_allow_point_servercommand console variable. (only in Team Fortress 2) (also in Black Mesa)
Note.pngNote:In Garry's Mod Garry's Mod , due to abuse, the point_servercommand and point_clientcommand is removed.
PlacementTip.pngWorkaround:Use lua_run RunConsoleCommand('command')

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.
Icon-Bug.pngBug:In Hammer, using " symbol in parameter field will corrupt the VMF file's structure, making the file unviewable for the next Hammer session.  [todo tested in ?]
Note.pngFix:Remove the string argument manually with a text editor.

ConVars

Cvar/Command Parameters or default value Descriptor Effect
(only in Team Fortress 2)(also in Black Mesa) sv_allow_point_servercommand "official"Team Fortress 2 "always"Black Mesa string Allow use of point_servercommand entities in map. Potentially dangerous for untrusted maps.

disallow : Always disallow
official : Allowed for valve maps only (only in Team Fortress 2)
always  : Allow for all maps


See also