canExit
Description
Triggered when a player attempts to exit a property through the pre-check callback flow.
This is executed from nolag_properties:server:property:canExit, which runs before shell/IPL exit transition logic.
Payload Structure
lua{ source = playerId, -- The player's server ID propertyId = propertyId, -- Property identifier propertyType = type, -- Property type: 'shell', 'ipl', or 'mlo' owner = ownerIdentifier, -- Current property owner identifier ownerType = ownerType, -- Owner type: 'user' or 'society' property = propertyObj -- ServerProperty instance }
Parameters
- source (number): The server ID of the player trying to exit
- propertyId (string/number): Unique identifier of the target property
- propertyType (string): Type of property (
shell,ipl,mlo) - owner (string): Current owner identifier
- ownerType (string): Ownership context (
userorsociety) - property (table):
ServerPropertyobject for advanced checks
Usage Example
luaexports.nolag_properties:registerHook('canExit', function(data) if not canPlayerExitProperty(data.source, data.propertyId) then return false -- Cancel exit before transition starts end return true end)
Return Values
- true or nil: Allow exit to continue
- false: Cancel player exit flow