F = enter/exit interior/exterior
#1

Код:
forward SendToEnter(playerid);
public SendToEnter(playerid)
{
    if(GetPVarInt(playerid, "PBM") > 0) {
        SendClientMessage(playerid, COLOR_WHITE, "You can't do this while being in a arena!");
        return 1;
    }
    if(PlayerCuffed[playerid] >= 1)
	{
        SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
        return 1;
    }
    if(PlayerInfo[playerid][pJailed] > 0)
	{
        SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
        return 1;
    }

	new string[128];
    for(new i = 0; i < sizeof(DDoorsInfo); i++)
	{
        if(IsPlayerInRangeOfPoint(playerid,3.0,DDoorsInfo[i][ddExteriorX], DDoorsInfo[i][ddExteriorY], DDoorsInfo[i][ddExteriorZ]) && PlayerInfo[playerid][pVW] == DDoorsInfo[i][ddExteriorVW])
		{
            if(DDoorsInfo[i][ddVIP] > 0 && PlayerInfo[playerid][pDonator] < DDoorsInfo[i][ddVIP]) {
                SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, you're not a high enough Donator level.");
                return 1;
            }

            if(DDoorsInfo[i][ddGang] > 0) {
                if(PlayerInfo[playerid][pGang] != DDoorsInfo[i][ddGang]) {
                    SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door is gang restricted.");
                    return 1;
                }
            }

            if(DDoorsInfo[i][ddFaction] > 0) {
				if(PlayerInfo[playerid][pFaction] != DDoorsInfo[i][ddFaction])
				{
					SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door is faction restricted.");
					return 1;
				}
            }

            if(DDoorsInfo[i][ddAdmin] > 0 && PlayerInfo[playerid][pAdmin] < DDoorsInfo[i][ddAdmin]) {
                SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, you're not a high enough admin level.");
                return 1;
            }

            if(DDoorsInfo[i][ddWanted] > 0 && PlayerInfo[playerid][pWantedLevel] != 0) {
                SendClientMessage(playerid, COLOR_GRAD2, "You can't enter, this door restricts those with wanted levels.");
                return 1;
            }

			if(DDoorsInfo[i][ddLocked] == 1) {
			    return SendClientMessage(playerid, COLOR_GRAD2, "This door is currently locked.");
			}

			if(PlayerInfo[playerid][pMask] == 1) { format(string, sizeof(string), "* Stranger has entered %s.",DDoorsInfo[i][ddDescription]); }
			else { format(string, sizeof(string), "* %s has entered %s.", GetPlayerNameEx(playerid), DDoorsInfo[i][ddDescription]); }
			ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

            SetPlayerInterior(playerid,DDoorsInfo[i][ddInteriorInt]);
            PlayerInfo[playerid][pInt] = DDoorsInfo[i][ddInteriorInt];
            PlayerInfo[playerid][pVW] = DDoorsInfo[i][ddInteriorVW];
            SetPlayerVirtualWorld(playerid, DDoorsInfo[i][ddInteriorVW]);
            if(DDoorsInfo[i][ddCustomInterior]) {
                TogglePlayerControllable(playerid, 0);
                GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
                SetPVarInt(playerid, "LoadingObjects", 1);
                SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
            }
            if(DDoorsInfo[i][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
                SetVehiclePos(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
                SetVehicleZAngle(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorA]);
                SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorVW]);
                LinkVehicleToInterior(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddInteriorInt]);
            }
            else {
                SetPlayerPos(playerid,DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
                SetPlayerFacingAngle(playerid,DDoorsInfo[i][ddInteriorA]);
                SetCameraBehindPlayer(playerid);
            }
            return Streamer_UpdateEx(playerid, DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
        }
    }
    for(new i = 0; i < sizeof(HouseInfo); i++)
	{
        if(IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hExteriorX], HouseInfo[i][hExteriorY], HouseInfo[i][hExteriorZ]))
		{
            if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i || HouseInfo[i][hLock] == 0 || PlayerInfo[playerid][pRenting] == i)
			{
			    if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i)
			    {
			        if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "* Stranger entered their house."); }
			        else { format(string, sizeof(string), "* %s has entered their house.", GetPlayerNameEx(playerid)); }
					ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			    }
			    else
			    {
       				if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "* Stranger has entered a house.", HouseInfo[i][hOwner]); }
					else { format(string, sizeof(string), "* %s has entered a house.", GetPlayerNameEx(playerid), HouseInfo[i][hOwner]); }
					ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				}

                SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
                PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
                PlayerInfo[playerid][pVW] = i+6000;
                SetPlayerVirtualWorld(playerid, i+6000);
                if(HouseInfo[i][hCustomInterior] == 1)
				{
                    LoadObjectsForPlayer(playerid);
                }
                SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
                SetPlayerFacingAngle(playerid,HouseInfo[i][hInteriorA]);
                SetCameraBehindPlayer(playerid);
                if(PlayerInfo[playerid][pHouse] == i || PlayerInfo[playerid][pHouse2] == i)
                {
                	GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
				}
				Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
            }
            else
			{
                GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
            }
            return 1;
        }
    }
    for(new i=1; i<MAX_BUSINESS; i++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[i][bX], BizInfo[i][bY], BizInfo[i][bZ]))
		{
            if(PlayerInfo[playerid][pBusiness] == i || BizInfo[i][bStatus] == 1)
			{
			    if(GetPlayerCash(playerid) >= BizInfo[i][bBizFee])
				{
					GivePlayerCash(playerid, - BizInfo[i][bBizFee]);
	    			BizInfo[i][bMoney] += BizInfo[i][bBizFee];
				    if(PlayerInfo[playerid][pBusiness] == i)
				    {
				        if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "* Stranger entered their business."); }
				        else { format(string, sizeof(string), "* %s has entered their business.", GetPlayerNameEx(playerid)); }
						ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				    }
				    else
				    {
				        if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "* Stranger entered %s's business.", BizInfo[i][bOwner]); }
				        else { format(string, sizeof(string), "* %s has entered their business.", GetPlayerNameEx(playerid), BizInfo[i][bOwner]); }
						ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					}
	                SetPlayerInterior(playerid,BizInfo[i][bBInteriorWorld]);
	                PlayerInfo[playerid][pInt] = BizInfo[i][bBInteriorWorld];
	                PlayerInfo[playerid][pVW] = i+100;
	                SetPlayerVirtualWorld(playerid, i+100);
	                PlayerInfo[playerid][InBusiness] = i;
     				if(BizInfo[i][bCustomInterior] == 1)
					{
	                    LoadObjectsForPlayer(playerid);
	                }
	                SetPlayerPos(playerid,BizInfo[i][bInteriorX],BizInfo[i][bInteriorY],BizInfo[i][bInteriorZ]);
	                SetPlayerFacingAngle(playerid,BizInfo[i][bInteriorA]);
	                SetCameraBehindPlayer(playerid);
	                if(PlayerInfo[playerid][pBusiness] == i)
	                {
	                	GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
				 	}
				 	if(BizInfo[i][bType] > 2 && BizInfo[i][bType] != 5)
					{
	   					SendClientMessage(playerid,COLOR_WHITE,"   Use /buy to purchase something from this business !");
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GRAD1, " You don't have cash for that Business Entrance Fee");
				}
				Streamer_UpdateEx(playerid, BizInfo[i][bInteriorX],BizInfo[i][bInteriorY],BizInfo[i][bInteriorZ]);
            }
            else
			{
                GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
            }
            return 1;
        }
    }
    new i = IsPlayerNearGarage(playerid);
    if(IsPlayerInRangeOfPoint(playerid, 5.5, GarageInfo[i][GarageEnterX], GarageInfo[i][GarageEnterY], GarageInfo[i][GarageEnterZ]))
  	{
  	    new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
	    new intoset, vehicleid;
		if(i == -1) return SendClientMessage(playerid, COLOR_GREY, "    You are not near a garage.");
		if(GarageInfo[i][GarageSize] == 1) { intoset = 2; }
		if(GarageInfo[i][GarageSize] == 2) { intoset = 3; }
	 	if(GarageInfo[i][GarageSize] == 3) { intoset = 1; }
	 	if(GarageInfo[i][GarageLocked]) return SendClientMessage(playerid, COLOR_GREY, "This garage is locked.");
  	    if(GetPlayerState(playerid) == 2)
    	{
			vehicleid = GetPlayerVehicleID(playerid);
			SetVehiclePos(vehicleid, GarageInfo[i][GarageInsideX], GarageInfo[i][GarageInsideY], GarageInfo[i][GarageInsideZ] + 0.4);
			SetVehicleZAngle(vehicleid, GarageInfo[i][GarageInsideA]);
			SetVehicleWorld(vehicleid, i);
   			SetVehicleInterior(vehicleid, intoset);
			foreach(Player, j)
			{
   				if(IsPlayerInVehicle(j, vehicleid))
		    	{
       				InCar[j] = vehicleid;
			        Seat[j] = GetPlayerVehicleSeat(j);
			        SetPlayerInterior(j, intoset);
					SetPlayerVirtualWorld(j, i);
					SetPVarInt(j, "InGarage", 1);
				}
			}
		}
 		SetPlayerPosEx(playerid, GarageInfo[i][GarageInsideX], GarageInfo[i][GarageInsideY], GarageInfo[i][GarageInsideZ]);
		SetPlayerFacingAngle(playerid, GarageInfo[i][GarageInsideA]);
		SetPlayerInterior(playerid, intoset);
		SetPlayerVirtualWorld(playerid, i);
		if (vehicleid != 0)
		{
  			foreach(Player, j)
			{
   				if (InCar[j] == 0) continue;
			    if (InCar[j] == vehicleid)
			    {
					PutPlayerInVehicle(j, vehicleid, Seat[j]);
				}
			}
		}
		SetPVarInt(playerid, "InGarage", 1);
		return Streamer_UpdateEx(playerid, GarageInfo[i][GarageInsideX], GarageInfo[i][GarageInsideY], GarageInfo[i][GarageInsideZ]);
	}
    // Hitman HQ
    else if(IsPlayerInRangeOfPoint(playerid, 2.0,  1938.545898, 165.629531, 37.281250))
	{
        if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
		{
            SetPlayerVirtualWorld(playerid, 666420);
            PlayerInfo[playerid][pVW] = 666420;
            SetPlayerInterior(playerid, 42);
            PlayerInfo[playerid][pInt] = 42;
            SetPlayerPos(playerid, 1277.019165, -758.428771, 5080.750000);
            SetPlayerFacingAngle(playerid, 358.16);
            SetCameraBehindPlayer(playerid);

    		LoadObjectsForPlayer(playerid);
   			SendClientMessage(playerid, COLOR_WHITE, "You can /order weaponry in the armory room.");
        }
    }

    // The Lubu Gentlemen's Club
    else if(IsPlayerInRangeOfPoint(playerid, 3.0,  511.817230, -1510.971679, 14.566996))
	{
		format(string, sizeof(string), "* %s has entered The Lubu Gentlemen's Club.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

 		SetPlayerVirtualWorld(playerid, 373737);
   		PlayerInfo[playerid][pVW] = 373737;
     	SetPlayerInterior(playerid, 37);
      	PlayerInfo[playerid][pInt] = 37;
       	SetPlayerPos(playerid, -1077.946533, 613.206665, 1116.507812);
        SetPlayerFacingAngle(playerid, 92.42);
        SetCameraBehindPlayer(playerid);

		LoadObjectsForPlayer(playerid);

    }

    // The Tableau Club
    else if(IsPlayerInRangeOfPoint(playerid, 3.0,  561.802795, -1506.722412, 14.548986))
	{
		format(string, sizeof(string), "* %s has entered The Tableau Club.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

 		SetPlayerVirtualWorld(playerid, 363636);
   		PlayerInfo[playerid][pVW] = 363636;
     	SetPlayerInterior(playerid, 36);
      	PlayerInfo[playerid][pInt] = 36;
       	SetPlayerPos(playerid, 308.045654, 1053.886840, 1098.540039);
        SetPlayerFacingAngle(playerid, 267.57);
        SetCameraBehindPlayer(playerid);

		LoadObjectsForPlayer(playerid);

    }

    // The Tableau Club (VIP ROOM)
    else if(IsPlayerInRangeOfPoint(playerid, 3.0,  307.904296, 1025.602294, 1098.540039))
	{
	    if(GetPlayerCash(playerid) >= 100)
	    {
			format(string, sizeof(string), "* %s has entered The Tableau VIP Room.", GetPlayerNameEx(playerid));
			ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

			GivePlayerCash(playerid, -100);
			GameTextForPlayer(playerid, "~r~-$100", 3000, 1);

 			SetPlayerVirtualWorld(playerid, 363636);
   			PlayerInfo[playerid][pVW] = 363636;
     		SetPlayerInterior(playerid, 36);
      		PlayerInfo[playerid][pInt] = 36;
       		SetPlayerPos(playerid, 293.066436, 1029.785278, 1104.560058);
        	SetPlayerFacingAngle(playerid, 352.47);
        	SetCameraBehindPlayer(playerid);
		 }
		 else
		 {
		    SendClientMessage(playerid, COLOR_GREY, " You do not have the cash for that.");
		 }
    }

    // Santa Maria Surfer's Lounge
    else if(IsPlayerInRangeOfPoint(playerid, 3.0,  387.958374, -1870.688110, 7.835937))
	{
		format(string, sizeof(string), "* %s has entered Santa Maria Surfer's Lounge.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

 		SetPlayerVirtualWorld(playerid, 353535);
   		PlayerInfo[playerid][pVW] = 353535;
     	SetPlayerInterior(playerid, 35);
      	PlayerInfo[playerid][pInt] = 35;
       	SetPlayerPos(playerid, 271.742034, 1074.419677, 5096.750000);
        SetPlayerFacingAngle(playerid, 86.54);
        SetCameraBehindPlayer(playerid);

		LoadObjectsForPlayer(playerid);

    }

	new vehicleid = GetPlayerVehicleID(playerid);
	new closestcar = GetClosestCar(playerid, vehicleid);
	if(IsPlayerInRangeOfVehicle(playerid, closestcar, 6.0) && GetVehicleModel(closestcar) == 519)
	{
	    if(VehicleStatus{closestcar} == 1) return SendClientMessage(playerid, COLOR_WHITE, "You're not allowed to enter this Shamal as it's been damaged!");
   		format(string, sizeof(string), "* %s enters the Shamal airplane as a passenger.", GetPlayerNameEx(playerid));
		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     	SetPlayerPos(playerid, 2.509036, 23.118730, 1199.593750);
     	SetPlayerFacingAngle(playerid, 82.14);
        SetCameraBehindPlayer(playerid);
		PlayerInfo[playerid][pVW] = closestcar;
		SetPlayerVirtualWorld(playerid, closestcar);
		PlayerInfo[playerid][pInt] = 1;
        SetPlayerInterior(playerid, 1);
		InsideShamal[playerid] = closestcar;
		SendClientMessage(playerid, COLOR_WHITE, "Type /exit near the door to exit the vehicle, or /window to look outside.");

	}
    return 1;
}

forward SendToExit(playerid);
public SendToExit(playerid)
{
    if(GetPVarInt(playerid, "PBM") > 0) {
        SendClientMessage(playerid, COLOR_WHITE, "You can't do this while being in a arena!");
        return 1;
    }
    if(PlayerInfo[playerid][pJailed] > 0)
	{
        SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");
        return 1;
    }
	if(RobbingBank[playerid])
	{
	    SendClientMessage(playerid, COLOR_WHITE, " You cannot /exit during robbery");
		return 1;
	}
	new string[128];

    for(new i = 0; i <  sizeof(DDoorsInfo); i++) {
        if(IsPlayerInRangeOfPoint(playerid,3,DDoorsInfo[i][ddInteriorX], DDoorsInfo[i][ddInteriorY], DDoorsInfo[i][ddInteriorZ]) && PlayerInfo[playerid][pVW] == DDoorsInfo[i][ddInteriorVW])
		{
		    if(PlayerInfo[playerid][pMask] == 1) { format(string, sizeof(string), "* Stranger has exited the building %s.",DDoorsInfo[i][ddDescription]); }
			else { format(string, sizeof(string), "* %s has exited the building %s.", GetPlayerNameEx(playerid), DDoorsInfo[i][ddDescription]); }
			ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

            SetPlayerInterior(playerid,DDoorsInfo[i][ddExteriorInt]);
            PlayerInfo[playerid][pInt] = DDoorsInfo[i][ddExteriorInt];
            SetPlayerVirtualWorld(playerid, DDoorsInfo[i][ddExteriorVW]);
            PlayerInfo[playerid][pVW] = DDoorsInfo[i][ddExteriorVW];
            if(DDoorsInfo[i][ddCustomExterior]) {
                TogglePlayerControllable(playerid, 0);
                GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
                SetPVarInt(playerid, "LoadingObjects", 1);
                SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
            }
            if(DDoorsInfo[i][ddVehicleAble] > 0 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
                SetVehiclePos(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorX],DDoorsInfo[i][ddExteriorY],DDoorsInfo[i][ddExteriorZ]);
                SetVehicleZAngle(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorA]);
                SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorVW]);
                LinkVehicleToInterior(GetPlayerVehicleID(playerid), DDoorsInfo[i][ddExteriorInt]);
            }
            else {
                SetPlayerPos(playerid,DDoorsInfo[i][ddExteriorX],DDoorsInfo[i][ddExteriorY],DDoorsInfo[i][ddExteriorZ]);
                SetPlayerFacingAngle(playerid, DDoorsInfo[i][ddExteriorA]);
                SetCameraBehindPlayer(playerid);
            }
            return Streamer_UpdateEx(playerid, DDoorsInfo[i][ddInteriorX],DDoorsInfo[i][ddInteriorY],DDoorsInfo[i][ddInteriorZ]);
        }
    }
    for(new i = 0; i <  sizeof(HouseInfo); i++) {
        if (IsPlayerInRangeOfPoint(playerid,3,HouseInfo[i][hInteriorX], HouseInfo[i][hInteriorY], HouseInfo[i][hInteriorZ]) && PlayerInfo[playerid][pVW] == i+6000) {
   			SetPlayerInterior(playerid,0);
            PlayerInfo[playerid][pInt] = 0;
            PlayerInfo[playerid][pLocal] = 255;
            if(HouseInfo[i][hCustomExterior]) {
                TogglePlayerControllable(playerid, 0);
                GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
                SetPVarInt(playerid, "LoadingObjects", 1);
                SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
            }
            SetPlayerPos(playerid,HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
            SetPlayerFacingAngle(playerid, HouseInfo[i][hExteriorA]);
            SetCameraBehindPlayer(playerid);
            SetPlayerVirtualWorld(playerid, 0);
            PlayerInfo[playerid][pVW] = 0;
            PlayerInfo[playerid][pEntered] --;
			OnPlayerStatsUpdate(playerid);
            return Streamer_UpdateEx(playerid, HouseInfo[i][hExteriorX],HouseInfo[i][hExteriorY],HouseInfo[i][hExteriorZ]);
        }
    }
    for(new i = 0; i <  sizeof(BizInfo); i++) {
        if(IsPlayerInRangeOfPoint(playerid,3,BizInfo[i][bInteriorX], BizInfo[i][bInteriorY], BizInfo[i][bInteriorZ]) && PlayerInfo[playerid][pVW] == i+100)
		{
		    if(PlayerInfo[playerid][InBusiness] != 0)
      		{
			    if(PlayerInfo[playerid][pMask] == 1) { format(string,sizeof(string), "* Stranger exited the business."); }
			    else { format(string, sizeof(string), "* %s has exited the business.", GetPlayerNameEx(playerid)); }
				ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				SetPlayerInterior(playerid,0);
	            PlayerInfo[playerid][pInt] = 0;
	            if(BizInfo[i][bCustomExterior]) {
                   TogglePlayerControllable(playerid, 0);
                   GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
                   SetPVarInt(playerid, "LoadingObjects", 1);
                   SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
                }
	            SetPlayerPos(playerid,BizInfo[PlayerInfo[playerid][InBusiness]][bX],BizInfo[PlayerInfo[playerid][InBusiness]][bY],BizInfo[PlayerInfo[playerid][InBusiness]][bZ]);
	            SetCameraBehindPlayer(playerid);
	            SetPlayerVirtualWorld(playerid, 0);
	            PlayerInfo[playerid][pVW] = 0;
	            PlayerInfo[playerid][InBusiness] = 0;
            	return Streamer_UpdateEx(playerid, BizInfo[i][bX],BizInfo[i][bY],BizInfo[i][bZ]);
            }
    		else
      		{
       			SetPlayerVirtualWorld(playerid, 0);
	        	SetPlayerInterior(playerid, 0);
		        SetPlayerPos(playerid, BizInfo[PlayerInfo[playerid][InBusiness]][bX], BizInfo[PlayerInfo[playerid][InBusiness]][bY], BizInfo[PlayerInfo[playerid][InBusiness]][bZ]);
 	        }
        }
    }
    new i = GetPlayerVirtualWorld(playerid);
    if(IsPlayerInRangeOfPoint(playerid, 30.0, GarageInfo[i][GarageInsideX], GarageInfo[i][GarageInsideY], GarageInfo[i][GarageInsideZ]) && GetPlayerVirtualWorld(playerid) == i)
  	{
  	    new Seat[MAX_PLAYERS], InCar[MAX_PLAYERS];
	    new vehicleid;
		if(i == 0) return SendClientMessage(playerid, COLOR_GREY, "    You are not inside a garage.");
		if(GarageInfo[i][GarageLocked]) return SendClientMessage(playerid, COLOR_GREY, "    You've been locked inside the garage, tough luck.");
		if(GetPlayerState(playerid) == 2)
     	{
			vehicleid = GetPlayerVehicleID(playerid);
			foreach(Player, j)
			{
   				if(IsPlayerInVehicle(j, vehicleid))
			    {
       				InCar[j] = vehicleid;
			        Seat[j] = GetPlayerVehicleSeat(playerid);
			        SetPlayerInterior(j, 0);
					SetPlayerVirtualWorld(j, 0);
					SetPVarInt(j, "InGarage", 0);
				}
			}
   			SetVehiclePos(vehicleid, GarageInfo[i][GarageExitX], GarageInfo[i][GarageExitY], GarageInfo[i][GarageExitZ]);
      		SetVehicleZAngle(vehicleid, GarageInfo[i][GarageExitA]);
        	SetVehicleWorld(vehicleid, 0);
         	SetVehicleInterior(vehicleid, 0);
		}
		SetPlayerPosEx(playerid, GarageInfo[i][GarageExitX], GarageInfo[i][GarageExitY], GarageInfo[i][GarageExitZ]);
		SetPlayerFacingAngle(playerid, GarageInfo[i][GarageExitA]);
		SetPlayerInterior(playerid, 0);
		SetPlayerVirtualWorld(playerid, 0);
		if (vehicleid != 0)
		{
  			foreach(Player, j)
			{
   				if (InCar[j] == 0) continue;
			    if (InCar[j] == vehicleid)
			    {
					PutPlayerInVehicle(j, vehicleid, Seat[j]);
				}
			}
			PutPlayerInVehicle(playerid, vehicleid, 0);
		}
		SetPVarInt(playerid, "InGarage", 0);
		return Streamer_UpdateEx(playerid, GarageInfo[i][GarageExitX], GarageInfo[i][GarageExitY], GarageInfo[i][GarageExitZ]);
	}
    // Hitman HQ
    else if(IsPlayerInRangeOfPoint(playerid, 2.0, 1277.019165, -758.428771, 5080.750000) && (GetPlayerVirtualWorld(playerid) == 666420))
	{
        if(PlayerInfo[playerid][pFaction] == 4 || PlayerInfo[playerid][pLeader] == 4)
		{
            SetPlayerVirtualWorld(playerid, 0);
            PlayerInfo[playerid][pVW] = 0;
            SetPlayerInterior(playerid, 0);
            PlayerInfo[playerid][pInt] = 0;
            SetPlayerPos(playerid, 1938.545898, 165.629531, 37.281250);
            SetPlayerFacingAngle(playerid, 338.54);
            SetCameraBehindPlayer(playerid);
        }
    }

    // The Lubu Gentlemen's Club
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, -1077.946533, 613.206665, 1116.507812) && (GetPlayerVirtualWorld(playerid) == 373737))
	{
		format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

		SetPlayerVirtualWorld(playerid, 0);
   		PlayerInfo[playerid][pVW] = 0;
     	SetPlayerInterior(playerid, 0);
      	PlayerInfo[playerid][pInt] = 0;
      	SetPlayerPos(playerid, 511.817230, -1510.971679, 14.566996);
       	SetPlayerFacingAngle(playerid, 272.11);
       	SetCameraBehindPlayer(playerid);

    }

    // The Tableau Club
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 308.045654, 1053.886840, 1098.540039) && (GetPlayerVirtualWorld(playerid) == 363636))
	{
		format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

		SetPlayerVirtualWorld(playerid, 0);
   		PlayerInfo[playerid][pVW] = 0;
     	SetPlayerInterior(playerid, 0);
      	PlayerInfo[playerid][pInt] = 0;
      	SetPlayerPos(playerid, 561.802795, -1506.722412, 14.548986);
       	SetPlayerFacingAngle(playerid, 86.78);
       	SetCameraBehindPlayer(playerid);

    }
    // The Tableau Club (VIP ROOM)
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 293.066436, 1029.785278, 1104.560058) && (GetPlayerVirtualWorld(playerid) == 363636))
	{
 		SetPlayerVirtualWorld(playerid, 363636);
   		PlayerInfo[playerid][pVW] = 363636;
     	SetPlayerInterior(playerid, 36);
      	PlayerInfo[playerid][pInt] = 36;
      	SetPlayerPos(playerid, 307.904296, 1025.602294, 1098.540039);
       	SetPlayerFacingAngle(playerid, 264.06);
       	SetCameraBehindPlayer(playerid);
    }
    // Santa Maria Surfer's Lounge
    else if(IsPlayerInRangeOfPoint(playerid, 3.0, 271.742034, 1074.419677, 5096.750000) && (GetPlayerVirtualWorld(playerid) == 353535))
	{
		format(string, sizeof(string), "* %s has exited the building.", GetPlayerNameEx(playerid));
		ProxDetector(25.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

		SetPlayerVirtualWorld(playerid, 0);
   		PlayerInfo[playerid][pVW] = 0;
     	SetPlayerInterior(playerid, 0);
      	PlayerInfo[playerid][pInt] = 0;
      	SetPlayerPos(playerid, 387.958374, -1870.688110, 7.835937);
       	SetPlayerFacingAngle(playerid, 89.99);
       	SetCameraBehindPlayer(playerid);

    }
    // Shamal
    else if(InsideShamal[playerid] != INVALID_VEHICLE_ID && IsPlayerInRangeOfPoint(playerid,3,2.509036, 23.118730, 1199.593750))
	{
        format(string, sizeof(string), "* %s exits the Shamal airplane.", GetPlayerNameEx(playerid));
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);

        if(InsideShamal[playerid] == INVALID_VEHICLE_ID || GetVehicleModel(InsideShamal[playerid]) != 519) {
            PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
            GivePlayerValidWeapon(playerid, 46, 60000);
            SetPlayerPos(playerid, 0.000000, 0.000000, 420.000000);
        }
        else {
            new Float:X, Float:Y, Float:Z;
            GetVehiclePos(InsideShamal[playerid], X, Y, Z);
            SetPlayerPos(playerid, X-4, Y-2.3, Z);

            new Float:XB, Float:YB, Float:ZB;
            GetVehiclePos(InsideShamal[playerid], XB, YB, ZB);
            if(ZB > 50.0) {
                PlayerInfo[playerid][pAGuns][GetWeaponSlot(46)] = 46;
                GivePlayerValidWeapon(playerid, 46, 60000);
            }
        }

        PlayerInfo[playerid][pVW] = 0;
        SetPlayerVirtualWorld(playerid, 0);
        PlayerInfo[playerid][pInt] = 0;
        SetPlayerInterior(playerid, 0);
        InsideShamal[playerid] = INVALID_VEHICLE_ID;
    }
    return 1;
}
Код:
if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
            SendToEnter(playerid);
            SendToExit(playerid);
        }
    }
it should be when you press "F" while you are inside an interior house/door/business etc, you will go outside (exterior of the interior) but it's not working -,-
Reply


Messages In This Thread
F = enter/exit interior/exterior - by lwilson - 20.01.2015, 05:09
Re: F = enter/exit interior/exterior - by Crayder - 20.01.2015, 05:25
Re: F = enter/exit interior/exterior - by lwilson - 20.01.2015, 11:20
Re: F = enter/exit interior/exterior - by lwilson - 20.01.2015, 11:24

Forum Jump:


Users browsing this thread: 1 Guest(s)