Beiträge von Dark Leary

    Habs einfach nur rauskopiert und vergessen aus i forplayerid zu machen^^



    public OnPlayerStreamIn(playerid, forplayerid)
    {
    if(Maske[playerid]==1)
    {
    ShowPlayerNameTagForPlayer(forplayerid,playerid,false);
    }
    return 1;
    }


    public OnPlayerStreamIn(playerid, forplayerid)
    {
    if(Maske[playerid]==1)
    {
    ShowPlayerNameTagForPlayer(i,playerid,false);
    }
    return 1;
    }


    Bischen genauer weil ich nicht unnötig hier etwas gepostet haben will ^^
    so in etwa, habe mich eben vertan ^^

    Also es liegt nicht an der ID...
    es wird auch geladen..


    Mysql Log:

    Super! Danke! es geht!
    aber eine sache währe da noch...
    es wird nicht geladen..



    stock LoadFracCar()
    {
    new val[128],query[256];
    for(new idx;idx<MAX_FRACTION_CARS; idx++)
    {
    format(query, sizeof(query), "SELECT * FROM `frakcar` WHERE `id` = %d", idx);
    mysql_query(query);
    mysql_store_result();
    if(mysql_retrieve_row())
    {
    mysql_fetch_field_row(val, "Kennzeichen");
    format(FCInfo[idx][Kennzeichen], 16, val);

    mysql_fetch_field_row(val,"Model");
    format(FCInfo[idx][Model], 16, val);


    mysql_fetch_field_row(val,"PosX");
    FCInfo[idx][fcX] = floatstr(val);


    mysql_fetch_field_row(val,"PosY");
    FCInfo[idx][fcY] = floatstr(val);


    mysql_fetch_field_row(val,"PosZ");
    FCInfo[idx][fcZ] = floatstr(val);


    mysql_fetch_field_row(val,"PosA");
    FCInfo[idx][fcA] = floatstr(val);


    mysql_fetch_field_row(val,"Farbe 1");
    format(FCInfo[idx][Color1], 16, val);


    mysql_fetch_field_row(val,"Farbe 2");
    format(FCInfo[idx][Color2], 16, val);


    mysql_fetch_field_row(val,"Fraktion");
    format(FCInfo[idx][Fraktion], 26, val);

    mysql_fetch_field_row(val,"Carid");
    format(FCInfo[idx][Carid], 16, val);

    mysql_fetch_field_row(val,"Kosten");
    format(FCInfo[idx][Kosten], 16, val);
    }
    mysql_free_result();
    if(FCInfo[idx][Model] >= 400 && FCInfo[idx][Model] <= 611)
    {
    FCInfo[idx][Carid] = CreateVehicle(FCInfo[idx][Model],FCInfo[idx][fcX],FCInfo[idx][fcY],FCInfo[idx][fcZ],FCInfo[idx][fcA],FCInfo[idx][Color1],FCInfo[idx][Color2], -1);
    SetVehicleNumberPlate(FCInfo[idx][Carid], FCInfo[idx][Kennzeichen]);
    SetVehicleToRespawn(FCInfo[idx][Carid]);
    }
    }
    }


    Bitte help! :D

    Das Spielt hier garkeine rolle... er/sie/es braucht hilfe und nicht solche doofen Kommentare...



    Versuch mal wenn du das unter OnPlayerUpdate einbaust


    for(new i=0; i<MAX_PLAYERS; i++)
    {
    ShowPlayerNameTagForPlayer(i,playerid,false);
    }


    Code
    [15:10:00] FraktionsCars gespeichert!

    Geht mir gleich... anfangs kommen ein paar aber dan wird nie mehr geantwortet...


    Mach es als string so in etwa:
    new query[200];
    format(query, sizeof(query), "SELECT * FROM `frakcar` WHERE `id` = %d", idx);
    mysql_query(query);


    musst halt noch erweitern

    Klappt immernochnicht


    /e
    es wird auch nicht geladen... erstellt..



    stock LoadFracCar()
    {
    new val[128],query[256];
    for(new idx;idx<MAX_FRACTION_CARS; idx++)
    {
    format(query, sizeof(query), "SELECT * FROM `frakcar` WHERE `id` = %d", idx);
    mysql_query(query);
    mysql_store_result();
    if(mysql_retrieve_row())
    {
    mysql_fetch_field_row(val, "Kennzeichen");
    format(FCInfo[idx][Kennzeichen], 16, val);

    mysql_fetch_field_row(val,"Model");
    format(FCInfo[idx][Model], 16, val);


    mysql_fetch_field_row(val,"PosX");
    FCInfo[idx][fcX] = floatstr(val);


    mysql_fetch_field_row(val,"PosY");
    FCInfo[idx][fcY] = floatstr(val);


    mysql_fetch_field_row(val,"PosZ");
    FCInfo[idx][fcZ] = floatstr(val);


    mysql_fetch_field_row(val,"PosA");
    FCInfo[idx][fcA] = floatstr(val);


    mysql_fetch_field_row(val,"Farbe 1");
    format(FCInfo[idx][Color1], 16, val);


    mysql_fetch_field_row(val,"Farbe 2");
    format(FCInfo[idx][Color2], 16, val);


    mysql_fetch_field_row(val,"Fraktion");
    format(FCInfo[idx][Fraktion], 26, val);

    mysql_fetch_field_row(val,"Carid");
    format(FCInfo[idx][Carid], 16, val);

    mysql_fetch_field_row(val,"Kosten");
    format(FCInfo[idx][Kosten], 16, val);
    }
    mysql_free_result();
    if(FCInfo[idx][Model] >= 400 && FCInfo[idx][Model] <= 611)
    {
    FCInfo[idx][Carid] = CreateVehicle(FCInfo[idx][Model],FCInfo[idx][fcX],FCInfo[idx][fcY],FCInfo[idx][fcZ],FCInfo[idx][fcA],FCInfo[idx][Color1],FCInfo[idx][Color2], -1);
    SetVehicleNumberPlate(FCInfo[idx][Carid], FCInfo[idx][Kennzeichen]);
    SetVehicleToRespawn(FCInfo[idx][Carid]);
    }
    }
    }

    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!!

    Okay.. habe es so gemacht..



    mysql_fetch_field_row(val,"PosX");
    format(FCInfo[idx][fcX], 16, val);


    mysql_fetch_field_row(val,"PosY");
    format(FCInfo[idx][fcY], 16, val);


    mysql_fetch_field_row(val,"PosZ");
    format(FCInfo[idx][fcZ], 16, val);


    mysql_fetch_field_row(val,"PosA");
    format(FCInfo[idx][fcA], 16, val);


    Die Warnings
    C:\Users\Dominik Binder\Desktop\Desktop\Deluxe Reallife\gamemodes\Deluxe.pwn(12130) : warning 213: tag mismatch
    C:\Users\Dominik Binder\Desktop\Desktop\Deluxe Reallife\gamemodes\Deluxe.pwn(12133) : warning 213: tag mismatch
    C:\Users\Dominik Binder\Desktop\Desktop\Deluxe Reallife\gamemodes\Deluxe.pwn(12136) : warning 213: tag mismatch
    C:\Users\Dominik Binder\Desktop\Desktop\Deluxe Reallife\gamemodes\Deluxe.pwn(12139) : warning 213: tag mismatch

    Hey...
    die Fraktioncars werden gespeichert aber nicht geladen/erstellt...


    stock LoadFracCar()
    {
    new val[128],query[256];
    for(new idx;idx<MAX_FRACTION_CARS; idx++)
    {
    format(query, sizeof(query), "SELECT * FROM `frakcar` WHERE `id` = %d", idx);
    mysql_query(query);
    mysql_store_result();
    if(mysql_retrieve_row())
    {
    mysql_fetch_field_row(val,"Kennzeichen");
    FCInfo[idx][Kennzeichen] = strval(val);

    mysql_fetch_field_row(val,"Model");
    FCInfo[idx][Model] = strval(val);


    mysql_fetch_field_row(val,"PosX");
    FCInfo[idx][fcX] = strval(val);


    mysql_fetch_field_row(val,"PosY");
    FCInfo[idx][fcY] = strval(val);


    mysql_fetch_field_row(val,"PosZ");
    FCInfo[idx][fcZ] = strval(val);


    mysql_fetch_field_row(val,"PosA");
    FCInfo[idx][fcA] = strval(val);


    mysql_fetch_field_row(val,"Farbe 1");
    FCInfo[idx][Color1] = strval(val);


    mysql_fetch_field_row(val,"Farbe 2");
    FCInfo[idx][Color2] = strval(val);


    mysql_fetch_field_row(val,"Fraktion");
    FCInfo[idx][Fraktion] = strval(val);

    mysql_fetch_field_row(val,"Carid");
    FCInfo[idx][Carid] = strval(val);

    mysql_fetch_field_row(val,"Kosten");
    FCInfo[idx][Kosten] = strval(val);
    }
    mysql_free_result();
    if(FCInfo[idx][Model] >= 400 && FCInfo[idx][Model] <= 611)
    {
    FCInfo[idx][Carid] = CreateVehicle(FCInfo[idx][Model],FCInfo[idx][fcX],FCInfo[idx][fcY],FCInfo[idx][fcZ],FCInfo[idx][fcA],FCInfo[idx][Color1],FCInfo[idx][Color2], -1);
    SetVehicleNumberPlate(FCInfo[idx][Carid], FCInfo[idx][Kennzeichen]);
    SetVehicleToRespawn(FCInfo[idx][Carid]);
    }
    }
    }