Scripting/Client/Events/onClientCommand

The player typed a /command that the built-in chat does not know. Return true to swallow it (it will not be sent to the server); anything else lets it go through to the server's onPlayerCommand.

Syntax

onClientCommand(cmd, text)

Arguments

Returns

bool

Example

function onClientCommand( cmd, text )
{
	Message( "onClientCommand fired" );
	return true;          // return false to cancel it
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Client events

Categories: Client events | Client events