Help!!
#1

I'm making a dynamic entrance system, it spawns, saves fine, but at my /enter command, they all work until a server restart, and then the one i last made only works.

here is my /enter code.

pawn Код:
for(new i = 0; i < sizeof(Entrances); i++)
            {
                if(IsPlayerInRangeOfPoint(playerid, 3, Entrances[i][tEntranceX], Entrances[i][tEntranceY], Entrances[i][tEntranceZ]))
                {
                    if(Entrances[i][tFaction] == 0)
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == 1337 && PlayerInfo[playerid][pAdmin] > 0)
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == 100 && IsACop(playerid))
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == PlayerInfo[playerid][pMember])
                    {
                    if(Entrances[i][tFaction] == PlayerInfo[playerid][pLeader])
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    }
                }
            }
Reply
#2

Oh, and my entrances are saved like this:

Entrances/Entrance_(ID).ini

So, i think it's a problem, it only uses the highest Entrance_ID .. how can i fix it so it uses all of them?
Reply
#3

Show us the code where you are loading them please.
Reply
#4

Use else if and not if
Reply
#5

pawn Код:
stock InitEntrances()
{
    new FileName[128];
    for(new i = 0; i < MAX_ENTRANCES; i++)
    {
        format(FileName, sizeof(FileName), "Entrances/Entrance_%d.ini", i);
        if(fexist(FileName))
        {
            Entrances[i][tEntranceX] = dini_Float(FileName, "EntranceX");
            Entrances[i][tEntranceY] = dini_Float(FileName, "EntranceY");
            Entrances[i][tEntranceZ] = dini_Float(FileName, "EntranceZ");
            Entrances[i][tExitX] = dini_Float(FileName, "ExitX");
            Entrances[i][tExitY] = dini_Float(FileName, "ExitY");
            Entrances[i][tExitZ] = dini_Float(FileName, "ExitZ");
            Entrances[i][tEntranceInt] = dini_Int(FileName, "EntranceInt");
            Entrances[i][tExitInt] = dini_Int(FileName, "ExitInt");

            Entrances[i][tFaction] = dini_Int(FileName, "Faction");
            Entrances[i][tPickupID] = dini_Int(FileName, "PickupID");

            Entrances[i][tPickupID] = CreatePickup(1239, 23, Entrances[i][tEntranceX], Entrances[i][tEntranceY], Entrances[i][tEntranceZ]);
            printf("[system] Entrance %d spawned.", i);
            SpawnedEntrances++;
       }
    }
    return 1;
}
Reply
#6

And here is my saving function:

pawn Код:
stock SaveEntrance(i)
{
    new FileName[128];
    format(FileName, sizeof(FileName), "Entrances/Entrance_%d.ini", i);
    if(fexist(FileName))
    {
        dini_FloatSet(FileName, "EntranceX", Entrances[i][tEntranceX]);
        dini_FloatSet(FileName, "EntranceY", Entrances[i][tEntranceY]);
        dini_FloatSet(FileName, "EntranceZ", Entrances[i][tEntranceZ]);
        dini_FloatSet(FileName, "ExitX", Entrances[i][tExitX]);
        dini_FloatSet(FileName, "ExitY", Entrances[i][tExitY]);
        dini_FloatSet(FileName, "ExitZ", Entrances[i][tExitZ]);
        dini_IntSet(FileName, "EntranceInt", Entrances[i][tEntranceInt]);
        dini_IntSet(FileName, "ExitInt", Entrances[i][tExitInt]);
       
        dini_IntSet(FileName, "Faction", Entrances[i][tFaction]);
        dini_IntSet(FileName, "PickupID", Entrances[i][tPickupID]);
        printf("[system] Business %d saved.", i);
    }
    else
    {
        printf("[system] Failed to save business %d.", i);
    }
    return 1;
}
Reply
#7

It does show '[system] Entrance %d spawned.' in the server_log file?
Reply
#8

Yes,
Код:
[12:02:49] [system] Business 1 spawned.
[12:02:49] [system] Entrance 1 spawned.
[12:02:49] [system] Entrance 2 spawned.
[12:02:49] [system] Entrance 3 spawned.
[12:02:49] [system] Entrance 4 spawned.
[12:02:49] [system] Entrance 5 spawned.
The pickup's and everything spawn, but just when i /enter it says 'SERVER:UNKNOWN COMMAND'. But when i /enter Entrance_5 (The most recently made one), it works.


!
Reply
#9

Could you show your whole /enter command then?
Reply
#10

It's massive .. but ok

pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new Float:shax, Float:shay, Float:shaz;
            new Float:shbx, Float:shby, Float:shbz;
            new Float:shcx, Float:shcy, Float:shcz;
            GetVehiclePos(EnterableShamals[0], shax, shay, shaz);
            GetVehiclePos(EnterableShamals[1], shbx, shby, shbz);
            GetVehiclePos(EnterableShamals[2], shcx, shcy, shcz);
            //foreach(Player, i)
            for(new i; i<MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][pHouseAccepted] > 0)
                {
                    if(IsPlayerInRangeOfPoint(playerid, 3, PlayerInfo[i][pHouseX], PlayerInfo[i][pHouseY], PlayerInfo[i][pHouseZ]))
                    {
                        if(PlayerInfo[i][pHouseLocked] == 0)
                        {
                            GetPlayerPos(playerid,PlayerInfo[playerid][pHouseExitX],PlayerInfo[playerid][pHouseExitY],PlayerInfo[playerid][pHouseExitZ]);
                            GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pHouseExitR]);
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            if(PlayerInfo[playerid][pMask] == 1)
                            {
                                format(string, sizeof(string), "* Stanger has entered the house.");
                            }
                            else
                            {
                                format(string, sizeof(string), "* %s has entered the house.", sendername);
                            }
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            SetPlayerVirtualWorld(playerid, i);
                            PutPlayerInHouse(playerid, PlayerInfo[i][pHouseLevel]);
                            PlayerInfo[playerid][pLocal] = i;
                            PlayerInfo[playerid][pVirtualWorld] = i;
                            //alarm
                            if(PlayerInfo[i][hAlarmSystem] == 1 && PlayerInfo[i][hAlarmNumber] != 0 && AlarmOnline[i] == 0)
                            {
                                //foreach(Player, a)
                                for(new a = a; a <MAX_PLAYERS; a++)
                                {
                                    if(IsPlayerConnected(a))
                                    {
                                        if(PlayerInfo[a][pPnumber] == PlayerInfo[i][hAlarmNumber])
                                        {
                                            GetPlayerName(i, giveplayer, sizeof(giveplayer));
                                            format(string, sizeof(string), "SMS: This is an automated message informing you that registrant %s's house alarm has been activated.",giveplayer);
                                            SendClientMessage(a, COLOR_YELLOW, string);
                                        }
                                    }
                                }
                            }
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_GREY, "   That house is currently locked !");
                        }
                        return 1;
                    }
                }
            }
            for(new i = 0; i < sizeof(Entrances); i++)
            {
                if(IsPlayerInRangeOfPoint(playerid, 3, Entrances[i][tEntranceX], Entrances[i][tEntranceY], Entrances[i][tEntranceZ]))
                {
                    if(Entrances[i][tFaction] == 0)
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == 1337 && PlayerInfo[playerid][pAdmin] > 0)
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == 100 && IsACop(playerid))
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    if(Entrances[i][tFaction] == PlayerInfo[playerid][pMember])
                    {
                    if(Entrances[i][tFaction] == PlayerInfo[playerid][pLeader])
                    {
                         SetPlayerInterior(playerid,Entrances[i][tExitInt]);
                         SetPlayerPos(playerid,Entrances[i][tExitX],Entrances[i][tExitY],Entrances[i][tExitZ]);
                         PlayerInfo[playerid][pInt] = Entrances[i][tExitInt];
                         return 1;
                    }
                    }
                }
            }
            for(new i = 0; i < sizeof(BizzInfo); i++)
            {
                if(IsPlayerInRangeOfPoint(playerid, 3, BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
                {
                    if(i == 0)
                    {
                        PaintballPlayers ++;
                        PlayerPaintballing[playerid] = 1;
                        new rand = random(sizeof(PaintballSpawns));
                        SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
                        SetCameraBehindPlayer(playerid);
                        TogglePlayerControllable(playerid, 0);
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPbiskey] != i)
                    {
                        if(BizzInfo[i][bLocked] == 1)
                        {
                            GameTextForPlayer(playerid, "~r~Closed", 5000, 1);
                            return 1;
                        }
                        if(BizzInfo[i][bProducts] == 0)
                        {
                            GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1);
                            return 1;
                        }
                        GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
                        format(string, sizeof(string), "~r~-$%d~n~~w~type /exit~n~to get out", BizzInfo[i][bEntranceCost]);
                        BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
                        ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
                        GameTextForPlayer(playerid, string, 5000, 3);
                    }
                    SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
                    SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
                    PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
                    return 1;
                }
            }
            if(IsPlayerInRangeOfPoint(playerid,3.0,681.5620,-474.2185,16.5363)) //Outlaws HQ
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 678.2614,-464.6447,-25.6172);
                SetPlayerFacingAngle( playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~The Welcome Pump", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,1654.1302,-1655.0974,22.5156)) //Lombardo Brotherhood
            {
                SetPlayerVirtualWorld(playerid, 101);
                SetPlayerInterior(playerid,3);
                SetPlayerPos(playerid,385.2311,173.8202,1008.3828);
                GameTextForPlayer(playerid, "~w~Lombardo Brotherhood", 5000, 1);
            }
            /*else if(IsPlayerInRangeOfPoint(playerid,8.0,1462.5475,-1012.7440,26.8438)) //Bank
            {
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,2305.5840,-16.0986,26.7496);
                GameTextForPlayer(playerid, "~w~Bank", 5000, 1);
            }*/

            else if(IsPlayerInRangeOfPoint(playerid,8.0,1462.5475,-1012.7440,26.8438)) // Bank NEW
            {
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid,1415.951171,-988.971191,1639.980224);
                GameTextForPlayer(playerid, "~w~Bank", 5000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,shax,shay,shaz)) //SHAMAL 1
            {
                if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
                else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SetPlayerVirtualWorld(playerid, 1337);
                SetPlayerInterior(playerid,1);
                SetPlayerPos(playerid,2.57, 33.14, 1200);
                GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
                GivePlayerGun(playerid, 46);
            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,shbx,shby,shbz)) //SHAMAL 2
            {
                if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
                else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SetPlayerVirtualWorld(playerid, 1338);
                SetPlayerInterior(playerid,1);
                SetPlayerPos(playerid,2.57, 33.14, 1200);
                GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
                GivePlayerGun(playerid, 46);
            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,shcx,shcy,shcz)) //SHAMAL 3
            {
                if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "* Stanger has entered the shamal.");
                else format(string, sizeof(string), "* %s has entered the shamal.", sendername);
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SetPlayerVirtualWorld(playerid, 1339);
                SetPlayerInterior(playerid,1);
                SetPlayerPos(playerid,2.57, 33.14, 1200);
                GameTextForPlayer(playerid, "~w~Shamal", 5000, 1);
                GivePlayerGun(playerid, 46);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1615.6631,-1782.2772,13.5149)) //Renegade Syndicate
            {
                SetPlayerInterior(playerid, 10);
                SetPlayerPos(playerid, 421.0744,2536.7888,10.0000);
                GameTextForPlayer(playerid, "~w~ Renegade Syndicate", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1620.5050,-1778.2992,13.5420)) //Renegade Syndicate
            {
                SetPlayerInterior(playerid, 10);
                SetPlayerPos(playerid, 413.9558,2536.8728,10.0000);
                GameTextForPlayer(playerid, "~w~ Renegade Syndicate", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1083.0120,-1226.5403,15.8203)) //Shadow Complex
            {
                SetPlayerPos(playerid, 2548.7195,-1294.7968,1060.9844);
                SetPlayerInterior(playerid,2);
                GameTextForPlayer(playerid, "~w~ Shadow Complex HQ", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, 152.3280,1370.0015,1088.3672)) //Yuri's Office
            {
                SetPlayerPos(playerid, 1226.6959,-813.4658,1084.0078);
                SetPlayerInterior(playerid, 5);
                GameTextForPlayer(playerid,"~w~ Yuri Cordozar's Office", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, -49.8882,-267.3596,6.2515)) //SS
            {
                SetPlayerPos(playerid, 2145.3159,1597.3687,1003.9677);
                SetPlayerInterior(playerid, 1);
                GameTextForPlayer(playerid,"~w~ The Secret Society", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, 1270.6495,-1668.1027,19.7344)) //Black Syndicate Triads
            {
                SetPlayerPos(playerid, 2003.9025,1017.7690,994.4688);
                SetPlayerInterior(playerid, 10);
                GameTextForPlayer(playerid,"~w~ Black Syndicate Triads", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 5.0, 134.6600,1379.9559,1088.3672)) //Cordozar
            {
                SetPlayerPos(playerid, 302.180999,300.722991,999.148437);
                SetPlayerInterior(playerid, 4);
                GameTextForPlayer(playerid,"~w~ Cordozar Mafia", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, 2501.7983,-1494.7085,24.0000)) //Coffee Shop
            {
                SetPlayerPos(playerid, -228.0731,1401.1146,27.7656);
                SetPlayerInterior(playerid, 18);
                SetPlayerVirtualWorld(playerid,187);
                GameTextForPlayer(playerid,"~y~ Rodricaz's Coffee Shop", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, 2851.8997,-1365.9199,14.1708)) //CripZZzZzzZ
            {
                SetPlayerPos(playerid, 239.3269,1084.1855,1084.1875);
                SetPlayerInterior(playerid, 6);
                GameTextForPlayer(playerid,"~w~ Long Beach ~b~Crips", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,611.0699,-583.6415,18.1517)) //SASP
            {
                SetPlayerInterior(playerid, 5);
                SetPlayerPos(playerid, 322.2817,303.3415,999.1484);
                SetPlayerFacingAngle( playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~Colonel's Office", 5000, 1);
                PlayerInfo[playerid][pInt] = 5;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1777.4604,-1664.0137,14.4343)) //FBI HQ
            {
                SetPlayerInterior(playerid, 10);
                SetPlayerPos(playerid, 246.40,110.84,1003.22);
                SetPlayerFacingAngle(playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~Federal Bureau ~n~of Investigation", 5000, 1);
                PlayerInfo[playerid][pInt] = 10;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1498.4185,-2182.5278,14.1682)) //FIRE DEPARTMENT ENTERANCE
            {
                SetPlayerInterior(playerid, 3);
                SetPlayerPos(playerid, 368.0984,162.2898,1019.9844);
                PlayerInfo[playerid][pInt] = 3;
                GameTextForPlayer(playerid, "~r~Fire Department~n~~w~Head Quarters", 5000, 1);
                SetPlayerFacingAngle(playerid, 90.0);
                SetCameraBehindPlayer(playerid);
            }
/*          else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1172.6975, -1325.3914, 15.4019)) //HOSPITAL GROUND ENTER (NEW)
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 1199.0801,-1366.3083,1017.8790);
                PlayerInfo[playerid][pInt] = 1;
                GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
                SetPlayerFacingAngle(playerid, 271.3973);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, 1154.5345, -1343.6583, 26.6953)) //HOSPITAL ROOF ENTER (NEW)
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 1216.2145,-1379.2618,1029.4714);
                PlayerInfo[playerid][pInt] = 1;
                GameTextForPlayer(playerid, "~r~All Saints ~n~~w~Medical Center", 5000, 1);
                SetPlayerFacingAngle(playerid, 1.0922);
                SetCameraBehindPlayer(playerid);
            }*/

            else if(IsPlayerInRangeOfPoint(playerid, 3, 1568.6840,-1691.0090,5.8906)) //Garage-LSPD Enterance
            {
                if(IsACop(playerid))
                {
                    SetPlayerInterior(playerid, 6);
                    SetPlayerPos(playerid,246.4211,87.0546,1003.6406);
                    SetCameraBehindPlayer(playerid);
                    GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
                    SetPlayerFacingAngle(playerid, 180.0000);
                    PlayerInfo[playerid][pInt] = 6;
                }
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 1564.8468,-1666.1549,28.3956)) //LSPD Roof-LSPD Enterance
            {
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid,242.7468,66.3155,1003.6406);
                SetCameraBehindPlayer(playerid);
                GameTextForPlayer(playerid, "~w~Los Santos~n~~r~Police Department", 5000, 1);
                SetPlayerFacingAngle(playerid, 270.0);
                PlayerInfo[playerid][pInt] = 6;
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 2494.0515,-1464.7135,24.0254)) //Los Santos Confidential
            {
                SetPlayerPos(playerid,963.7475,-53.2831,1001.1246);
                SetCameraBehindPlayer(playerid);
                GameTextForPlayer(playerid, "~w~Los Santos~n~Confidential", 5000, 1);
                SetPlayerFacingAngle(playerid, 90.0000);
                SetPlayerInterior(playerid, 3);
                PlayerInfo[playerid][pInt] = 3;
                SetPlayerVirtualWorld(playerid, 299);
                PlayerInfo[playerid][pVirtualWorld] = 299;
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 2851.8521,-1365.9674,14.1708)) // Long Beach Crips Crew
            {
                SetPlayerPos(playerid,239.3313,1083.4122,1084.1875);
                SetCameraBehindPlayer(playerid);
                SetPlayerInterior(playerid, 6);
                PlayerInfo[playerid][pInt] = 6;
                SetPlayerVirtualWorld(playerid, 299);
                PlayerInfo[playerid][pVirtualWorld] = 299;
                GameTextForPlayer(playerid, "~w~Long Beach ~n~Crips Crew", 5000, 1);
                SetPlayerFacingAngle(playerid, 180.0000);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 1895.2286,-2021.3555,13.5469)) // Latin Kings
            {
                SetPlayerPos(playerid, 2569.4885,-1301.9822,1044.1250);
                SetCameraBehindPlayer(playerid);
                SetPlayerInterior(playerid, 2);
                PlayerInfo[playerid][pInt] = 2;
                GameTextForPlayer(playerid, "~w~South Side Locotes", 5000, 1);
                SetPlayerFacingAngle(playerid, 90.0000);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 2073.2996,-1583.2520,13.4744)) // Idlewood Rydas
            {
                SetPlayerPos(playerid, 446.7476, 507.4956, 1001.4195);
                SetCameraBehindPlayer(playerid);
                SetPlayerInterior(playerid, 12);
                PlayerInfo[playerid][pInt] = 12;
                SetPlayerVirtualWorld(playerid, 299);
                PlayerInfo[playerid][pVirtualWorld] = 299;
                GameTextForPlayer(playerid, "~w~Idlewood Rydas", 5000, 1);
                SetPlayerFacingAngle(playerid, 0.0000);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3, 2447.8350,-1962.6876,13.5469)) //Los Santos Export Depot
            {
                SetPlayerPos(playerid,2573.0928,-1302.0148,1044.1250);
                SetCameraBehindPlayer(playerid);
                PlayerInfo[playerid][pInt] = 2;
                SetPlayerInterior(playerid, 2);
                GameTextForPlayer(playerid, "~w~Los Santos ~n~Export Depot HQ", 5000, 1);
                SetPlayerFacingAngle(playerid, 270.0000);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1038.2180,-1340.5763,13.7432)) //Donut Store
            {
                SetPlayerInterior(playerid, 17);
                SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
                SetPlayerFacingAngle(playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~Jim's Sticky Ring", 5000, 1);
                PlayerInfo[playerid][pInt] = 17;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1481.0696,-1771.6183,18.7958)) //City Hall
            {
                SetPlayerInterior(playerid, 3);
                SetPlayerPos(playerid, 384.5713,173.6477,1008.3828);
                SetPlayerFacingAngle(playerid, 90.0000);
                GameTextForPlayer(playerid, "~w~Welcome to City Hall", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,51.9720,-292.6349,1.7031)) //Drug Factory
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 2205.2314,1551.5662,1008.4103);
                SetPlayerFacingAngle(playerid, 270.7354);
                GameTextForPlayer(playerid, "~w~Drug Factory", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,954.0909,-909.9763,45.7656)) //Mafia HQ
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, -778.6361,496.1818,1368.5304);
                SetPlayerFacingAngle(playerid, 90.0000);
                GameTextForPlayer(playerid, "~w~San Andreas Cobras", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,906.9045,-915.5287,57.7345)) //Mafia Roof HQ
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, -794.9364,490.3830,1376.1953);
                SetPlayerFacingAngle(playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~San Andreas Cobras", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 2.5, 152.3280,1370.0015,1088.3672)) //Yuri's Office
            {
                SetPlayerPos(playerid, 1226.6959,-813.4658,1084.0078);
                SetPlayerInterior(playerid, 5);
                GameTextForPlayer(playerid,"~w~ Yuri Cordozar's Office", 3000, 1);
            }
            else if(IsPlayerInRangeOfPoint(playerid, 3.0, -794.0869,499.2813,1367.3672)) //San Andreas Cobras VIP
            {
                SetPlayerInterior(playerid, 2);
                SetPlayerPos(playerid,1204.7283,13.3681,1000.9219);
                SetCameraBehindPlayer(playerid);
                GameTextForPlayer(playerid, "~w~San Andreas Cobras VIP room", 5000, 1);
                SetPlayerFacingAngle(playerid, 3.9235);
                PlayerInfo[playerid][pInt] = 6;
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,2000.0439,-1114.1256,27.1250)) //Ballas HQ
            {
                SetPlayerVirtualWorld(playerid, 1);
                SetPlayerInterior(playerid, 2);
                SetPlayerPos(playerid, 2464.8630,-1698.3715,1013.5078);
                SetPlayerFacingAngle(playerid, 90.0000);
                GameTextForPlayer(playerid, "~w~Ballas Crib", 5000, 1);
                PlayerInfo[playerid][pInt] = 2;
                PlayerInfo[playerid][pVirtualWorld] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1997.8634,-1104.3289,26.7813)) //Ballas HQ 2
            {
                SetPlayerVirtualWorld(playerid, 1);
                SetPlayerInterior(playerid, 2);
                SetPlayerPos(playerid, 2451.2813,-1685.8804,1013.5078);
                SetPlayerFacingAngle(playerid, 180.0000);
                GameTextForPlayer(playerid, "~w~Ballas Crib", 5000, 1);
                PlayerInfo[playerid][pInt] = 2;
                PlayerInfo[playerid][pVirtualWorld] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,2756.3127,-1182.7612,69.4033)) //The Walton Cartels HQ
            {
                SetPlayerInterior(playerid, 12);
                SetPlayerPos(playerid, 1142.8920,6.3150,1000.6797);
                SetPlayerFacingAngle(playerid, 90.0000);
                GameTextForPlayer(playerid, "~w~The Walton ~n~Cartels HQ", 5000, 1);
                PlayerInfo[playerid][pInt] = 12;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1191.2216,-1652.8029,13.9285)) //Triads HQ
            {
                SetPlayerInterior(playerid, 6);
                SetPlayerPos(playerid, 763.1277,-49.8147,1000.5859);
                SetPlayerFacingAngle(playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~Triads Dojo", 5000, 1);
                PlayerInfo[playerid][pInt] = 6;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,2183.1687,-2668.6416,17.8828)) //South Side Renegades HQ
            {
                SetPlayerInterior(playerid, 18);
                PlayerInfo[playerid][pInt] = 18;
                SetPlayerPos(playerid, 1249.7102,-28.1984,1001.0362);
                SetPlayerFacingAngle(playerid, 270.0);
                GameTextForPlayer(playerid, "~w~South Side~n~Renegades", 5000, 1);
                SetCameraBehindPlayer(playerid);
                PlayerInfo[playerid][pVirtualWorld] = 299;
                SetPlayerVirtualWorld(playerid, 299);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,2770.6853,-1628.4224,12.1775)) //Aztecas HQ
            {
                SetPlayerInterior(playerid, 3);
                SetPlayerPos(playerid, -2634.9387,1409.7109,906.4609);
                SetPlayerVirtualWorld(playerid, 10);
                PlayerInfo[playerid][pVirtualWorld] = 10;
                SetPlayerFacingAngle(playerid, 90.0000);
                GameTextForPlayer(playerid, "~w~Varrio Los Aztecas Club", 5000, 1);
                PlayerInfo[playerid][pInt] = 3;
                SetCameraBehindPlayer(playerid);
            }
            /*else if(IsPlayerInRangeOfPoint(playerid,3.0,325.8402,-1515.0824,36.0325)) // Saji Yakuza Outside Enter
            {
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerInterior(playerid, 10);
                SetPlayerPos(playerid,2002.7057,1017.5179,994.4688);
                SetPlayerFacingAngle(playerid, 90.0);
                GameTextForPlayer(playerid, "~r~Saji Yakuza~n~~w~Domination~n~Conquer Sanity", 5000, 1);
                PlayerInfo[playerid][pInt] = 10;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1963.6139,972.5660,994.4688)) // Saji Yakuza Office Enter (Yakuza Old)
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid,-2170.4658,638.8912,1052.3750);
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerFacingAngle(playerid, 180.0);
                GameTextForPlayer(playerid, "~r~Saji's Office", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,1963.6288,1063.0625,994.4688)) // Saji Yakuza Club Enter (Jizzys Club)
            {
                SetPlayerInterior(playerid, 3);
                PlayerInfo[playerid][pInt] = 3;
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerPos(playerid,-2634.8784,1409.6545,906.4647);
                SetPlayerFacingAngle(playerid, 90.0);
                GameTextForPlayer(playerid, "~r~Saji's Nightclub", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,299.5337,-1557.7640,76.5391)) // Saji Yakuza Outside Roof Enter
            {
                SetPlayerInterior(playerid, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerPos(playerid,-2170.6355,645.3925,1057.5938);
                SetPlayerFacingAngle(playerid, 270.0);
                GameTextForPlayer(playerid, "~r~Saji Yakuza~n~~w~Office", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,-2170.4253,635.4069,1052.3750)) // Saji Yakuza Office Enter (Madd Doggs)
            {
                SetPlayerInterior(playerid, 5);
                PlayerInfo[playerid][pInt] = 5;
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerPos(playerid,1226.5626,-812.9409,1084.0078);
                SetPlayerFacingAngle(playerid, 0.0);
                GameTextForPlayer(playerid, "~r~Saji's Office", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,293.4017,-1494.4432,24.9219)) // Saji Yakuza Basement Enter
            {
                SetPlayerInterior(playerid, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetPlayerVirtualWorld(playerid, 25);
                PlayerInfo[playerid][pVirtualWorld] = 25;
                SetPlayerPos(playerid,2144.1931,1608.0364,993.6882);
                SetPlayerFacingAngle(playerid, 0.0);
                GameTextForPlayer(playerid, "~r~Saji's Basement", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }

            else if(IsPlayerInRangeOfPoint(playerid,3.0,1568.0038,-1897.9362,13.5609)) // Triads Club
            {
                new Float:ptx, Float:pty, Float:ptz;
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 1561.9801,-1891.2954,869.0702);
                SetPlayerFacingAngle(playerid, 180.0000);
                GameTextForPlayer(playerid, "~w~Triads Club", 5000, 1);
                GetPlayerPos(playerid, ptx, pty, ptz);
                PlayerPlaySound(playerid, 1097, ptx, pty, ptz);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0, 9999.9, 9999.9, 9999.9)) // Yakuza Office
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, -2170.3867,638.1134,1052.3750);
                SetPlayerFacingAngle(playerid, 180.0000);
                GameTextForPlayer(playerid, "~w~Yakuza Office", 5000, 1);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
*/

            else if(IsPlayerInRangeOfPoint(playerid,3.0,691.5323,-546.8344,16.3359)) //247
            {
                SetPlayerInterior(playerid, 17);
                SetPlayerPos(playerid, -25.9615,-187.1697,1003.5469);
                SetPlayerFacingAngle(playerid, 0.0000);
                GameTextForPlayer(playerid, "~w~General Store", 5000, 1);
                PlayerInfo[playerid][pInt] = 17;
                SetCameraBehindPlayer(playerid);
            }
            //dion
            else if(IsPlayerInRangeOfPoint(playerid,3.0, 1257.66, 204.62, 19.72)) // General Store Enterance
            {
                SetPlayerInterior(playerid, 16);
                SetPlayerPos(playerid, -25.91, -139.85, 1003.55);
                SetPlayerFacingAngle(playerid, 0.0000);
                PlayerInfo[playerid][pInt] = 16;
                GameTextForPlayer(playerid, "~w~General Store", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0, 1244.7333, 205.3294, 19.6454)) // Donut Store Enterance
            {
                SetPlayerVirtualWorld(playerid, 3);
                SetPlayerInterior(playerid, 17);
                SetPlayerPos(playerid, 377.1611,-191.6544,1000.6328);
                SetPlayerFacingAngle(playerid, 0.0000);
                PlayerInfo[playerid][pInt] = 17;
                PlayerInfo[playerid][pVirtualWorld] = 3;
                GameTextForPlayer(playerid, "~w~Montgomery ~n~~r~Cafe", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0, 233.2956,1840.2114,17.6406)) // Cafeteria Enterance // COMMENTED
            {
                SetPlayerInterior(playerid, 4);
                SetPlayerPos(playerid, 459.2668, -88.6474, 999.5547);
                SetPlayerFacingAngle(playerid, 89.9299);
                PlayerInfo[playerid][pInt] = 4;
                GameTextForPlayer(playerid, "~w~Cafeteria", 5000, 1);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,201.3625,1869.4546,13.1406)) //Prison
            {
                SetPlayerInterior(playerid, 1);
                SetPlayerPos(playerid, 1804.9424,-1576.6188,1636.9736);
                GameTextForPlayer(playerid, "~w~Detention Facility", 5000, 1);
                SetPlayerFacingAngle(playerid, 90.0000);
                PlayerInfo[playerid][pInt] = 1;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,177.0772,1840.2100,17.6406)) //Infirmary
            {
                SetPlayerPos(playerid, 268.7222,1862.8405,8.7578);
                GameTextForPlayer(playerid, "~w~Infirmary", 5000, 1);
                SetPlayerFacingAngle(playerid, 180.0);
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,141.6423,1875.4824,17.8434)) //Locker Room
            {
                SetPlayerInterior(playerid, 18);
                SetPlayerPos(playerid, -217.7308,1402.6931,27.7734);
                GameTextForPlayer(playerid, "~w~Locker Room", 5000, 1);
                SetPlayerFacingAngle(playerid, 90.0000);
                PlayerInfo[playerid][pInt] = 18;
                SetCameraBehindPlayer(playerid);
            }
            else if(IsPlayerInRangeOfPoint(playerid,3.0,2695.6235,-1704.6960,11.8438))
            {
                SetPlayerInterior(playerid,7);
                SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
                GameTextForPlayer(playerid, "~w~Welcome to the 8ball Track", 5000, 1);
                PlayerInfo[playerid][pInt] = 7;
            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,-2111.5686,-443.9720,38.7344))
            {
                SetPlayerInterior(playerid,4);
                SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
                GameTextForPlayer(playerid, "~w~Welcome to the Dirt Track", 5000, 1);
                PlayerInfo[playerid][pInt] = 4;

            }
            else if(IsPlayerInRangeOfPoint(playerid,8.0,-2080.3079,-406.0309,38.7344))
            {
                SetPlayerInterior(playerid,14);
                SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
                GameTextForPlayer(playerid, "~w~Welcome to the Stunting Track", 5000, 1);
                PlayerInfo[playerid][pInt] = 14;
            }
        }
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)