hallo Breadfish
ich habe folgendes Problem und zwar
wenn ich ein Fahrzeug kaufe steht im MSQL als "NULL"
hier der beweis
hoffe ihr könnt mir da helfen
C
public OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS
{
if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
{
CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis);
Gas[Model] = GetGasMax(GetVehicleModel(Model));
SetParkPlatz(playerid,Autohaus);
new name[MAX_PLAYER_NAME], str[256], x = Dtc_PlayerKey[playerid];
GetPlayerName(playerid, name, sizeof name);
mysql_format(handle, str, sizeof(str), "INSERT INTO `carsystem` (`CarOwner`) VALUES ('%s_%d');", name, x);
mysql_pquery(handle, str);
format(str, sizeof(str), "UPDATE `carsystem` SET `CarModel`='%d', `CarPos_X`='&f', `CarPos_Y`='&f', `CarPos_Z`='&f', `CarPos_A`='&f' \
, `CarNitro`='0', `CarHyd`='0', `CarWheel`='0', `CarAusp`='0' WHERE `CarOwner` = '%s_%d'", Model, PlayerCar[playerid][x][CarPos_x], PlayerCar[playerid][x][CarPos_y], PlayerCar[playerid][x][CarPos_z],
PlayerCar[playerid][x][CarRotate], name, x);
mysql_pquery(handle, str);
format(str, sizeof(str), "UPDATE `carsystem` SET `CarSideL`='0', `CarSideR`='0', `CarFB`='0', `CarRB`='0', `CarSpoiler`='0' \
, `CarRoof`='0', `CarHood`='0', `CarVents`='0', `CarLamps`='0' WHERE `CarOwner` = '%s_%d'", name, x);
mysql_pquery(handle, str);
format(str, sizeof(str), "UPDATE `carsystem` SET `CarPJ`='0', `CarC1`='0', `CarC2`='0', `Preis`='%d', `Neon`='0' \
, `Plate`='0', `Number`='GBN-0', `Gesperrt`='0', `Sperrpreis`='0', `Kralle`='0' WHERE `CarOwner` = '%s_%d'", Preis, name, x);
mysql_pquery(handle, str);
OnPlayerCarLogin(playerid);
printf("OnPlayerBuyCar (%s_%d)",name,x);
mysql_log(LOG_ALL);
}
}
Alles anzeigen