The cars are removed from the server!
#1

When i use my command /respawnallcars something strange happens.. some of the army/special force vehicles dissapear!? I dont mean go invisable or something like that, they compleatly dissapear! If i try to teleport to them after i get to cordinates zero. They removes from the server and i need to restart it in order to get them back! What is causing this!? This is the command
pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/carreset", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] < 4)
            {
                SendClientMessage(playerid, COLOR_GRAD1, "** you are not authorized to use that command!");
                return 1;
            }
            new bool:unwanted[MAX_VEHICLES];
            for(new player=0; player<MAX_PLAYERS; player++)
            {
                if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
            }
            for(new car = 1; car <= 1850; car++)
            {
                if(!unwanted[car]) SetVehicleToRespawn(car);
            }
            format(string, sizeof(string), "SERVER: All unused cars respawned by %s.", sendername);
            BroadCast(COLOR_WHITE,string);
            format(string, sizeof(string), "[ADMIN]: %s has Respawned All Cars.", sendername);
            ABroadCast(COLOR_LIGHTRED,string, 5);
            GameTextForAll("~w~Every Unused Car ~n~~g~Respawned!",5000,1);
            new y, m, d;
            new h,mi,s;
            getdate(y,m,d);
            gettime(h,mi,s);
            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Respawned All Unused Cars",d,m,y,h,mi,s,sendername);
            AdminLog(string);
        }
        return 1;
    }
and here are the cars
pawn Код:
armycar[0] = AddStaticVehicle(433,273.7999900,2033.0000000,18.2000000,270.0000000,99,1); //Barracks
    armycar[1] = AddStaticVehicle(433,273.7000100,2020.3000500,18.2000000,270.0000000,99,1); //Barracks
    armycar[2] = AddStaticVehicle(433,274.0000000,2013.9000200,18.2000000,270.0000000,99,1); //Barracks
    armycar[3] = AddStaticVehicle(433,274.0000000,2026.5999800,18.2000000,270.0000000,99,1); //Barracks
    armycar[4] = AddStaticVehicle(425,347.7000100,1987.1999500,18.5000000,114.0000000,99,1); //Hunter
    armycar[5] = AddStaticVehicle(425,347.7999900,1973.0000000,18.5000000,70.0000000,99,1); //Hunter
    armycar[6] = AddStaticVehicle(548,346.6000100,1954.6999500,19.5000000,92.0000000,99,1); //Cargobob
    armycar[7] = AddStaticVehicle(487,249.0000000,1958.5000000,17.9000000,0.0000000,99,1); //Maverick
    armycar[8] = AddStaticVehicle(487,233.1000100,1958.5000000,17.9000000,0.0000000,99,1); //Maverick
    armycar[9] = AddStaticVehicle(476,297.2000100,2065.3999000,18.8000000,208.0000000,99,1); //Rustler
    armycar[10] = AddStaticVehicle(476,316.8999900,2064.6001000,18.8000000,143.9980000,99,1); //Rustler
    armycar[11] = AddStaticVehicle(598,205.3994100,1872.0000000,17.5000000,0.0000000,99,1); //Police Car (LVPD)
    armycar[12] = AddStaticVehicle(598,209.3994100,1872.0000000,17.5000000,0.0000000,99,1); //Police Car (LVPD)
    armycar[13] = AddStaticVehicle(598,217.5000000,1871.8994100,17.5000000,0.0000000,99,1); //Police Car (LVPD)
    armycar[14] = AddStaticVehicle(598,213.5000000,1871.8994100,17.5000000,0.0000000,99,1); //Police Car (LVPD)
    armycar[15] = AddStaticVehicle(598,222.0000000,1871.7998000,17.5000000,0.0000000,99,1); //Police Car (LVPD)
    armycar[16] = AddStaticVehicle(470,233.7000000,1886.4000200,17.8000000,92.0000000,99,1); //Patriot
    armycar[17] = AddStaticVehicle(470,233.7000000,1900.6999500,17.8000000,92.0000000,99,1); //Patriot
    armycar[18] = AddStaticVehicle(470,233.7000000,1897.0999800,17.8000000,90.0000000,99,1); //Patriot
    armycar[19] = AddStaticVehicle(470,233.5000000,1893.4000200,17.8000000,89.9950000,99,1); //Patriot
    armycar[20] = AddStaticVehicle(470,233.7000000,1890.0999800,17.8000000,89.9950000,99,1); //Patriot
    armycar[21] = AddStaticVehicle(470,233.7000000,1882.8000500,17.8000000,92.0000000,99,1); //Patriot
    armycar[22] = AddStaticVehicle(560,193.0996100,1876.8994100,17.4000000,270.0000000,99,1); //Sultan
    armycar[23] = AddStaticVehicle(560,193.1992200,1880.5000000,17.4000000,270.0000000,99,1); //Sultan
    armycar[24] = AddStaticVehicle(560,193.1992200,1883.6992200,17.4000000,270.0000000,99,1); //Sultan
    armycar[25] = AddStaticVehicle(471,202.1000100,1858.9000200,12.7000000,0.0000000,99,1); //Quad
    armycar[26] = AddStaticVehicle(471,204.3999900,1858.9000200,12.7000000,0.0000000,99,1); //Quad
    armycar[27] = AddStaticVehicle(471,206.6000100,1858.9000200,12.7000000,0.0000000,99,1); //Quad
    armycar[28] = AddStaticVehicle(495,201.3999900,1813.4000200,18.2000000,0.0000000,99,1); //Sandking
    armycar[29] = AddStaticVehicle(489,197.3000000,1813.3000500,18.0000000,0.0000000,99,1); //Rancher
    armycar[30] = AddStaticVehicle(579,193.3994100,1813.5000000,17.7000000,0.0000000,99,1); //Huntley

    specialfcar[0] = AddStaticVehicleEx(490,2803.6401,-2554.0801,13.7580,88.5493,102,102,30000); // Special Forces Rancher 1 // Color 99-99 Plz
    specialfcar[1] = AddStaticVehicleEx(490,2803.9480,-2549.0674,13.7544,89.3537,102,102,30000); // Special Forces Rancher 2 // Color 99-99 Plz
    specialfcar[2] = AddStaticVehicleEx(490,2804.1360,-2543.6924,13.7542,90.0848,102,102,30000); // Special Forces Rancher 3 // Color 99-99 Plz
    specialfcar[3] = AddStaticVehicleEx(490,2804.0879,-2538.8689,13.7567,89.6524,102,102,30000); // Special Forces Rancher 4 // Color 99-99 Plz
    specialfcar[4] = AddStaticVehicleEx(487,2769.9070,-2554.8228,13.8084,267.0010,102,102,30000); // Special Forces Maverick 1 // Color 99-99 Plz
    specialfcar[5] = AddStaticVehicleEx(487,2787.7031,-2554.6406,13.7697,1.7201,102,102,30000); // Special Forces Maverick 2 // Color 99-99 Plz
    specialfcar[6] = AddStaticVehicle(520,279.2000100,1947.3000500,18.6000000,300.0000000,99,1); //Special Forces Hydra
    specialfcar[7] = AddStaticVehicle(520,276.1000100,1955.6999500,18.6000000,272.0000000,99,1); //Special Forces Hydra
    specialfcar[8] = AddStaticVehicle(520,277.3999900,1964.5999800,18.6000000,250.0000000,99,1); //Special Forces Hydra
    specialfcar[9] = AddStaticVehicle(432,273.8999900,1978.5999800,17.7000000,270.0000000,99,1); //Special Forces Rhino
    specialfcar[10] = AddStaticVehicle(432,274.1000100,1984.5999800,17.7000000,270.0000000,99,1); //Special Forces Rhino
    specialfcar[11] = AddStaticVehicle(432,273.8999900,1989.8000500,17.7000000,270.0000000,99,1); //Special Forces Rhino
    specialfcar[12] = AddStaticVehicle(432,273.7000100,1995.5000000,17.7000000,270.0000000,99,1); //Special Forces Rhino
    specialfcar[13] = AddStaticVehicle(432,273.5000000,2000.9000200,17.7000000,270.0000000,99,1); //Special Forces Rhino
    specialfcar[14] = AddStaticVehicleEx(595,2751.8066,-2584.1006,0.5155,285.0179,102,1,30000); // Special Forces Army Boat 1
Reply


Messages In This Thread
The cars are removed from the server! - by Don_Cage - 28.04.2013, 00:23
Re: The cars are removed from the server! - by Pottus - 28.04.2013, 01:11
Re: The cars are removed from the server! - by Don_Cage - 28.04.2013, 01:16
Re: The cars are removed from the server! - by Pottus - 28.04.2013, 01:19
Re: The cars are removed from the server! - by Don_Cage - 28.04.2013, 02:49
Re: The cars are removed from the server! - by freddy smyth - 28.04.2013, 03:02
Re: The cars are removed from the server! - by Don_Cage - 28.04.2013, 03:12
Re: The cars are removed from the server! - by Don_Cage - 30.04.2013, 10:02
Re: The cars are removed from the server! - by Pottus - 05.05.2013, 03:26
Re: The cars are removed from the server! - by N0FeaR - 05.05.2013, 07:12

Forum Jump:


Users browsing this thread: 5 Guest(s)