Hey habe Problem immernoch mit mysql-.-
es wird einfach nicht gespeichert... was ist daran bitte falsch??
Wo das Car erstellt wird
if(dialogid == DIALOG_FBUY)
{
new fraktion;
if(PlayerInfo[playerid][pMember] > 0) fraktion = PlayerInfo[playerid][pMember];
if(PlayerInfo[playerid][pLeader] > 0) fraktion = PlayerInfo[playerid][pLeader];
new veh = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(veh);
if(response == 1)
{
if(FraktionsKasse[fraktion] > fpreis[playerid] -1)
{
new fc = FreeFrakCheck();
if(FCInfo[fc][Model] <= 400 || FCInfo[fc][Model] >= 611)
{
FCInfo[fc][Model] = model;
FCInfo[fc][fcX] = 1336.2618;
FCInfo[fc][fcY] = -1801.3894;
FCInfo[fc][fcZ] = 13.1913;
FCInfo[fc][fcA] = 91.5898;
if(model == 487 || model == 469)// hier heli
{
FCInfo[fc][fcX] = 1330.5385;
FCInfo[fc][fcY] = -1820.5681;
FCInfo[fc][fcZ] = 13.5771;
FCInfo[fc][fcA] = 39.7293;
}
FCInfo[fc][Kosten] = fpreis[playerid]/2;
FCInfo[fc][Color1] = -1;
FCInfo[fc][Color2] = -1;
FCInfo[fc][Fraktion] = PlayerInfo[playerid][pLeader];
FCInfo[fc][Carid] = CreateVehicle(FCInfo[fc][Model],FCInfo[fc][fcX],FCInfo[fc][fcY],FCInfo[fc][fcZ],FCInfo[fc][fcA],FCInfo[fc][Color1],FCInfo[fc][Color2],-1);
PutPlayerInVehicle(playerid,FCInfo[fc][Carid],0);
SetVehicleNumberPlate(FCInfo[fc][Carid],FraktionsName(playerid));
UnFreezePlayer(playerid);
FraktionsKasse[fraktion] = FraktionsKasse[fraktion]-FCInfo[fc][Kosten];
new query[128];
format(query,sizeof(query),"INSERT INTO frakcar (id) VALUES ('%d')",fc);
mysql_query ( query );
mysql_free_result();
SaveFracCar();
return true;
}
fc++;
}
else
{
new string[264];
format(string,sizeof(string),"Deine Fraktion hat nicht genug Geld für das Auto. (Auto: %d$ - Fraktion: %d$)",fpreis[playerid],FraktionsKasse[fraktion]);
SendClientMessage(playerid,Rot,string);
UnFreezePlayer(playerid); RemovePlayerFromVehicle(playerid);
}
}
if(response == 0)
{
RemovePlayerFromVehicle(playerid);
UnFreezePlayer(playerid);
SendClientMessage(playerid,Rot,"Du hast den Kauf abgebrochen.");
}
}
Speichern Stock
stock SaveFracCar()
{
new query[1024];
for(new idx;idx<MAX_FRACTION_CARS; idx++)
{
if(FCInfo[idx][Model] >= 400 && FCInfo[idx][Model] <= 611)
{
new Float:X,Float:Y,Float:Z,Float:A;
GetVehiclePos(idx,X,Y,Z);
GetVehicleZAngle(idx,A);
FCInfo[idx][fcX] = X;
FCInfo[idx][fcY] = Y;
FCInfo[idx][fcZ] = Z;
FCInfo[idx][fcA] = A;
format(query,sizeof(query),"UPDATE `frakcar` SET `Kennzeichen` = '%s', `PosX` = '%f' ,`PosY` = '%f' ,`PosZ` = '%f' ,`PosA` = '%f',`Farbe 1` = '%d',`Farbe 2` = '%d',`Fraktion` = '%d',`Carid` = '%d',`Kosten` = '%d' WHERE `id` = '%d'",
FCInfo[idx][Kennzeichen],FCInfo[idx][Model], FCInfo[idx][fcX], FCInfo[idx][fcY], FCInfo[idx][fcZ], FCInfo[idx][fcA], FCInfo[idx][Color1], FCInfo[idx][Color2], FCInfo[idx][Fraktion], FCInfo[idx][Carid],FCInfo[idx][Kosten], idx);
mysql_query(query);
print("FraktionsCars gespeichert!");
}
}
return 1;
}
Bitte help!!