- Documentation
- Shared functions
- wasEventCancelled
Function
wasEventCancelled
Checks whether the current event was cancelled with cancelEvent in an earlier handler; outside an event - whether the last event was cancelled.
Syntax
bool wasEventCancelled()Returns
true when cancelled.
Example
addEventHandler("onPlayerChat", root, function(message)
if wasEventCancelled() then return end
outputServerLog("CZAT: " .. getPlayerName(source) .. ": " .. message)
end, true, "low")