SetPlayerVirtualWorld

From SA-MP Wiki

Jump to: navigation, search

SetPlayerVirtualWorld


Set the virtual world of a player. They can only see other players or vehicles if they 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.


This function does not return a specific value.


Note: When a player spawns, their virtual world is automatically set to the default, which is 0.


if (strcmp(cmdtext, "/world3", true) == 0)
{
    SetPlayerVirtualWorld(playerid, 3);
    return 1;
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools