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

point_broadcastclientcommand

From Valve Developer Community
Jump to navigation Jump to search
Class hierarchy
CPointBroadcastClientCommand
CPointEntity
CBaseEntity
client.cpp

point_broadcastclientcommand is a point entity available in all Source Source games since Left 4 Dead 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.


Keyvalues

Name (targetname) <string>
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 <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.
Note.pngFix:Remove additional " symbols manually with a text editor.

Usable ConVars/ConCommands in multiplayer

Note.pngNote:In Left 4 Dead series item equipping related commands only work when bound or used on human player with this entity

Following commands have "server_can_execute" flag.

ConCommands

Cvar/CommandParameters or default valueDescriptorEffect
echo<string>Echo text to console.
cancelselectIn Half-Life style hud cancels currently selected weapon
firstpersonGo into firstperson view
invnextIn Half-Life style hud selects next weapon
invprevIn Half-Life style hud selects previous weapon
lastinvEquips previously used weapon
(only in Team Fortress 2)+inspectForce weapon inspection
(only in Team Fortress 2)-inspectCancel weapon inspection
slot0 - slot10In Half-Life style hud selects slot with the given number
(only in Left 4 Dead 2)cl_consistencycheckTriggers the client to perform a consistency check
cl_soundscape_flushFlushes 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
(only in Left 4 Dead 2)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.1
snd_setsoundparam Flaregun.Detonate level SNDLVL_120
redirect<string><server ip address>Redirect client to specified server.
Note.pngNote:In Team Fortress 2, the client must have the server favorited in the server browser for this to work.
retryRetry connection to current (or last) server.
rpt_connect
r_cleardecalsClear all client decals
r_screenoverlay
Icon-Bug.pngBug:Cannot be used without sv_cheats 1 in Left 4 Dead 2
In other games, this command will only work without cheats but ONLY on dedicated servers.
In Team Fortress 2, use the SetScriptOverlayMaterial input on players instead.  [todo tested in?]
<string><material name>Draw specified material as an overlay

ConVars

Cvar/CommandParameters or default valueDescriptorEffect
cl_spec_mode/Left 4 Dead seriescl_ideal_spec_mode5desired spectator mode (4 = in-eye, 5 = chase, 6 = roaming)
cl_session""
dsp_player0
nameunnamedCurrent user name
name2unnamedCurrent user name

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)


See also