Guten zusammen
Ich habe ein Problem
bei mir werden die Autos nicht mehr geupdatet und ich finde den fehler nicht
Ich habe das so:
stock OnPlayerCarUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
for(new x = 0; x < MaxVeh; x++)
{
if(PlayerHaveCar[playerid][x])
{
GetVehiclePos(PlayerVeh[playerid][x][CarId],PlayerVeh[playerid][x][CarPos_x],PlayerVeh[playerid][x][CarPos_y],PlayerVeh[playerid][x][CarPos_z]);
GetVehicleZAngle(PlayerVeh[playerid][x][CarId],PlayerVeh[playerid][x][CarRotate]);
GetVehicleHealth(PlayerVeh[playerid][x][CarId],PlayerVeh[playerid][x][CarHealth]);
new query[1024];
format(query, 1024,"UPDATE `PlayerCars` SET `CarID` = '%d', `CarModel` = '%d', `CarPos_x` = '%.3f', `CarPos_y` = '%.3f', `CarPos_z` = '%.3f', `CarRotate` = '%.3f',");
format(query, 1024,"%s`CarNitro` = '%d', `CarHyd` = '%d', `CarWheel` = '%d', `CarAusp` = '%d', `CarSideL` = '%d', `CarSideR` = '%d', `CarFB` = '%d', `CarRB` = '%d', `CarSpoiler` = '%d',",query);
format(query, 1024,"%s`CarRoof` = '%d', `CarHood` = '%d', `CarVents` = '%d', `CarLamps` = '%d', `CarPJ` = '%d', `CarC1` = '%d', `CarC2` = '%d', `Preis` = '%d', `Health` = '%f', `Numplate` = '%s' WHERE `Name` = '%s%d'",query,
PlayerVeh[playerid][x][CarId],PlayerVeh[playerid][x][CarModel],PlayerVeh[playerid][x][CarPos_x],PlayerVeh[playerid][x][CarPos_y],PlayerVeh[playerid][x][CarPos_z],
PlayerVeh[playerid][x][CarRotate],PlayerVeh[playerid][x][CarNitro],PlayerVeh[playerid][x][CarHyd],PlayerVeh[playerid][x][CarWheel],PlayerVeh[playerid][x][CarAusp],
PlayerVeh[playerid][x][CarSideL],PlayerVeh[playerid][x][CarSideR],PlayerVeh[playerid][x][CarFB],PlayerVeh[playerid][x][CarRB],PlayerVeh[playerid][x][CarSpoiler],
PlayerVeh[playerid][x][CarRoof],PlayerVeh[playerid][x][CarHood],PlayerVeh[playerid][x][CarVents],PlayerVeh[playerid][x][CarLamps],PlayerVeh[playerid][x][CarPJ],
PlayerVeh[playerid][x][CarC1],PlayerVeh[playerid][x][CarC2],PlayerVeh[playerid][x][CarPreis],PlayerVeh[playerid][x][CarHealth],PlayerVeh[playerid][x][CarPlate],PlayerName(playerid),x);
mysql_query(query);
mysql_free_result();
}
}
}
}
der debug gibt mir den mist raus:
[04:39:23] CMySQLHandler::Query(UPDATE `PlayerCars` SET `CarID` = '', `CarModel` = '', `CarPos_x` = '', `CarPos_y` = '', `CarPos_z` = '', `CarRotate` = '',`CarNitro` = '', `CarHyd` = '', `CarWheel` = '', `CarAusp` = '', `CarSideL` = '', `CarSideR` = '', `CarFB` = '', `CarRB` = '', `CarSpoiler` = '',`CarRoof` = '60', `CarHood` = '545', `CarVents` = '-990114544', `CarLamps` = '-1023104363', `CarPJ` = '1108109647', `CarC1` = '1119516304', `CarC2` = '0', `Preis` = '0', `Health` = '0.000000', `Numplate` = '' WHERE `Name` = '0') - Successfully executed.
Ich versteh es nicht es wird alles verschoben und ich weiß nicht wiso...
Ich bitte um hilfe