28.10.2012, 20:54
but how can i fix it this causes!
PHP код:
public LoadComponents(vehicleid)
{
if(CarInfo[vehicleid][cOwned] == 1)
{
if(CarInfo[vehicleid][mod1] >= 1000 && CarInfo[vehicleid][mod1] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod1])) != CarInfo[vehicleid][mod1]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod1]); }
}
if(CarInfo[vehicleid][mod2] >= 1000 && CarInfo[vehicleid][mod2] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod2])) != CarInfo[vehicleid][mod2]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod2]); }
}
if(CarInfo[vehicleid][mod3] >= 1000 && CarInfo[vehicleid][mod3] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod3])) != CarInfo[vehicleid][mod3]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod3]); }
}
if(CarInfo[vehicleid][mod4] >= 1000 && CarInfo[vehicleid][mod4] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod4])) != CarInfo[vehicleid][mod4]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod4]); }
}
if(CarInfo[vehicleid][mod5] >= 1000 && CarInfo[vehicleid][mod5] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod5])) != CarInfo[vehicleid][mod5]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod5]); }
}
if(CarInfo[vehicleid][mod6] >= 1000 && CarInfo[vehicleid][mod6] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod6])) != CarInfo[vehicleid][mod6]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod6]); }
}
if(CarInfo[vehicleid][mod7] >= 1000 && CarInfo[vehicleid][mod7] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod7])) != CarInfo[vehicleid][mod7]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod7]); }
}
if(CarInfo[vehicleid][mod8] >= 1000 && CarInfo[vehicleid][mod8] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod8])) != CarInfo[vehicleid][mod8]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod8]); }
}
if(CarInfo[vehicleid][mod9] >= 1000 && CarInfo[vehicleid][mod9] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod9])) != CarInfo[vehicleid][mod9]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod9]); }
}
if(CarInfo[vehicleid][mod10] >= 1000 && CarInfo[vehicleid][mod10] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod10])) != CarInfo[vehicleid][mod10]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod10]); }
}
if(CarInfo[vehicleid][mod11] >= 1000 && CarInfo[vehicleid][mod11] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod11])) != CarInfo[vehicleid][mod11]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod11]); }
}
if(CarInfo[vehicleid][mod12] >= 1000 && CarInfo[vehicleid][mod12] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod12])) != CarInfo[vehicleid][mod12]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod12]); }
}
if(CarInfo[vehicleid][mod13] >= 1000 && CarInfo[vehicleid][mod13] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod13])) != CarInfo[vehicleid][mod13]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod13]); }
}
if(CarInfo[vehicleid][mod14] >= 1000 && CarInfo[vehicleid][mod14] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod14])) != CarInfo[vehicleid][mod14]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod14]); }
}
if(CarInfo[vehicleid][mod15] >= 1000 && CarInfo[vehicleid][mod15] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod15])) != CarInfo[vehicleid][mod15]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod15]); }
}
if(CarInfo[vehicleid][mod16] >= 1000 && CarInfo[vehicleid][mod16] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod16])) != CarInfo[vehicleid][mod16]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod16]); }
}
if(CarInfo[vehicleid][mod17] >= 1000 && CarInfo[vehicleid][mod17] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][mod17])) != CarInfo[vehicleid][mod17]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][mod17]); }
}
if(CarInfo[vehicleid][paintjob] > -1) { ChangeVehiclePaintjob(vehicleid,CarInfo[vehicleid][paintjob]); } //ChangeVehicleColor(vehicleid, 1, 1); }
else { ChangeVehicleColor(vehicleid, CarInfo[vehicleid][cColorOne], CarInfo[vehicleid][cColorTwo]); }
if(CarInfo[vehicleid][cLicense] > 0) { SetVehicleNumberPlate(vehicleid,CarInfo[vehicleid][cLicense]); }
}
else
{
if(CarInfo[vehicleid][cLicense] > 0) { SetVehicleNumberPlate(vehicleid,CarInfo[vehicleid][cLicense]); }
}
return 1;
}