executeCommandHandler
Client
Runs the handlers client scripts registered for a command, as if it had been typed.
Also exists on the server, with its own implementation: executeCommandHandler
bool executeCommandHandler(string commandName, any ...)
Parameters
| Name | Type | Description |
|---|---|---|
| commandName | string | The command's name. |
| ... | any | Arguments passed to the handlers, each turned into a string. |
Returns
true if a running resource handled the command, false if none did.
It runs every resource's handlers, not only this one's. The command is not sent to the server.
Example
addCommandHandler("zoom", function(command, level)
outputDebugString("zoom " .. tostring(level))
end)
executeCommandHandler("zoom", 2)