12.01.2012, 10:59
pawn Код:
stock LoadComponents(vehicleid)
{
if(CarInfo[vehicleid][cMod1] >= 1000 && CarInfo[vehicleid][cMod1] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][cMod1])) != CarInfo[vehicleid][cMod1]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][cMod1]); }
}
if(CarInfo[vehicleid][cMod2] >= 1000 && CarInfo[vehicleid][cMod2] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][cMod2])) != CarInfo[vehicleid][cMod2]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][cMod2]); }
}
if(CarInfo[vehicleid][cMod3] >= 1000 && CarInfo[vehicleid][cMod3] <= 1193)
{
if(GetVehicleComponentInSlot(vehicleid,GetVehicleComponentType(CarInfo[vehicleid][cMod3])) != CarInfo[vehicleid][cMod3]) { AddVehicleComponent(vehicleid,CarInfo[vehicleid][cMod3]); }
}
//etc