IsActorStreamedIn
From SA-MP Wiki
Description:
Checks if an actor is streamed in for a player.
(actorid, forplayerid)
actorid | The ID of the actor. |
forplayerid | The 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.
- CreateActor: Create an actor (static NPC).
- IsPlayerStreamedIn: Checks if a player is streamed in for another player.