removeCommandHandler
Shared
Removes the handler this resource registered for a command.
bool removeCommandHandler(string commandName)
Parameters
| Name | Type | Description |
|---|---|---|
| commandName | string | The command's name. Case matters. |
Returns
true if it was removed. false if this resource has no handler with that name.
Handlers other resources registered for the same command stay.
Example
local function onTeleport(player)
setElementPosition(player, 2495.1, -1687.4, 13.5)
removeCommandHandler("casa")
end
addCommandHandler("casa", onTeleport)