SetPlayerVirtualWorld

From SA-MP Wiki

Jump to: navigation, search


Description:

Set the virtual world of a player. They can only see other players or vehicles that are in that same world.


Parameters:
(playerid,worldid)
playeridThe ID of the player you want to set the virtual world of.
worldidThe virtual world ID to put the player in.


Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player is not connected.


Image:32px-Ambox_warning_orange.png

Note

The default virtual world is 0.


Example Usage:

if (strcmp(cmdtext, "/world3", true) == 0)
{
    SetPlayerVirtualWorld(playerid, 3);
    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