SetPlayerVirtualWorld
From SA-MP Wiki
SetPlayerVirtualWorld
Set the virtual world of a player. They can only see other players or vehicles if they are in that same world.
(playerid,worldid)
| playerid | The ID of the player you want to set the virtual world of. |
| worldid | The 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.
- GetPlayerVirtualWorld: Check what virtual world a player is in.
- SetVehicleVirtualWorld: Set the virtual world of a vehicle.
