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 logical 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.

Tip.pngTip:In other VScript supported titles where this entity is not available, you can use the following entity script inside a point_clientcommand
function BroadcastCommand(command) {
    for(local player; player = Entities.FindByClassname(player, "player"); ) {
        EntFire("!self", "Command", command, 0, player);
    }
}

and run the function via clientcommand_name RunScriptCode BroadcastCommand(`console_command_here`)

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

Note.pngNote:All usable commands and Keyvalues / Inputs / Outputs are same as point_clientcommand.

See also