Car Mod Help
#1

Hello, i am trying to make a car mod saving system (it's in my vehicle 'streamer').
There is a problem with the code in practice (the compiler throws up 0 errors and 0 warnings)
Код:
SaveMods(vehid)
{
	new modelstr[5],str[256];
	new nos,hyd,spoil,wheels,rscoop,exhaust,rbumper,fbumper;
 	format(modelstr,sizeof(modelstr),"%i",vehid);
	nos = GetVehicleComponentInSlot(vehid, CARMODTYPE_NITRO);
	hyd = GetVehicleComponentInSlot(vehid, CARMODTYPE_HYDRAULICS);
	spoil = GetVehicleComponentInSlot(vehid, CARMODTYPE_SPOILER);
	wheels = GetVehicleComponentInSlot(vehid, CARMODTYPE_WHEELS);
	rscoop = GetVehicleComponentInSlot(vehid, CARMODTYPE_ROOF);
	exhaust = GetVehicleComponentInSlot(vehid, CARMODTYPE_EXHAUST);
	rbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_REAR_BUMPER);
	fbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_FRONT_BUMPER);
	format(str,256,"%i %i %i %i %i %i %i %i %i %i",nos,hyd,spoil,wheels,rscoop,exhaust,rbumper,fbumper,Vcolour1[vehid],Vcolour2[vehid]);
	dini_Set(MODFILE,modelstr,str);
}
Please note: Vcolour1 and Vcolour2 are declared

using print() markers i found out that the code does not format the string right, no matter what mods the car has the string is "0 0 0 0 0 0 0 0 0 0"

what further confuses me is that this code worked before I added
Код:
	rscoop = GetVehicleComponentInSlot(vehid, CARMODTYPE_ROOF);
	exhaust = GetVehicleComponentInSlot(vehid, CARMODTYPE_EXHAUST);
	rbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_REAR_BUMPER);
	fbumper = GetVehicleComponentInSlot(vehid, CARMODTYPE_FRONT_BUMPER);
Thank you for your time
Reply


Messages In This Thread
Car Mod Help - by jonrb - 23.01.2010, 09:12
Re: Car Mod Help - by mansonh - 23.01.2010, 09:17
Re: Car Mod Help - by jonrb - 23.01.2010, 09:35
Re: Car Mod Help - by mansonh - 23.01.2010, 10:37
Re: Car Mod Help - by jonrb - 24.01.2010, 08:10
Re: Car Mod Help - by Joey09 - 24.01.2010, 08:15
Re: Car Mod Help - by jonrb - 24.01.2010, 08:18
Re: Car Mod Help - by mansonh - 24.01.2010, 12:37
Re: Car Mod Help - by jonrb - 24.01.2010, 13:14
Re: Car Mod Help - by mansonh - 24.01.2010, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)