warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for 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.