01.06.2014, 11:20
make a check when players press F like
pawn Код:
if(newkeys & 16 && !IsPlayerInAnyVehicle(playerid))
{
if(PlayerTemp[playerid][key_enter] == 2)
{
CheckExit(playerid);
CheckEnter(playerid);
if(IsPlayerNearAnyDoors(playerid))
{
// Enter bulding
TogglePlayerControllable(playerid, 0);
GameTextForPlayer(playerid, "Loading..", 4000, 5);
SetPVarInt(playerid, "LoadingObjects", 1);
SetTimerEx("SafeLoadObjects", 5000, 0, "d", playerid);
}
else
{
// Enter vehicle or whatever
}
}