onPlayerPart
From Liberty Unleashed Wiki
This event is called when a remote player leaves the server
Syntax
function onPlayerPart( player, reasonid )
Arguments
- player - The pointer to the player that left
- reasonid - The reason ID for the part
Returns
- 1 - Allows the PlayerPart message appear as normal
- 0 - Stops the part message being printed to the chatbox. Useful to override it.
Example
This example overrides the default output with our own customizable one.
function onPlayerPart(player,reason) { // Output our custom message Message("* " + player.Name + " has left the server.",255,0,0); // Prevent the default message being output return 0; }
Notes
The function Message was used in in this example. More info about this in the corresponding page.
Related Events
- onClientArmourChange
- onClientCashChange
- onClientCollideWithPlayer
- onClientCommand
- onClientDeath
- onClientFall
- onClientHealthChange
- onClientHurt
- onClientKill
- onClientKeyStateChange
- onClientRequestClass
- onClientRequestSpawn
- onClientShot
- onClientSpawn
-
onClientUseDetonator
- onClientWeaponChange
- onPlayerDeath
- onPlayerJoin
- onPlayerKill
- onPlayerPart
- onPlayerSpawn