CBA_fnc_registerChatCommand

Description

Register a custom chat command on the local machine.

Parameters

_commandChat command STRING
_codeCode to execute after command was entered.  <CODE>
_availableFor”all”, “admin” or “adminLogged” (optional, default: “admin”) STRING
_thisArgsArguments to pass to event chat handler code <ANY>

Returns

_returntrue: Success, false: Error <BOOLEAN>

Examples

// '#skipTime 12' will make it night
["skipTime", {parseNumber (_this select 0) remoteExec ["skipTime"];}, "admin"] call CBA_fnc_registerChatCommand;

// "Detonate" will blow up the charge
["Detonate", {_thisArgs setDamage 1}, "admin", _placedDemoCharge] call CBA_fnc_registerChatCommand;

Author

commy2

string used by format
Close