OnPlayerStreamIn

From SA-MP Wiki

Jump to: navigation, search

OnPlayerStreamIn


Warning: This is a new callback working since SA-MP 0.3. It won't work in previous versions.


Important note: For the NPC version of this callback, check NPC:OnPlayerStreamIn.


This callback is called when a player is streamed by some other player's client.


Parameters:
(playerid, forplayerid)
playeridThe player who has been streamed.
forplayeridThe player who has streamed the other player.


This function does not return a specific value, it's best to simply ignore it.


public OnPlayerStreamIn(playerid, forplayerid)
{
    new string[80];
    format(string, sizeof(string), "Your computer has just loaded player ID %d", playerid);
    SendClientMessage(forplayerid, string);
    return 1;
}

Related Callbacks

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