MySQL dont save
#4

Well yes, that`s what I was talking about. Everything what I did is variable which is saving car healths I change it from integer to float. That`s all.
Enum:
Код:
enum carData {
	carID,
	carExists,
	carModel,
	carOwner,
	Float:carPos[4],
	carColor1,
	carColor2,
	carPaintjob,
	carLocked,
	carMods[14],
	carImpounded,
	carImpoundPrice,
	carFaction,
	carWeapons[5],
	carAmmo[5],
	carVehicle,
	Float:carHP,
	carPanels,
	carDoors,
	carLights,
	carTires
};
LoadCar:
Код:
CarData[i][carHP] = cache_get_field_float(i, "carHP");
Save query:
Код:
format(query, sizeof(query), "%s, `carImpounded` = '%d', `carImpoundPrice` = '%d', `carFaction` = '%d', `carWeapon1` = '%d', `carWeapon2` = '%d', `carWeapon3` = '%d', `carWeapon4` = '%d', `carWeapon5` = '%d', `carAmmo1` = '%d', `carAmmo2` = '%d', `carAmmo3` = '%d', `carAmmo4` = '%d', `carAmmo5` = '%d', `CarHP` = '%f', `CarPanels` = '%d', `CarDoors` = '%d', `CarLights` = '%d', `CarTires` = '%d' WHERE `carID` = '%d'",query,
		CarData[carid][carImpounded],
		CarData[carid][carImpoundPrice],
		CarData[carid][carFaction],
		CarData[carid][carWeapons][0],
		CarData[carid][carWeapons][1],
		CarData[carid][carWeapons][2],
		CarData[carid][carWeapons][3],
		CarData[carid][carWeapons][4],
		CarData[carid][carAmmo][0],
		CarData[carid][carAmmo][1],
		CarData[carid][carAmmo][2],
		CarData[carid][carAmmo][3],
		CarData[carid][carAmmo][4],
		vhealth,
		vpanels,
		vdoors,
		vlights,
		vtires,
		CarData[carid][carID]
	);
Reply


Messages In This Thread
MySQL dont save - by penaut - 05.08.2016, 22:52
Re: MySQL dont save - by Sanady - 05.08.2016, 22:54
Re: MySQL dont save - by penaut - 05.08.2016, 22:58
Re: MySQL dont save - by Sanady - 05.08.2016, 23:02
Re: MySQL dont save - by Vince - 05.08.2016, 23:04
Re: MySQL dont save - by penaut - 05.08.2016, 23:11
Re: MySQL dont save - by Sanady - 05.08.2016, 23:12
Re: MySQL dont save - by AndySedeyn - 05.08.2016, 23:12
Re: MySQL dont save - by penaut - 05.08.2016, 23:15
Re: MySQL dont save - by penaut - 05.08.2016, 23:26

Forum Jump:


Users browsing this thread: 2 Guest(s)