GetPlayerVirtualWorld
From SA-MP Wiki
(Difference between revisions)
Revision as of 00:01, 24 January 2014 Smithy (Talk | contribs) ← Previous diff |
Revision as of 16:40, 3 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 28: | Line 28: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:GetPlayerVirtualWorld]] |
Revision as of 16:40, 3 February 2014
Description:
Retrieves the current virtual world the player is in. Note this is not the same as the interior.
(playerid)
playerid | The ID of the player to get the virtual world of. |
Return Values:
The ID of the world the player is currently in.
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/world", true) == 0) { new string[32]; format(string, sizeof(string), "Your virtual world: %d", GetPlayerVirtualWorld(playerid)); SendClientMessage(playerid,0xFFFFFFFF,string); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SetPlayerVirtualWorld: Set the virtual world of a player.
- GetVehicleVirtualWorld: Check what virtual world a vehicle is in.
- GetPlayerInterior: Get the current interior of a player.