Beiträge von Jeffry

    Ok, gut.
    Dann erstelle bitte im /pawno/ Ordner neben der "pawno.exe" eine Datei "pawn.cfg". In diese schreibst du nur "-d3" rein (ohne die Anführungszeichen).
    Dann öffnest du die pawno.exe und kompilierst deinen Code erneut. Anschließend startest du den Server und postest erneut was im Server steht, wenn du den Code ausführen lässt. Poste ggf. gleich die Zeile mit, die dir im Log angegeben wird, falls du es auslesen kannst.

    ocmd:id(playerid,params[])
    {
    new tmp[16],string[128];
    if(sscanf(params,"s[16]",tmp))return SendClientMessage(playerid, Grey, "Benutze: /id <Teil-Name>");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(i, name, sizeof(name));
    if(strfind(name, tmp, true) != -1)
    {
    format(string, sizeof(string), "ID: (%d) %s, Level %d", i, name, Spieler[i][Score]);
    SendClientMessage(playerid, Grey, string);
    }
    }
    }
    return 1;
    }

    Du musst die Größe das anklickbaren Bereiches mit TextDrawTextSize anpassen.


    Der X Wert ist die Position PLUS die Größe des nach rechts anklickbaren Bereiches.
    Der Y Wert ist die geschätzte Höhe.

    Generell ist das so gar nicht möglich, da der Cache zum Zeitpunkt der Ausführung des Queries noch gar nicht zur Verfügung steht, sprich du kannst ihn nicht zurück geben, ohne dass der Server auf die Ausführung wartet. Das geht mit mysql_tquery jedoch nicht.


    Wenn du es wirklich jedes mal aus der Datenbank lesen willst, dann nutze mysql_query und direkt danach, also ohne ein Callback, liest du den Cache aus. Das ist zwar nicht zu empfehlen, da der Server auf den Cache wartet, aber nur so geht es, ohne dass du den ganzen Code auf Java umschreiben musst, sofern es da gehen sollte, was ich bezweifle, aus genanntem Grund.


    Am besten wäre es jedoch, wenn du die Daten direkt beim Server Start in Variablen speichern lässt und dann im Betrieb immer nur auf die Variablen zugreifst.

    Schick mir mal deine TeamViewer Daten, ich will mir das mal ansehen, was du wirklich machst. Der Code sieht an sich eigentlich gut aus, zumindest auf den ersten Blick.


    EDIT:
    Das Problem war, dass er die Häuser zu nahe nebeneinander gesetzt hatte, somit hat es mehrere auf einmal gekauft.
    Erledigt.


    EDIT2:
    Code sieht nun so aus, um weitere Fehler zu beheben:

    Spoiler anzeigen
    case _SQL_HOUSE_LOAD:
    {
    cache_get_data(rows,fields);
    if(rows)
    {
    new hcount = 0, HouseText[300], h;
    while(hcount<rows)
    {
    cache_get_field_content(hcount,"hID",result);
    h = strval(result);

    if(h < 0 || h >= sizeof(HouseInfo))
    {
    hcount++;
    continue;
    }
    HouseInfo[h][hID] = h;
    cache_get_field_content(hcount,"Owner",result);
    format( HouseInfo[h][hOwner], 35, "%s",result);

    printf("Haus id: %d",HouseInfo[h][hID]);

    cache_get_field_content(hcount,"Sell",result);
    HouseInfo[h][hSell] = strval(result);

    cache_get_field_content(hcount,"hcreate",result);
    HouseInfo[h][hcreate] = strval(result);

    cache_get_field_content(hcount,"Rent",result);
    HouseInfo[h][hRent] = strval(result);

    cache_get_field_content(hcount,"Price",result);
    HouseInfo[h][hPrice] = strval(result);

    cache_get_field_content(hcount,"Locked",result);
    HouseInfo[h][hLocked] = strval(result);

    cache_get_field_content(hcount,"Rentcount",result);
    HouseInfo[h][hRentcount] = strval(result);

    HouseInfo[h][hPos][0] = cache_get_field_content_float(hcount, "Posx");
    HouseInfo[h][hPos][1] = cache_get_field_content_float(hcount, "Posy");
    HouseInfo[h][hPos][2] = cache_get_field_content_float(hcount, "Posz");

    HouseInfo[h][hiPos][0] = cache_get_field_content_float(hcount, "Posix");
    HouseInfo[h][hiPos][1] = cache_get_field_content_float(hcount, "Posiy");
    HouseInfo[h][hiPos][2] = cache_get_field_content_float(hcount, "Posiz");


    cache_get_field_content(hcount,"hLevel",result);
    HouseInfo[h][hLevel] = strval(result);

    cache_get_field_content(hcount,"vworld",result);
    HouseInfo[h][hvWorld] = strval(result);

    cache_get_field_content(hcount,"hint",result);
    HouseInfo[h][hint] = strval(result);

    cache_get_field_content(hcount,"Bank",result);
    HouseInfo[h][hBank] = strval(result);

    cache_get_field_content(hcount,"Muell",result);
    HouseInfo[h][hMuell] = strval(result);

    cache_get_field_content(hcount,"waterprice",result);
    HouseInfo[h][hWaterprice] = strval(result);

    cache_get_field_content(hcount,"stromprice",result);
    HouseInfo[h][hStromprice] = strval(result);

    cache_get_field_content(hcount,"heizprice",result);
    HouseInfo[h][hHeizprice] = strval(result);

    cache_get_field_content(hcount,"MaxRentcount",result);
    HouseInfo[h][hMaxRent] = strval(result);

    cache_get_field_content(hcount,"Upgrade1",result);
    HouseInfo[h][hUpgrade][0] = strval(result);

    cache_get_field_content(hcount,"Upgrade2",result);
    HouseInfo[h][hUpgrade][1] = strval(result);

    cache_get_field_content(hcount,"Mietpreis",result);
    HouseInfo[h][hMietPreis] = strval(result);

    if(HouseInfo[h][hPos][0] != 0)
    {
    if(HouseInfo[h][hSell] == 0)
    {
    HouseInfo[h][hPickup] = CreateDynamicPickup(1272,1, HouseInfo[h][hPos][0], HouseInfo[h][hPos][1], HouseInfo[h][hPos][2],0);
    format(HouseText,sizeof(HouseText),""#HTML_LOGIN"HausID: "#HTML_WHITE"%i\n"#HTML_LOGIN"Preis: "#HTML_WHITE"%i$ "#HTML_LOGIN"Level: "#HTML_WHITE"%d\n"#HTML_LOGIN"Müll: "#HTML_WHITE"%d\n"#HTML_WHITE"Haus steht zum "#HTML_GREEN"Verkauf \n"#HTML_WHITE"/hauskaufen",hcount, HouseInfo[h][hPrice], HouseInfo[h][hLevel],HouseInfo[h][hMuell]);
    HouseInfo[h][hText] = Create3DTextLabel(HouseText, WEISS, HouseInfo[h][hPos][0], HouseInfo[h][hPos][1], HouseInfo[h][hPos][2], 10, 0);
    }
    else if(HouseInfo[h][hSell] == 1)
    {
    HouseInfo[h][hPickup] = CreateDynamicPickup(1273,1,HouseInfo[h][hPos][0], HouseInfo[h][hPos][1], HouseInfo[h][hPos][2],0);
    HouseInfo[h][hiPickup] = CreateDynamicPickup(1272,1,HouseInfo[h][hiPos][0], HouseInfo[h][hiPos][1], HouseInfo[h][hiPos][2], HouseInfo[h][hvWorld], HouseInfo[h][hint]);
    format(HouseText,sizeof(HouseText),""#HTML_LOGIN"HausID: %i\n"#HTML_LOGIN"Hausbesitzer: "#HTML_WHITE"%s\n"#HTML_LOGIN"Mietpreis: "#HTML_WHITE"%i$\n"#HTML_LOGIN"Mieter: "#HTML_WHITE"%i/%i\n"#HTML_LOGIN"Müll: "#HTML_WHITE"%d\n\nUm dich einzumieten benutze /einmieten"#HTML_WHITE" ein!\nZum Betreten 'F'", hcount, HouseInfo[h][hOwner], HouseInfo[h][hMietPreis], HouseInfo[h][hRentcount], HouseInfo[h][hMaxRent], HouseInfo[h][hMuell]);
    HouseInfo[h][hText] = Create3DTextLabel(HouseText, WEISS, HouseInfo[h][hPos][0], HouseInfo[h][hPos][1], HouseInfo[h][hPos][2], 10, 0);
    }
    }
    hcount++;
    }
    printf(""#SERVERNAME" Häuser geladen %d/%d geladen!",rows, MAX_HOUSE);
    }
    return true;
    }

    Falls ja, poste bitte den Code mit dem du das Haus kaufst und den Code mit dem du dir die Häuser anzeigen lässt die dir gehören.


    Das rot markierte fehlt.


    Es wäre gut, wenn du davon auch einen Screenshot ingame postest, wo du siehst, dass ID 3,4,5 dir gehören.


    Bekommst du beim Kauf 3 Nachrichten, oder nur eine? Von welcher ID?

    Das sieht mir nicht nach dem richtigen Host aus:
    omega.s4y-network.com/pma/


    Ändere das mal zu:
    omega.s4y-network.com


    Wenn das nicht klappt, gehe in den Control Panel deines Servers und schaue dort nach den MySQL Login Daten, dort müsste dann der richtige Host stehen.

    mysql_tquery(Handle, "INSERT INTO "SERVER_TAG"_settings VALUES ();");
    mysql_tquery(Handle, query);
    zu:
    mysql_tquery(Handle, query);
    mysql_tquery(Handle, "INSERT INTO "SERVER_TAG"_settings VALUES ();");


    Im format wird die Tabelle ja noch nicht erstellt, sondern erst mit dem mysql_tquery.