IsPlayerStreamedIn: Difference between revisions

From NPC for VCMP 0.4 Servers
Jump to navigation Jump to search
(Created page with "{{Welcome| desc=Checks if a player is streamed in for an NPC. Only nearby players are streamed in.| params=<syntaxhighlight lang="lua">(playerid)</syntaxhighlight> <poem>::pla...")
 
No edit summary
 
Line 5: Line 5:
retvals=<poem>true, if the player is streamed in.
retvals=<poem>true, if the player is streamed in.
false, if the player is not streamed in.</poem>|
false, if the player is not streamed in.</poem>|
note=<poem>NPC is not streamed for itself. Thus if playerid is same as npcid, it will return false</poem>|
example=<source lang="lua">
example=<source lang="lua">
if(IsPlayerStreamedIn(playerid))
if(IsPlayerStreamedIn(playerid))

Latest revision as of 16:10, 19 March 2022


Description:
Checks if a player is streamed in for an NPC. Only nearby players are streamed in.


Parameters:

(playerid)

playerid: The ID of the player to check if streamed in.


Return Values:

true, if the player is streamed in.
false, if the player is not streamed in.


Important Note:

NPC is not streamed for itself. Thus if playerid is same as npcid, it will return false

Example

if(IsPlayerStreamedIn(playerid))
{
  //Do something !
}

Related Functions

The following functions may be helpful as they relate to this function in one way or another.