|
Hello again a question about mysql.
I got a table with vehicles in my database. They works fine, they get loaded and saved well. But when I make a new vehicle ingame and I reload the gamemode, everything get saved except the position? The X Y Z A floats in my database keeps on 0. And yes I'm sure those floats are set in my gamemode so there aren't 0 when I save it. Is there something special about floats and mysql? Query: Код:
format(VehiclesQuery, sizeof(VehiclesQuery), "UPDATE `vehicles` SET `CarModel` = %d, `CarX` = '%f', `CarY` = '%f', `CarZ` = '%f', `CarA` = '%f', `CarColor1` = %d, `CarColor2` = %d, `FactionCar` = %d, `FamilyCar` = %d, `CarType` = %d, `Plates` = '%s' WHERE `VehicleNumber` = %d", vStats[id][CarModel], vStats[id][CarX], vStats[id][CarY], vStats[id][CarZ], vStats[id][CarAngle], vStats[id][CarColor1], vStats[id][CarColor2], vStats[id][FactionCar], vStats[id][FamilyCar], vStats[id][CarType], vStats[id][Plates], vStats[id][VehicleNumber]); mysql_query(VehiclesQuery); |
but the problem is not in database or query but in server script.