OnPlayerConnect
From SA-MP Wiki
(Difference between revisions)
Revision as of 20:30, 17 October 2013 Badio12 (Talk | contribs) ← Previous diff |
Revision as of 23:34, 31 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
{{Scripting}} | {{Scripting}} | ||
- | {{Title}} | ||
{{Description|This callback is called when a player connects to the server.}} | {{Description|This callback is called when a player connects to the server.}} | ||
Line 27: | Line 26: | ||
[[de:OnPlayerConnect]] | [[de:OnPlayerConnect]] | ||
+ | [[fr:OnPlayerConnect]] | ||
[[ru:OnPlayerConnect]] | [[ru:OnPlayerConnect]] | ||
[[pt:OnPlayerConnect]] | [[pt:OnPlayerConnect]] |
Revision as of 23:34, 31 January 2014
Description:
This callback is called when a player connects to the server.
(playerid)
playerid | The ID of the player that connected. |
Return Values:
This callback does not handle returns.
public OnPlayerConnect(playerid) { new string[64], pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,MAX_PLAYER_NAME); format(string,sizeof string,"%s has joined the server. Welcome!",pName); SendClientMessageToAll(0xFFFFFFAA,string); return 1; }
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- OnPlayerDisconnect: Called when a player leaves the server.
This page has been suggested for deletion. not used [ Discuss ][ What links here? ] |