The OnClientLeave event is fired when a client leaves the module being played. This occurs whenever a player logs out of a multiplayer server.
Objects which define this Event[]
Related Functions[]
Notes[]
- In the OnClientLeave, the actual object (now almost like a dead-AI NPC) still exists, but the player character's properties do not. Functions that work on the object, like
GetName()
will work, but functions that require player data, such asGetPCPlayerName()
,GetPCPublicCDKey()
, orGetPCIPAddress()
, will not return any valid data as the player has already disconnected. - Local variables on the leaving character can be accessed during this event, but any changes to these variables will be lost once the event ends. (An alternative to storing data on the exiting character during this event is to store the data on the module, using a variable name that contains the result of
ObjectToString()
applied to the exiting character.)