SetActorVirtualWorld
From SA-MP Wiki
Description:
Set the virtual world of an actor. Only players in the same world will see the actor.
(actorid, vworld)
actorid | The ID of the actor (returned by CreateActor) to set the virtual world of. |
vworld | The virtual world to put the actor ID. |
Return Values:
- 1: The function executed successfully.
- 0: The function failed to execute. The actor specified does not exist.
new MyActor; public OnGameModeInit() { // Create the actor MyActor = CreateActor(69, 0.0, 0.0, 3.0, 0.0); // Set their virtual world SetActorVirtualWorld(MyActor, 69); return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetActorVirtualWorld: Get the virtual world of an actor.
- CreateActor: Create an actor (static NPC).