IsActorStreamedIn

From SA-MP Wiki

Jump to: navigation, search

IsActorStreamedIn was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Description:

Checks if an actor is streamed in for a player.


Parameters:
(actorid, forplayerid)
actoridThe ID of the actor.
forplayeridThe ID of the player.


Return Values:

This function returns 1 if the actor is streamed in for the player, or 0 if it is not.


new MyActor;
 
public OnGameModeInit()
{
    MyActor = CreateActor(...);
    return 1;
}
 
public OnPlayerSpawn(playerid)
{
    if(IsActorStreamedIn(MyActor, playerid))
    {
        // Do something
    }
}

Related Functions

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

Personal tools
Navigation
Toolbox
In other languages