canExit
Fires when a player tries to leave a shell or IPL property. Runs on the server, before the player is moved outside.
It does not fire for MLO properties or yard zones. It is skipped when the script forces the player out, for example when the server kicks everyone out of the property or the player logs out.
Payload
lua
- source:
numberServer id of the player - propertyId:
numberThe property id - propertyType:
string'shell'or'ipl' - owner:
stringOwner identifier, or the job name for a society property - ownerType:
string'user','society', or the government owner type for unowned properties - property:
tableThe server property object.property.propertyDataholds the full property data.
Example
lua
Return value
false: The player stays inside. No message is shown, so notify the player yourself if needed.- Anything else: The player leaves.