Point broadcastclientcommand: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 Tip:In
Tip:In  , you can use the following entity I/O to send a client command to all players using point_clientcommand.  This will not work if you have more than one entity!
, you can use the following entity I/O to send a client command to all players using point_clientcommand.  This will not work if you have more than one entity!
	
		
	
|  (add same note from point_clientcommand page) |  (what am I missing?) Tag: Reverted | ||
| Line 4: | Line 4: | ||
| {{tip|In {{tf2}}, you can use the following entity I/O to send a client command to all players using [[point_clientcommand]].  This will not work if you have more than one entity! | {{tip|In {{tf2}}, you can use the following entity I/O to send a client command to all players using [[point_clientcommand]].  This will not work if you have more than one entity! | ||
| {{code|player  RunScriptCode  Entities.FindByClassname(null, `point_clientcommand`).AcceptInput(`Command`, `console_command_here`, self, self)}} | {{code|player  RunScriptCode  Entities.FindByClassname(null, `point_clientcommand`).AcceptInput(`Command`, `console_command_here`, self, self)}} | ||
| {{todo|This can probably be done in other [[VScript]] supported titles by using {{hammerplusplus}} and escaping the quotes into the vmf file before compiling but not confirmed.  {{tf2}} supports backticks so it's not necessary here.}} | {{todo|This can probably be done in other [[VScript]] supported titles by using {{hammerplusplus}} and escaping the quotes into the vmf file before compiling but not confirmed.  {{tf2}} supports backticks so it's not necessary here.}}{{elaborate|why not just use point_broadcastclientcommand instead?}} | ||
| }} | }} | ||
Revision as of 08:48, 17 January 2025
|  Class hierarchy | 
|---|
| CPointBroadcastClientCommand | 
|  client.cpp | 
point_broadcastclientcommand  is a   point entity  available in all  Source games since
 Source games since  Left 4 Dead. It's an entity that issues commands to each valid client's console, as if it was typed in by that player locally.
 Left 4 Dead. It's an entity that issues commands to each valid client's console, as if it was typed in by that player locally. 
 Tip:In
Tip:In  , you can use the following entity I/O to send a client command to all players using point_clientcommand.  This will not work if you have more than one entity!
, you can use the following entity I/O to send a client command to all players using point_clientcommand.  This will not work if you have more than one entity!
player  RunScriptCode  Entities.FindByClassname(null, `point_clientcommand`).AcceptInput(`Command`, `console_command_here`, self, self)
Todo: This can probably be done in other VScript supported titles by using  and escaping the quotes into the vmf file before compiling but not confirmed.
 and escaping the quotes into the vmf file before compiling but not confirmed.   supports backticks so it's not necessary here.
 supports backticks so it's not necessary here.
 and escaping the quotes into the vmf file before compiling but not confirmed.
 and escaping the quotes into the vmf file before compiling but not confirmed.   supports backticks so it's not necessary here.
 supports backticks so it's not necessary here.Elaborate?: why not just use point_broadcastclientcommand instead?
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 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.
 Warning:Using the quote symbol Warning:Using the quote symbol- "in any text field of a Hammer Object Properties Dialog will lead to VMF corruption, fixable only by editing the VMF directly with a text editor and removing the added quote symbol.
Commands usable on clients in multiplayer
Listed ConCommands and ConVars have "server_can_execute" flag.
ConCommands
| Cvar/Command | Parameters or default value | Descriptor | Effect | 
|---|---|---|---|
| echo | <string> | Echo text to console. | |
| cancelselect | In  style hud cancels currently selected weapon | ||
| firstperson | Go into firstperson view | ||
| invnext | In  style hud selects next weapon | ||
| invprev | In  style hud selects previous weapon | ||
| lastinv | Equips previously used weapon | ||
| (only in  )+inspect | Force weapon inspection | ||
| (only in  )-inspect | Cancel weapon inspection | ||
| slot0 - slot10 | In  style hud selects slot with the given number | ||
| (only in  )cl_consistencycheck | 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 | 
| (in all games since  )snd_playsounds | <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.1snd_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 | <string> | <material name> | Draw specified material as a screen overlay  Bug:Cannot be used without sv_cheats 1 in  In other games, this command will only work without cheats but ONLY on dedicated servers. In  , use the SetScriptOverlayMaterialinput on players instead.  [todo tested in ?] | 
| +remote_view / -remote_view  | |||
| +leaderboard / -leaderboard  | Display/hide in game leaderboard | ||
| playvideo_nointerrupt  | <filename> [width height] | Plays a video without ability to skip | |
| playvideo_end_level_transition  | <filename> | Plays a video fullscreen without ability to skip (unless dev 1) and fades in | |
| playvideo_exitcommand  | <filename> <exit command> | Plays a video and fires an exit command when it is stopped or finishes | |
| playvideo_exitcommand_nointerrupt  | <filename> <exit command> | Plays a video (without interruption) and fires an exit command when it is stopped or finishes | |
| stop_transition_videos_fadeout  | Fades out all transition videos playing to the screen | ||
| rd_loc_reload  | reload localization files | 
ConVars
player class commands
Some commands are defined in player class and are completely hidden from auto complete. Such commands are also usable on clients connected to server via this entity
Todo: list commands defined in player class which don't require sv_cheats 1 (some examples from l4d2)


 Confirm:
 Confirm:
