IsPlayerStreamedIn

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 12:45, 5 December 2017
Dugi (Talk | contribs)
(revert)
← Previous diff
Current revision
OstGot (Talk | contribs)
(Your example isn't right. See description of the parameters)
Line 19: Line 19:
{{Example}} {{Example}}
<pawn> <pawn>
-if(IsPlayerStreamedIn(0, playerid)) SendClientMessage(playerid, -1, "ID 0 can see you.");+if(IsPlayerStreamedIn(playerid, 0)) SendClientMessage(playerid, -1, "ID 0 can see you.");
</pawn> </pawn>

Current revision



IsPlayerStreamedIn was added in SA-MP 0.3a This function was added in SA-MP 0.3a and will not work in earlier versions!


Description:

Checks if a player is streamed in another player's client.


Parameters:
(playerid, forplayerid)
playeridThe ID of the player to check is streamed in.
forplayeridThe ID of the player to check if playerid is streamed in for.


Return Values:

  • 1: The player is streamed in.
  • 0: The player is not streamed in.


Image:32px-Circle-style-warning.png

Important
Note

Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false!


Image:32px-Ambox_warning_orange.png

Note

Players stream out if they are more than 150 meters away (see server.cfg - stream_distance)


Example Usage:

if(IsPlayerStreamedIn(playerid, 0)) SendClientMessage(playerid, -1, "ID 0 can see you.");

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

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

Personal tools