Interiors not loading quick enough/ fall through floor
#7

Quote:
Originally Posted by Spydah
Посмотреть сообщение
pawn Код:
if (newkeys & KEY_SECONDARY_ATTACK)
    {
        if(InModShop[playerid] == 1)
        {
            if (newkeys & KEY_SECONDARY_ATTACK) return 0;
            TogglePlayerControllable(playerid, 0);
        }
        if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            RemoveDriverFromVehicle(playerid);
            if(engine[GetPlayerVehicleID(playerid)] == 0)
            {
                RemoveDriverFromVehicle(playerid);
                if(PlayerInfo[playerid][pCarlic] == 0)
                {
                    SetPlayerDrunkLevel (playerid, 0);
                }
            }
        }
        if (PlayerToPoint(0.5, playerid,340.3497,169.3933,1019.9912))
        {
            SetPlayerPos(playerid, 340.2886,167.8946,1019.9912);
        }
        if (PlayerToPoint(0.5, playerid,340.2886,167.8946,1019.9912))
        {
            SetPlayerPos(playerid, 340.3497,169.3933,1019.9912);
        }
        for(new i = 0; i < sizeof(BuildingInfo); i++)
        {
            if (PlayerToPoint(2.0, playerid,BuildingInfo[i][bEnterX], BuildingInfo[i][bEnterY], BuildingInfo[i][bEnterZ]))
            SetTimer("businessenter", 1000, false);
            {
                if(IsPlayerInAnyVehicle(playerid))
                {
                    return 0;
                }
                SetPlayerInterior(playerid, BuildingInfo[i][ExitInterior]);
                SetPlayerPos(playerid, BuildingInfo[i][bExitX], BuildingInfo[i][bExitY], BuildingInfo[i][bExitZ]);
                if(drink[playerid] == 1)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 23);
                }
                if(drink[playerid] == 2)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 20);
                }
                if(drink[playerid] == 3)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 22);
                }
                if(drink[playerid] == 4)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
                }
            }
            else if (PlayerToPoint(2.0, playerid,BuildingInfo[i][bExitX], BuildingInfo[i][bExitY], BuildingInfo[i][bExitZ]))
            {
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, BuildingInfo[i][bEnterX], BuildingInfo[i][bEnterY], BuildingInfo[i][bEnterZ]);
                if(drink[playerid] == 1)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 23);
                }
                if(drink[playerid] == 2)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 20);
                }
                if(drink[playerid] == 3)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid, 22);
                }
                if(drink[playerid] == 4)
                {
                    SetPlayerSpecialAction(playerid, 0);
                    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
                }
            }
        }
        for(new i = 0; i < sizeof(BusinessInfo); i++)
        {
            if (PlayerToPoint(2.0, playerid,BusinessInfo[i][bEnterX], BusinessInfo[i][bEnterY], BusinessInfo[i][bEnterZ]))
            {
                if(BusinessInfo[i][bOwned] == 0 && AdminDuty[playerid] == 0)
                {
                    GameTextForPlayer(playerid, "~>~~r~Locked Business~<~", 3000, 4);
                    return 1;
                }
                if(BusinessInfo[i][bLocked] == 1 && PlayerInfo[playerid][pBiz1] != i)
                {
                    GameTextForPlayer(playerid, "~>~~r~Locked~<~", 3000, 4);
                    return 1;
                }
                if(BusinessInfo[i][bLocked] == 1 && PlayerInfo[playerid][pBiz2] != i)
                {
                    GameTextForPlayer(playerid, "~>~~r~Locked~<~", 3000, 4);
                    return 1;
                }
                if(IsPlayerInAnyVehicle(playerid))
                {
                    return 0;
                }
                SetPlayerVirtualWorld(playerid, i);
                SetPlayerInterior(playerid, BusinessInfo[i][EnterInterior]);
                SetPlayerPos(playerid, BusinessInfo[i][bExitX], BusinessInfo[i][bExitY], BusinessInfo[i][bExitZ]);
                if(PlayerInfo[playerid][pBiz1] == i || PlayerInfo[playerid][pBiz2] == i && BusinessInfo[i][bLocked] == 1)
                {
                    if(GetPlayerVirtualWorld(playerid) == BusinessInfo[i][EnterWorld])
                    {
                        SetPlayerVirtualWorld(playerid, i);
                        SetPlayerInterior(playerid, BusinessInfo[i][EnterInterior]);
                        SetPlayerPos(playerid, BusinessInfo[i][bExitX], BusinessInfo[i][bExitY], BusinessInfo[i][bExitZ]);
                        if(drink[playerid] == 1)
                        {
                            SetPlayerSpecialAction(playerid, 0);
                            SetPlayerSpecialAction(playerid, 23);
                        }
                        if(drink[playerid] == 2)
                        {
                            SetPlayerSpecialAction(playerid, 0);
                            SetPlayerSpecialAction(playerid, 20);
                        }
                        if(drink[playerid] == 3)
                        {
                            SetPlayerSpecialAction(playerid, 0);
                            SetPlayerSpecialAction(playerid, 22);
                        }
                        if(drink[playerid] == 4)
                        {
                            SetPlayerSpecialAction(playerid, 0);
                            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
                        }
                    }
                }
            }
            else if (PlayerToPoint(2.0, playerid,BusinessInfo[i][bExitX], BusinessInfo[i][bExitY], BusinessInfo[i][bExitZ]))
            {
                if(GetPlayerVirtualWorld(playerid) == i)
                {
                    SetPlayerVirtualWorld(playerid, 0);
                    SetPlayerInterior(playerid, 0);
                    SetPlayerPos(playerid, BusinessInfo[i][bEnterX], BusinessInfo[i][bEnterY], BusinessInfo[i][bEnterZ]);
                    if(drink[playerid] == 1)
                    {
                        SetPlayerSpecialAction(playerid, 0);
                        SetPlayerSpecialAction(playerid, 23);
                    }
                    if(drink[playerid] == 2)
                    {
                        SetPlayerSpecialAction(playerid, 0);
                        SetPlayerSpecialAction(playerid, 20);
                    }
                    if(drink[playerid] == 3)
                    {
                        SetPlayerSpecialAction(playerid, 0);
                        SetPlayerSpecialAction(playerid, 22);
                    }
                    if(drink[playerid] == 4)
                    {
                        SetPlayerSpecialAction(playerid, 0);
                        SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
                    }
                }
            }
        }
    }
pawn Код:
forward businessenter();
Try this.
Oh hey you wrote it for me lol, didn't expect you to do that lol. Did you write it for both? There is building enter/exit and also Business enter/exit too. I only see the timer you set on entering a building.

EDIT: Also doesn't this just set a timer and nothing else? What will that timer do?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)