29.09.2011, 18:34
Weird... Im using SetVehicleToRespawn after CreateVehicle and also using GetVehicleParamsEx first but still won't work... -_-
public OnVehicleSpawn(vehicleid)
{
ChangeVehicleColor(vehicleid, vInfo[vehicleid][vC1], vInfo[vehicleid][vC2]);
if(vInfo[vehicleid][mod1] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod1]);}
if(vInfo[vehicleid][mod2] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod2]);}
if(vInfo[vehicleid][mod3] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod3]);}
if(vInfo[vehicleid][mod4] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod4]);}
if(vInfo[vehicleid][mod5] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod5]);}
if(vInfo[vehicleid][mod6] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod6]);}
if(vInfo[vehicleid][mod7] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod7]);}
if(vInfo[vehicleid][mod8] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod8]);}
if(vInfo[vehicleid][mod9] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod9]);}
if(vInfo[vehicleid][mod10] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod10]);}
if(vInfo[vehicleid][mod11] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod11]);}
if(vInfo[vehicleid][mod12] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod12]);}
if(vInfo[vehicleid][mod13] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod13]);}
if(vInfo[vehicleid][mod14] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod14]);}
if(vInfo[vehicleid][mod15] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod15]);}
if(vInfo[vehicleid][mod16] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod16]);}
if(vInfo[vehicleid][mod17] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod17]);}
if(vInfo[vehicleid][vPJ] != -1) {ChangeVehiclePaintjob(vehicleid, vInfo[vehicleid][vPJ]);}
if(vInfo[vehicleid][vCond] == 0) {SetVehicleVirtualWorld(vehicleid, 10);}
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
return 1;
}
BTW im also using ManualVehicleEngine at OnGameModeInit
public OnVehicleSpawn(vehicleid)
{
ChangeVehicleColor(vehicleid, vInfo[vehicleid][vC1], vInfo[vehicleid][vC2]);
if(vInfo[vehicleid][mod1] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod1]);}
if(vInfo[vehicleid][mod2] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod2]);}
if(vInfo[vehicleid][mod3] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod3]);}
if(vInfo[vehicleid][mod4] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod4]);}
if(vInfo[vehicleid][mod5] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod5]);}
if(vInfo[vehicleid][mod6] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod6]);}
if(vInfo[vehicleid][mod7] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod7]);}
if(vInfo[vehicleid][mod8] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod8]);}
if(vInfo[vehicleid][mod9] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod9]);}
if(vInfo[vehicleid][mod10] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod10]);}
if(vInfo[vehicleid][mod11] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod11]);}
if(vInfo[vehicleid][mod12] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod12]);}
if(vInfo[vehicleid][mod13] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod13]);}
if(vInfo[vehicleid][mod14] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod14]);}
if(vInfo[vehicleid][mod15] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod15]);}
if(vInfo[vehicleid][mod16] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod16]);}
if(vInfo[vehicleid][mod17] != 0) {AddVehicleComponent(vehicleid, vInfo[vehicleid][mod17]);}
if(vInfo[vehicleid][vPJ] != -1) {ChangeVehiclePaintjob(vehicleid, vInfo[vehicleid][vPJ]);}
if(vInfo[vehicleid][vCond] == 0) {SetVehicleVirtualWorld(vehicleid, 10);}
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 0, 0, 0, 0, 0, 0, 0);
return 1;
}
BTW im also using ManualVehicleEngine at OnGameModeInit