Код:
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLocal] != 999) //in house
{
if(IsAtHouseExit(playerid))
{
if(PlayerInfo[playerid][pMask] == 1) { sendername = "Stranger"; }
format(string, sizeof(string), "* %s has left the house.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,PlayerInfo[playerid][pHouseExitX],PlayerInfo[playerid][pHouseExitY],PlayerInfo[playerid][pHouseExitZ]);
SetPlayerFacingAngle(playerid, PlayerInfo[playerid][pHouseExitR]-180);
SetCameraBehindPlayer(playerid);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pVirtualWorld] = 0;
PlayerInfo[playerid][pLocal] = 999;
return 1;
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if(IsPlayerInRangeOfPoint(playerid,3,BizzInfo[i][bExitX], BizzInfo[i][bExitY], BizzInfo[i][bExitZ])) //businesses
{
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerPos(playerid,BizzInfo[i][bEntranceX],BizzInfo[i][bEntranceY],BizzInfo[i][bEntranceZ]);
return 1;
}
}
if(PlayerPaintballing[playerid] != 0)
{
SetPlayerWeapons(playerid);
PlayerPaintballing[playerid] = 0;
SetPlayerPos(playerid,BizzInfo[0][bEntranceX],BizzInfo[0][bEntranceY],BizzInfo[0][bEntranceZ]);
TogglePlayerControllable(playerid, 1);
PaintballPlayers --;
return 1;
}
if(IsPlayerInRangeOfPoint(playerid,3.0,246.321929, 108.295661, 1003.218750)) //FBI HQ
{
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1777.384277, -1664.291992, 14.434018);
PlayerInfo[playerid][pInt] = 0;
SetPlayerFacingAngle(playerid, 125.0000);
SetCameraBehindPlayer(playerid);
}
else if(IsPlayerInRangeOfPoint(playerid,3.0,385.2311,173.8202,1008.3828)) //Brotherhood
{
if(GetPlayerInterior(playerid) == 101)
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid, 1654.1302,-1655.0974,22.5156);
SetPlayerFacingAngle(playerid, 181.8075);
SetCameraBehindPlayer(playerid);
}
}
Codes in green work, others dont.