onClientCommand
From Liberty Unleashed Wiki
Revision as of 23:07, 11 August 2016 by PerikiyoXD (Talk | contribs)
This event is called when the local player types any command (I.E.: /kill)
Syntax
function onClientCommand( command, text )
Arguments
- command - The command typed
- text - The text passed to the command
Returns
- 1 - Let the command be sent to the server.
- 0 - Stops the command being sent to the server
Example
Displays a text for you when they type '/text'
function onClientCommand ( szCommand, szParams ) { if ( szCommand == "text" ) { Message ( "Your own message." ); } return 1; }
Notes
The functions Message were used in in this example. More info about them in corresponding pages.
Related Events
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
- onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn