Scripting/Squirrel/Events/Player/onPlayerPart

From VC-MP Wiki

Jump to: navigation, search

This is called when a player disconnects from the server.

Syntax

function onPlayerPart( player, reason )

Parameters

  • player - The pointer of the new player
  • reason - The reason ID for the part

Example

This will say <name> left the server when a player leaves the server.

function onPlayerPart( player, reason )
{
     Message( player.Name + " left the server" );
}

Notes

The functions MessagePlayer and player.Name were used in in this example. More info about them in the corresponding pages.

Related Events

Personal tools
squirrel scripting