Beiträge von phN

    Ja das ist klar. Aber wenn man bei OnPlayerDeath am Anfang die Variable hochzählen lässt mit Varible ++; dann werden alle Tode egal von wem und durch was hochgezählt.mMn ist das Sinnlos Tode und Kills anzuzeigen.


    Mein Post war auf die Tafel bezogen.

    Das wird mit absicht angezeigt.
    Eigentlich sollten auf der Tafel nur die Server-Statistik angezeigt werden.
    Da wir es als User eigentlich immer sehr Spannend finden was so abgeht, oder was von so und so, so oft passiert ist.

    SendClientMessage(playerid,0x800000AA,"Brief: Hey %s . Hab mal für dich ein Geschenk.");
    Das kannst du nicht einfach so Verwenden.
    Das %s ist in dem Fall nur der Platz halter für den Ausgelesenen Namen,
    Welchen du in der Formatierten nachricht über gibst:


    new name[MAX_PLAYER_NAME], string[60+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string,sizeof(string),"Brief: Hey %s . Hab mal für dich ein Geschenk.",name);
    SendClientMessage(playerid,0x800000AA,string);


    Danke es funktioniert.
    Könntest du mir bitte verraten woran jetzt der Fehler lag?

    stock ToLoadGangfight(id)
    {
    new query[256];
    mysql_format(Data, query, 128, "SELECT * FROM gangfight WHERE `id` = '%d'", id);
    mysql_function_query(Data, query, true, "OnGFLoad", "d", id);
    return 1;
    }
    Dazu dann:
    public OnGFLoad(id)
    {
    new rows, fields,string[64],tmp[128];
    cache_get_data(rows, fields);
    GFInfo[id][xMin] = cache_get_row_float(0,0);
    GFInfo[id][xMax] = cache_get_row_float(0,2);
    GFInfo[id][yMax] = cache_get_row_float(0,3);
    GFInfo[id][yMin] = cache_get_row_float(0,1);
    GFInfo[id][ctfX] = cache_get_row_float(0,4);
    GFInfo[id][ctfY] = cache_get_row_float(0,5);
    GFInfo[id][ctfZ] = cache_get_row_float(0,6);
    GFInfo[id][OwnerID] = cache_get_row_int(0,7);
    GFInfo[id][Time] = cache_get_row_int(0,8);
    GFInfo[id][GfCooldown] = cache_get_row_int(0,9);
    GFInfo[id][KillsOwner] = cache_get_row_int(0,10);
    GFInfo[id][KillsAttacker] = cache_get_row_int(0,11);
    GFInfo[id][Attacker] = cache_get_row_int(0,12);
    GFInfo[id][gActive] = cache_get_row_int(0,15);
    GFInfo[id][gID] = cache_get_row_int(0,13);
    cache_get_row(0,14, tmp);format(GFInfo[id][Name], 128, "%s", tmp);
    new string2[128];
    printf("%d | %s(%d)",id,GetFactionName(GFInfo[id][OwnerID]),GFInfo[id][OwnerID]);
    //printf("%d\n - %f - %f - %f - %f - OnGFLoad(%d)\nBesitzer: %s\nFarbe:%s\n%f - %f - %f ",GFInfo[id][gID],GFInfo[id][xMin],GFInfo[id][xMax],GFInfo[id][yMax],GFInfo[id][yMin],id,string,gz,GFInfo[id][ctfX],GFInfo[id][ctfY],GFInfo[id][ctfZ]);
    GFInfo[id][gID] = GangZoneCreate(GFInfo[id][xMin],GFInfo[id][yMin],GFInfo[id][xMax],GFInfo[id][yMax]);
    GFInfo[id][gPick] = CreatePickup(1314,1,GFInfo[id][ctfX],GFInfo[id][ctfY],GFInfo[id][ctfZ],0);
    format(string2,sizeof(string2),"Gangfight:\nOwner:%s\nBenutze '/ctf' zum einnehmen!",GetFactionName(GFInfo[id][OwnerID]));
    printf("%s",string2);
    GFInfo[id][Owner] = Create3DTextLabel(string2,0x008080FF,GFInfo[id][ctfX],GFInfo[id][ctfY],GFInfo[id][ctfZ],10.0,0);
    //GFInfo[id][GZ] = GangZoneCreate(119.084594, -214.033096, 343.084594, -62.033096);
    return 1;
    }
    Das wars das sind jetzt insgesammt alle Funktionen die zum Laden Fungieren.

    public MySQLCreateGF()
    {
    new rows, fields;
    cache_get_data(rows, fields);
    GFCount = rows;
    printf("Es müssen %d Gangfight Gebiete geladen werden!",GFCount);
    for (new GangZoneLoad = 1; GangZoneLoad < GFCount+1; GangZoneLoad++){
    ToLoadGangfight(GangZoneLoad);
    }
    print("SERVER START:: Gangfight Gebiete geladen!");
    return 1;
    }

    Wie zeigst du dem Spieler die Gangzonen an? Das fehlt in dem Code. Hast du das bei OnPlayerConnect? Poste dazu bitte auch den Code.


    Ich habe das bei OnPlayerSpawn:
    public OnPlayerSpawn(playerid)
    {
    for (new GangZoneLoad = 1; GangZoneLoad < GFCount+1; GangZoneLoad++)
    {
    GangZoneShowForPlayer(playerid,GFInfo[GangZoneLoad][gID],GetZoneColorOfFaction(GFInfo[GangZoneLoad][OwnerID]));
    }
    return 1;
    }


    Tut mir leid das du mir alles aus der Nase ziehen musst bin bisschen übermüdet.