MySQL Fraktionsautos - Problem

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Guten Morgen,


    ich habe das Problem, dass ich mich nicht soo gut mit MySQL auskenne und aber trotzdem alles mal modernisiert haben wollte für ein CP etc. Heißt also alles von Files in Datenbanken umschreiben. So, nun habe ich das Fraktionsauto System in MySQL umgeschrieben und durch Hilfe es endlich mal geschafft die Autos zu speichern und zu laden.


    Jedoch kommt nun folgendes:


    Mit /efa erstellt man ein Fraktionsauto an der Position wo man gerader ist
    Wie es vorher war: Man hat dann das auto an der richtigen Stelle geparkt und /fpark gemacht und dann spawnte es auch immer dort.
    Wie es jetzt isrt: Man macht /fpark an der richtigen Stelle und beim Spawnen spawnt ein Auto an der /fpark stelle und ein zweites (gleiche farbe, gleiches modell etc.) an der Stelle wo ich /efa gemacht habe. Was ebenfalls nicht funktioniert, ist das /flöschen welches beim Filesystem das Auto anscheinend gelöscht hat, hier aber nicht funktioniert, da also anscheinend die Zeile mit /flöschen des aktuellen Autos gelöscht werden muss


    Irgendwie vermute ich also dass bei /fpark immer eine neue Zeile erstellt wird anstatt dass die Position durch die der aktuelllen Zeile ersetzt wird.


    Function LoadFactionCars()
    {
    new rows, fields;
    //, modelid, Float:p[4], Float:health, color1, color2
    cache_get_data(rows, fields);
    for( new i = 0; i < rows; i++)
    {
    if(rows == 0)
    {
    return 0;
    }
    else
    {
    FactionCars[i][fCarID] = cache_get_field_content_int(i, "ID", mysqlconnect);
    FactionCars[i][fVehid] = cache_get_field_content_int(i, "Vehid", mysqlconnect);
    FactionCars[i][fPos][0] = cache_get_field_content_float(i, "Pos1", mysqlconnect);
    FactionCars[i][fPos][1] = cache_get_field_content_float(i, "Pos2", mysqlconnect);
    FactionCars[i][fPos][2] = cache_get_field_content_float(i, "Pos3", mysqlconnect);
    FactionCars[i][fPos][3] = cache_get_field_content_float(i, "Pos4", mysqlconnect);
    FactionCars[i][fCol][0] = cache_get_field_content_int(i, "Col1", mysqlconnect);
    FactionCars[i][fCol][1] = cache_get_field_content_int(i, "Col2", mysqlconnect);
    FactionCars[i][fFaction][0] = cache_get_field_content_int(i, "Faction1", mysqlconnect);
    FactionCars[i][fFaction][1] = cache_get_field_content_int(i, "Faction2", mysqlconnect);
    FactionCars[i][fFaction][2] = cache_get_field_content_int(i, "Faction3", mysqlconnect);
    FactionCars[i][fFaction][3] = cache_get_field_content_int(i, "Faction4", mysqlconnect);
    FactionCars[i][fFaction][4] = cache_get_field_content_int(i, "Faction5", mysqlconnect);
    FactionCars[i][fTuning][0] = cache_get_field_content_int(i, "Tuning1", mysqlconnect);
    FactionCars[i][fTuning][1] = cache_get_field_content_int(i, "Tuning2", mysqlconnect);
    FactionCars[i][fTuning][2] = cache_get_field_content_int(i, "Tuning3", mysqlconnect);
    FactionCars[i][fTuning][3] = cache_get_field_content_int(i, "Tuning4", mysqlconnect);
    FactionCars[i][fTuning][4] = cache_get_field_content_int(i, "Tuning5", mysqlconnect);
    FactionCars[i][fTuning][5] = cache_get_field_content_int(i, "Tuning6", mysqlconnect);
    FactionCars[i][fTuning][6] = cache_get_field_content_int(i, "Tuning7", mysqlconnect);
    FactionCars[i][fTuning][7] = cache_get_field_content_int(i, "Tuning8", mysqlconnect);
    FactionCars[i][fTuning][8] = cache_get_field_content_int(i, "Tuning9", mysqlconnect);
    FactionCars[i][fTuning][9] = cache_get_field_content_int(i, "Tuning10", mysqlconnect);
    FactionCars[i][fTuning][10] = cache_get_field_content_int(i, "Tuning11", mysqlconnect);
    FactionCars[i][fTuning][11] = cache_get_field_content_int(i, "Tuning12", mysqlconnect);
    FactionCars[i][fTuning][12] = cache_get_field_content_int(i, "Tuning13", mysqlconnect);
    FactionCars[i][fTuning][13] = cache_get_field_content_int(i, "Tuning14", mysqlconnect);
    FactionCars[i][fPrice] = cache_get_field_content_int(i, "Preis", mysqlconnect);
    if(FactionCars[i][fVehid] >= 400 && FactionCars[i][fVehid] <= 611)
    {
    FactionCars[i][fCarVeh] = CreateVehicle(FactionCars[i][fVehid],FactionCars[i][fPos][0],FactionCars[i][fPos][1],FactionCars[i][fPos][2],FactionCars[i][fPos][3],FactionCars[i][fCol][0],FactionCars[i][fCol][1],-255);
    #if defined FACTION_CARS_TUNEABLE
    if(IsAllowedFactionToTune(FactionCars[i][fFaction][0]))
    {
    if(FactionCars[i][fTuning][0] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][0]); }
    if(FactionCars[i][fTuning][1] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][1]); }
    if(FactionCars[i][fTuning][2] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][2]); }
    if(FactionCars[i][fTuning][3] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][3]); }
    if(FactionCars[i][fTuning][4] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][4]); }
    if(FactionCars[i][fTuning][5] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][5]); }
    if(FactionCars[i][fTuning][6] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][6]); }
    if(FactionCars[i][fTuning][7] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][7]); }
    if(FactionCars[i][fTuning][8] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][8]); }
    if(FactionCars[i][fTuning][9] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][9]); }
    if(FactionCars[i][fTuning][10] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][10]); }
    if(FactionCars[i][fTuning][11] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][11]); }
    if(FactionCars[i][fTuning][12] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][12]); }
    if(FactionCars[i][fTuning][13] != 0) { AddVehicleComponent(FactionCars[i][fCarVeh],FactionCars[i][fTuning][13]); }
    }
    #endif
    }
    }
    }
    return 1;
    }


    Function SaveFactionCars(bool:destroy)
    {
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 1");
    new query[256];
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611)
    {
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 2");


    format(query, sizeof(query), "UPDATE frakautos SET Vehid='%i' WHERE ID='%i'", FactionCars[fc][fVehid], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Pos1='%f' WHERE ID='%i'", FactionCars[fc][fPos][0], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Pos2='%f' WHERE ID='%i'", FactionCars[fc][fPos][1], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Pos3='%f' WHERE ID='%i'", FactionCars[fc][fPos][2], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Pos4='%f' WHERE ID='%i'", FactionCars[fc][fPos][3], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Col1='%i' WHERE ID='%i'", FactionCars[fc][fCol][0], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Col2='%i' WHERE ID='%i'", FactionCars[fc][fCol][1], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Faction1='%i' WHERE ID='%i'", FactionCars[fc][fFaction][0], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Faction2='%i' WHERE ID='%i'", FactionCars[fc][fFaction][1], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Faction3='%i' WHERE ID='%i'", FactionCars[fc][fFaction][2], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Faction4='%i' WHERE ID='%i'", FactionCars[fc][fFaction][3], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Faction5='%i' WHERE ID='%i'", FactionCars[fc][fFaction][4], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning1='%i' WHERE ID='%i'", FactionCars[fc][fTuning][0], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning2='%i' WHERE ID='%i'", FactionCars[fc][fTuning][1], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning3='%i' WHERE ID='%i'", FactionCars[fc][fTuning][2], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning4='%i' WHERE ID='%i'", FactionCars[fc][fTuning][3], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning5='%i' WHERE ID='%i'", FactionCars[fc][fTuning][4], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning6='%i' WHERE ID='%i'", FactionCars[fc][fTuning][5], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning7='%i' WHERE ID='%i'", FactionCars[fc][fTuning][6], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning8='%i' WHERE ID='%i'", FactionCars[fc][fTuning][7], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning9='%i' WHERE ID='%i'", FactionCars[fc][fTuning][8], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning10='%i' WHERE ID='%i'", FactionCars[fc][fTuning][9], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning11='%i' WHERE ID='%i'", FactionCars[fc][fTuning][10], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning12='%i' WHERE ID='%i'", FactionCars[fc][fTuning][11], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning13='%i' WHERE ID='%i'", FactionCars[fc][fTuning][12], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Tuning13='%i' WHERE ID='%i'", FactionCars[fc][fTuning][13], FactionCars[fc][fCarID]);
    mysql_tquery(mysqlconnect, query);
    format(query, sizeof(query), "UPDATE frakautos SET Preis='%i' WHERE ID='%i'", FactionCars[fc][fPrice], FactionCars[fc][fCarID]);
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 3");
    mysql_tquery(mysqlconnect, query);
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 4");
    if(destroy == true)
    {
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 5");
    if(DestroyVehicle(FactionCars[fc][fCarVeh]))
    {
    SendClientMessageToAll(COLOR_RED, "SaveFactionCar - Debug - 6");
    FactionCars[fc][fCarVeh] = -255;
    }


    }
    }
    }
    return true;
    }


    if(strcmp(cmdtext,"/fpark",true)==0){ //=========Fraktionsautohaus=========//
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    new fc;while(fc<sizeof(FactionCars)){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(GetPlayerVehicleID(playerid) == FactionCars[fc][fCarVeh]){
    if(PlayerAdministrator(playerid) >= Fraction_Need_Adminlevel || GetPlayerLeader(playerid) == FactionCars[fc][fFaction][0]){
    GetVehiclePos(FactionCars[fc][fCarVeh],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2]);
    GetVehicleZAngle(FactionCars[fc][fCarVeh],FactionCars[fc][fPos][3]);
    SaveFactionCars(false);
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich umgeparkt.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist dazu nicht berechtigt.");
    return true;
    }
    }fc++;
    }SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fraktionsfahrzeug.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fahrzeug oder bist nicht der Fahrer.");
    return true;
    }
    if(strcmp(cmdtext,"/fcarsell",true)==0){
    if(GetPlayerLeader(playerid)){
    if(IsAllowedFactionToBuy(GetPlayerFaction(playerid))){
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER){
    new Carid = GetPlayerVehicleID(playerid);
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    if(Carid == FactionCars[fc][fCarVeh]){
    if(FactionCars[fc][fFaction][0] == GetPlayerLeader(playerid)){
    if(FactionCars[fc][fPrice] <= 0)
    return SendClientMessage(playerid,FACTION_COL_GREY,"Fahrzeuge die von Administratoren erstellt worden sind, dafst du nicht verkaufen.");
    FactionCars[fc][fVehid] = -255;
    if(DestroyVehicle(FactionCars[fc][fCarVeh]))
    FactionCars[fc][fCarVeh] = -255;
    new fText[178];
    format(fText,sizeof(fText),"Du hast das Fraktionsfahrzeug erfolgreich für $%d(hälfte vom Kaufpreis) verkauft.",(FactionCars[fc][fPrice]/2));
    SendClientMessage(playerid,FACTION_COL_YELLOW,fText);
    GivePlayerMoney(playerid,(FactionCars[fc][fPrice]/2));
    }
    else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht der besitzer dieses Fahrzeuges.");
    return true;
    }
    }
    }SendClientMessage(playerid,FACTION_COL_GREY,"Du sitzt in keinem Fraktionsfahrzeug.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du musst der Fahrer eines Fahrzeuges sein.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Deine Fraktion ist dazu nicht berechtigt.");
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }
    if(strcmp(cmdtext,"/flöschen",true)==0){
    if(PlayerAdministrator(playerid) >= Fraction_Need_Adminlevel){
    for(new fc;fc<sizeof(FactionCars);fc++){
    if(FactionCars[fc][fVehid] >= 400 && FactionCars[fc][fVehid] <= 611){
    new Float:fX,Float:fY,Float:fZ;
    GetVehiclePos(FactionCars[fc][fCarVeh],fX,fY,fZ);
    if(IsPlayerInRangeOfPoint(playerid,4.0,fX,fY,fZ)){
    FactionCars[fc][fVehid] = -255;
    if(DestroyVehicle(FactionCars[fc][fCarVeh])){
    FactionCars[fc][fCarVeh] = -255;
    SaveFactionCars(false);
    }return SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug entfernt.");
    }
    }
    }
    }else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }


    dcmd_efa(playerid,params[])
    { //=========Fraktionsautohaus=========//
    if(PlayerAdministrator(playerid) >= Fraction_Need_Adminlevel)
    {
    new vehid,col1,col2,faction[5];
    if(!sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]))
    {
    sscanf(params,"dddddddd",vehid,col1,col2,faction[0],faction[1],faction[2],faction[3],faction[4]);
    if(vehid < 400 || vehid > 611) return SendClientMessage(playerid,FACTION_COL_GREY,"Vehicle-ID nur von 400 bis 611.");
    if(col1 < 0 || col1 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(1)!");
    if(col2 < 0 || col2 > 255) return SendClientMessage(playerid,FACTION_COL_GREY,"Falsche Farbe(2)!");
    for(new fc;fc<sizeof(FactionCars);fc++)
    {
    if(FactionCars[fc][fVehid] > 400 || FactionCars[fc][fVehid] < 611)
    {
    FactionCars[fc][fVehid] = vehid;
    new Float:fX,Float:fY,Float:fZ,Float:fA;
    GetPlayerPos(playerid,fX,fY,fZ),GetPlayerFacingAngle(playerid,fA);
    FactionCars[fc][fPos][0] = fX;
    FactionCars[fc][fPos][1] = fY;
    FactionCars[fc][fPos][2] = fZ;
    FactionCars[fc][fPos][3] = fA;
    FactionCars[fc][fCol][0] = col1;
    FactionCars[fc][fCol][1] = col2;
    FactionCars[fc][fFaction][0] = faction[0];
    FactionCars[fc][fFaction][1] = faction[1];
    FactionCars[fc][fFaction][2] = faction[2];
    FactionCars[fc][fFaction][3] = faction[3];
    FactionCars[fc][fFaction][4] = faction[4];
    if(faction[1] == 0)
    {
    FactionCars[fc][fFaction][1] = -255;
    }
    if(faction[2] == 0)
    {
    FactionCars[fc][fFaction][2] = -255;
    }
    if(faction[3] == 0)
    {
    FactionCars[fc][fFaction][3] = -255;
    }
    if(faction[4] == 0)
    {
    FactionCars[fc][fFaction][4] = -255;
    }
    /*for(new f;f<5;f++){
    FactionCars[fc][fFaction][f] = faction[f];
    }*/
    FactionCars[fc][fPrice] = 0;
    for(new mods;mods<14;mods++)
    {
    FactionCars[fc][fTuning][mods] = 0;
    FactionCars[fc][fCarVeh] = CreateVehicle(FactionCars[fc][fVehid],FactionCars[fc][fPos][0],FactionCars[fc][fPos][1],FactionCars[fc][fPos][2],FactionCars[fc][fPos][3],FactionCars[fc][fCol][0],FactionCars[fc][fCol][1],-255);
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Du hast das Fraktionsfahrzeug erfolgreich erstellt.");
    SendClientMessage(playerid,FACTION_COL_YELLOW,"Vergesse es nicht mit '/fpark' umzuparken.");
    PutPlayerInVehicle(playerid,FactionCars[fc][fCarVeh],0);
    OnPlayerCommandText(playerid, "/motor");
    new query[512];
    mysql_format(mysqlconnect, query, sizeof(query),
    "INSERT INTO `frakautos` (`Vehid`, `Pos1`, `Pos2`, `Pos3`, `Pos4`, `Col1`, `Col2`, `Faction1`, `Faction2`, `Faction3`, `Faction4`, `Faction5`, `Tuning1`, `Tuning2`, `Tuning3`, `Tuning4`, `Tuning5`, `Tuning6`, `Tuning7`, `Tuning8`, `Tuning9`, `Tuning10`, `Tuning11`, `Tuning12`, `Tuning13`, `Tuning14`, `Preis`) VALUES ('%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
    FactionCars[fc][fVehid],
    FactionCars[fc][fPos][0],
    FactionCars[fc][fPos][1],
    FactionCars[fc][fPos][2],
    FactionCars[fc][fPos][3],
    FactionCars[fc][fCol][0],
    FactionCars[fc][fCol][1],
    FactionCars[fc][fFaction][0],
    FactionCars[fc][fFaction][1],
    FactionCars[fc][fFaction][2],
    FactionCars[fc][fFaction][3],
    FactionCars[fc][fFaction][4],
    FactionCars[fc][fTuning][0],
    FactionCars[fc][fTuning][1],
    FactionCars[fc][fTuning][2],
    FactionCars[fc][fTuning][3],
    FactionCars[fc][fTuning][4],
    FactionCars[fc][fTuning][5],
    FactionCars[fc][fTuning][6],
    FactionCars[fc][fTuning][7],
    FactionCars[fc][fTuning][8],
    FactionCars[fc][fTuning][9],
    FactionCars[fc][fTuning][10],
    FactionCars[fc][fTuning][11],
    FactionCars[fc][fTuning][12],
    FactionCars[fc][fTuning][13],
    FactionCars[fc][fPrice]);
    mysql_tquery(mysqlconnect, query, "OnCreateFactionCar2", "i", FactionCars[fc][fCarVeh]);
    SendClientMessageToAll(COLOR_RED, query);
    return true;
    }
    }
    SendClientMessage(playerid,FACTION_COL_GREY,"Die Maximale Anzahl von Fraktionsfahrzeugen wurde bereits erreicht.");
    }
    }
    else SendClientMessage(playerid,FACTION_COL_GREY,"Benutze: '/efa [Model] [Farbe(1)] [Farbe(2)] [Hauptfraktion] [Fraktion(2)] [Fraktion(3)] [Fraktion(4)] [Fraktion(5)]'.");
    }
    else SendClientMessage(playerid,FACTION_COL_GREY,"Du bist nicht berechtigt diesen Befehl anzuwenden.");
    return true;
    }


    Ich würde mich sehr über Hilfe freuen, da ich auf dem Gebiet MySQL relativ neu bin.


    MfG
    MrS