05.08.2016, 23:02
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:
LoadCar:
Save query:
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 };
Код:
CarData[i][carHP] = cache_get_field_float(i, "carHP");
Код:
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] );