PHP код:
//TOPO
enum PlayerInfo
{
EntrouAgencia
};
public OnPlayerConnect(playerid)
{
pInfo[playerid][EntrouAgencia] = 0;
return 1;
}
//ENTRAR AGENCIA
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1310.4525,-1367.4639,13.4724)) // Agкncia LS
{
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);
SetPlayerFacingAngle(playerid, 359.6873);
SetPlayerInterior(playerid, 10);
pInfo[playerid][EntrouAgencia] = 1;//<<<
SetPlayerVirtualWorld(playerid, 5);
SetCameraBehindPlayer(playerid);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1310.4525,-1367.4639,13.4724)) // Agкncia SF
{
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);
SetPlayerFacingAngle(playerid, 359.6873);
SetPlayerInterior(playerid, 10);
pInfo[playerid][EntrouAgencia] = 2;//<<<
SetPlayerVirtualWorld(playerid, 10);
SetCameraBehindPlayer(playerid);
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1310.4525,-1367.4639,13.4724)) // Agкncia LV
{
SetPlayerPos(playerid, 246.375991,109.245994,1003.218750);
SetPlayerFacingAngle(playerid, 359.6873);
SetPlayerInterior(playerid, 10);
pInfo[playerid][EntrouAgencia] = 3;//<<<
SetPlayerVirtualWorld(playerid, 15);
SetCameraBehindPlayer(playerid);
return 1;
}
//SAIR AGENCIA
if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.4077, 107.6076, 1003.2188)) // Agкncia
{
if(pInfo[playerid][EntrouAgencia] == 1)
{
SetPlayerPos(playerid, 1310.3708,-1370.8752,13.5204); // LS
SetPlayerFacingAngle(playerid, 181.6691);
SetPlayerInterior(playerid, 0);
pInfo[playerid][EntrouAgencia] = 0;
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid, "~w~Los Santos", 3000, 1);
}
else if(pInfo[playerid][EntrouAgencia] == 2)
{
SetPlayerPos(playerid, -2650.2886, 376.0364, 6.1563); // SF
SetPlayerPos(playerid, -2227.2854, 251.9700, 35.3203);
SetPlayerFacingAngle(playerid, 317.8766);
SetPlayerInterior(playerid, 0);
pInfo[playerid][EntrouAgencia] = 0;
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid, "~w~San Fierro", 3000, 1);
}
else if(pInfo[playerid][EntrouAgencia] == 3)
{
SetPlayerPos(playerid, 1952.8214, 1342.8403, 15.3672); // LV
SetPlayerFacingAngle(playerid, 269.9011);
SetPlayerInterior(playerid, 0);
pInfo[playerid][EntrouAgencia] = 0;
SetPlayerVirtualWorld(playerid, 0);
GameTextForPlayer(playerid, "~w~Las Venturas", 3000, 1);
}