NotifyOnCommand( <notify>, <command> )

Module: Player
SP Only


Whenever the console command processor encounters <command> for any reason, it will notify script with the string <notify> on the player entity. Additionally, it will pass the arguments to the notify as strings, where the first argument is the initiating command.

Call this on:

The player


 player NotifyOnCommand( "changeweapon", "weapnext" ); waittill "changeweapon";