跳到主要内容

OnPlayerInteriorChange

Description

This callback is called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building.

NameDescription
playeridThe playerid who changed interior.
newinterioridThe interior the player is now in.
oldinterioridThe interior the player was in before.

Returns

It is always called first in gamemode.

Examples

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
new string[42];
format(string, sizeof(string), "You went from interior %d to interior %d!", oldinteriorid, newinteriorid);
SendClientMessage(playerid, COLOR_ORANGE, string);
return 1;
}

The following callbacks might be useful, as they're related to this callback in one way or another.

The following functions might be useful, as they're related to this callback in one way or another.