SetVehicleParamsEx at OnVehicleSpawn
#10

Quote:
Originally Posted by Audiophr3ak
Посмотреть сообщение
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
Quote:
Originally Posted by Audiophr3ak
Посмотреть сообщение
And also i had this problem at 0.3c version. This shi' don't wanna work after vehicle respawns too. It works only when im controlling em with commands.
Why are you setting them all to 0?

From a_vehicles.inc
pawn Код:
#define VEHICLE_PARAMS_UNSET    -1
#define VEHICLE_PARAMS_OFF      0
#define VEHICLE_PARAMS_ON       1
When you create a vehicle params are UNSET you are setting them to 0 or OFF what are you expecting to happen?
Maybe try setting something to 1
Reply


Messages In This Thread
SetVehicleParamsEx at OnVehicleSpawn - by Audiophr3ak - 29.09.2011, 16:19
Re: SetVehicleParamsEx at OnVehicleSpawn - by antonio112 - 29.09.2011, 17:09
Re: SetVehicleParamsEx at OnVehicleSpawn - by cyber_punk - 29.09.2011, 17:58
Re: SetVehicleParamsEx at OnVehicleSpawn - by =WoR=Varth - 29.09.2011, 17:59
Re: SetVehicleParamsEx at OnVehicleSpawn - by cyber_punk - 29.09.2011, 18:02
Re: SetVehicleParamsEx at OnVehicleSpawn - by [MWR]Blood - 29.09.2011, 18:34
Re: SetVehicleParamsEx at OnVehicleSpawn - by Audiophr3ak - 29.09.2011, 18:34
Re: SetVehicleParamsEx at OnVehicleSpawn - by [MWR]Blood - 29.09.2011, 18:36
Re: SetVehicleParamsEx at OnVehicleSpawn - by Audiophr3ak - 29.09.2011, 18:39
Re: SetVehicleParamsEx at OnVehicleSpawn - by cyber_punk - 29.09.2011, 20:57

Forum Jump:


Users browsing this thread: 4 Guest(s)