Untune vehicle command.
#8

Maybe this is what you want:

pawn Код:
new tuned;
pawn Код:
//--------------------------------Load Vehicles---------------------------------
    vehcount = CountVehicles(V_FILE_LOAD);
    LoadVehicles();
    for(new c=1;c<=vehcount;c++)
    {
        ModVehicle(c);
    }
pawn Код:
stock ModVehicle(vehicleid)
{
    new tuned2 = 0;
    if(VehicleInfo[vehicleid][mod1] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod1]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod2] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod2]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod3] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod3]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod4] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod4]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod5] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod5]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod6] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod6]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod7] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod7]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod8] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod8]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod9] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod9]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod10] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod10]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod11] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod11]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod12] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod12]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod13] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod13]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod14] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod14]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod15] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod15]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod16] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod16]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][mod17] != 0) {
        AddVehicleComponent(vehicleid,VehicleInfo[vehicleid][mod17]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][color_1] > -1 || VehicleInfo[vehicleid][color_2] > -1) {
        ChangeVehicleColor(vehicleid,VehicleInfo[vehicleid][color_1],VehicleInfo[vehicleid][color_2]);
        tuned2 = 1;
    }
    if(VehicleInfo[vehicleid][paintjob] > -1) {
        ChangeVehiclePaintjob(vehicleid,VehicleInfo[vehicleid][paintjob]);
        tuned2 = 1;
    }
    if(tuned2 == 1) {
        tuned++;
    }
}
I got much more that maybe can be what you need to but take a look at this first
Reply


Messages In This Thread
Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:01
Re: Untune vehicle command. - by Calgon - 02.08.2011, 15:25
Re: Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:26
Re: Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:34
Re: Untune vehicle command. - by Calgon - 02.08.2011, 15:36
Re: Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:39
Re: Untune vehicle command. - by Calgon - 02.08.2011, 15:43
Re: Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:45
Re: Untune vehicle command. - by Calgon - 02.08.2011, 15:49
Re: Untune vehicle command. - by OleKristian95 - 02.08.2011, 15:56

Forum Jump:


Users browsing this thread: 2 Guest(s)