Hallo Ihr Lieben.
Ich habe ein problem mit meinem /carsell
Der sagt mir immer das ich kein Auto besitze obwohl ich eins habe. Weis einer woran das liegt?
else if(strcmp("/carsell", cmd, true, 10) == 0)
{
if (Carlist[playerid][Carid] == GetPlayerVehicleID(playerid))
{
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])) { RemovePlayerFromVehicle(playerid); }
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GivePlayerCash(playerid, Kaufliste[Carlist[playerid][Typ]][Preis]/2);
DestroyVehicle(Carlist[playerid][Carid]);
Carlist[playerid][Typ]=-1; Carlist[playerid][CarX]=0.0; Carlist[playerid][CarY]=0.0; Carlist[playerid][CarZ]=0.0;
Carlist[playerid][CarRotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Farbe1]=-1; Carlist[playerid][Farbe2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][Paintjob]=-1;
format(string,128,"Du hast erfolgreich dein Auto für $%i verkauft!",Kaufliste[Carlist[playerid][Typ]][Preis]/2);
SendClientMessage(playerid, COLOR_RED, string);
mysql_SetInt("privatcars","AH_Typ", -1,"Name",playername);
mysql_SetFloat("privatcars","AH_X", -1, "Name", playername);
mysql_SetFloat("privatcars","AH_Y", -1, "Name", playername);
mysql_SetFloat("privatcars","AH_Z", -1, "Name", playername);
mysql_SetFloat("privatcars","AH_Rot", -1, "Name", playername);
mysql_SetInt("privatcars","AH_Status", -1,"Name",playername);
mysql_SetInt("privatcars","AH_Lock", -1,"Name",playername);
mysql_SetInt("privatcars","AH_Paintjob", -1,"Name",playername);
mysql_SetInt("privatcars","AH_Farbe1", -1,"Name",playername);
mysql_SetInt("privatcars","AH_Farbe2", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod1", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod2", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod3", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod4", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod5", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod6", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod7", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod8", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod9", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod10", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod11", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod12", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod13", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod14", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod15", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod16", -1,"Name",playername);
mysql_SetInt("privatcars","AH_mod17", -1,"Name",playername);
mysql_SetInt("privatcars","AH_Fill", -1, "Name",playername);
return true;
}
SendClientMessage(playerid, COLOR_GREY, "Fehler: Du besitzt kein Auto!");
return 1;
}
return SendClientMessage(playerid, COLOR_GREY, "Fehler: Der eingegebene Befehl ist nicht vorhanden!");
}
Ich hoffe ihr könnt mir weiterhelfen.
Gruß Tim