From SA-MP Wiki

Jump to: navigation, search

SetActorVirtualWorld 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!


Set the virtual world of an actor. Only players in the same world will see the actor.

(actorid, vworld)
actoridThe ID of the actor (returned by CreateActor) to set the virtual world of.
vworldThe 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.

Personal tools
In other languages