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.
GetPlayerInterior
Description
Retrieves the player's current interior. A list of currently known interiors with their positions can be found on this page.
Name | Description |
---|---|
playerid | The player to get the interior ID of. |
Returns
The interior ID the player is currently in.
Examples
public OnPlayerCommandText(playerid,text[])
{
if (strcmp(cmdtext, "/int", true) == 0)
{
new string[64];
format(string, sizeof(string), "You are in interior %i", GetPlayerInterior(playerid));
SendClientMessage(playerid, 0xFF8000FF, string);
return 1;
}
return 0;
}
Notes
tip
Always returns interior 0 for NPCs.
Related Functions
- SetPlayerInterior: Set a player's interior.
- GetPlayerVirtualWorld: Check what virtual world a player is in.