note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
SetPlayerVirtualWorld
Description
Set the virtual world of a player. They can only see other players or vehicles that are in that same world.
Name | Description |
---|---|
playerid | The ID of the player you want to set the virtual world of. |
virtualWorld | The virtual world ID to put the player in. |
Returns
true - The function executed successfully.
false - The function failed to execute. This means the player is not connected.
Examples
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/world3", true) == 0)
{
SetPlayerVirtualWorld(playerid, 3);
return 1;
}
return 0;
}
Notes
tip
The default virtual world is 0.
Related Functions
- GetPlayerVirtualWorld: Check what virtual world a player is in.
- SetVehicleVirtualWorld: Set the virtual world of a vehicle.