From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 10:40, 6 August 2017
OstGot (Talk | contribs)

← Previous diff
Revision as of 18:06, 4 November 2017
Freaksken (Talk | contribs)
(added OnPlayerFinishedDownloading related callback)
Next diff →
Line 26: Line 26:
{{OnPlayerDisconnect}} {{OnPlayerDisconnect}}
{{OnIncomingConnection}} {{OnIncomingConnection}}
[[Category:Scripting Callbacks]] [[Category:Scripting Callbacks]]

Revision as of 18:06, 4 November 2017


This callback is called when a player connects to the server.

playeridThe ID of the player that connected.

Return Values:

  • 0 - Will prevent other filterscripts from receiving this callback.
  • 1 - Indicates that this callback will be passed to the next filterscript.
  • It is always called first in filterscripts.

Example Usage:

public OnPlayerConnect(playerid)
    new string[64], pName[MAX_PLAYER_NAME];
    format(string,sizeof string,"%s has joined the server. Welcome!",pName);
    return 1;

Related Callbacks

The following callbacks might be useful as well, as they are related to this callback in one way or another.

Personal tools