Haus-/Mietsystem - Problem beim Laden & NPC's disconnecten

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
  • Hallo,


    ich schreibe an einen eigenen Haussystem wo sich Spieler in mehrere Häuser einmieten können und an jeden Payday für jedes angemietete Haus wie üblich den dazugehöhrigen Mietpreis bezahlen.


    Ich habe 2 Tabellen hierzu. Einmal haus und das andere hausmieten
    Strukturen (Tabelle Haus ist in Auszug)

    Spoiler anzeigen

    Tabelle haus
    id | Besitzer | X | Y | Z | Mietpreis etc.

    Spoiler anzeigen
    Tabelle hausmieten
    id | Player | DB

    Spoiler anzeigen
    * In hausmieten.DB kommen die Datenbank-ID's (id) von haus rein. *


    Server-Log

    Spoiler anzeigen


    SA-MP Dedicated Server
    ----------------------
    v0.3.7, (C)2005-2015 SA-MP Team

    Spoiler anzeigen
    [15:47:19]
    [15:47:19] Server Plugins
    [15:47:19] --------------
    [15:47:19] Loading plugin: streamer
    [15:47:19]

    Spoiler anzeigen
    *** Streamer Plugin v2.7.7 by Incognito loaded ***

    Spoiler anzeigen
    [15:47:19] Loaded.
    [15:47:19] Loading plugin: audio
    [15:47:19]

    Spoiler anzeigen
    *** Audio Plugin v0.4 by Incognito loaded ***

    Spoiler anzeigen
    [15:47:19] Loaded.
    [15:47:19] Loading plugin: sscanf
    [15:47:19]

    Spoiler anzeigen
    [15:47:19] ===============================

    Spoiler anzeigen
    [15:47:19] sscanf plugin loaded.

    Spoiler anzeigen
    [15:47:19] (c) 2009 Alex "Y_Less" Cole

    Spoiler anzeigen
    [15:47:19] ===============================

    Spoiler anzeigen
    [15:47:19] Loaded.
    [15:47:19] Loading plugin: mysql
    [15:47:19]

    Spoiler anzeigen
    > MySQL plugin R5 successfully loaded.

    Spoiler anzeigen
    [15:47:19] Loaded.
    [15:47:19] Loaded 4 plugins.

    Spoiler anzeigen
    [15:47:19]
    [15:47:19] Filterscripts
    [15:47:19] ---------------
    [15:47:19] Loading filterscript 'TextDrawEditor.amx'...
    [15:47:19]
    --------------------------------------
    [15:47:19] Text Draw Editor 1.0RC2 by Zamaroht for SA-MP 0.3 Loaded.
    [15:47:19] --------------------------------------

    Spoiler anzeigen
    [15:47:19] Loading filterscript 'CameraEditor.amx'...
    [15:47:19] Loaded 2 filterscripts.

    Spoiler anzeigen
    [15:47:19] *** Audio Plugin: Started TCP server on port 7777
    [15:47:20] [connection] 127.0.0.1:60281 requests connection cookie.
    [15:47:20] Starte Server...
    [15:47:20] (( 1 % ))
    [15:47:20] [SERVER] GameMode-Text geladen
    [15:47:20] (( 2 % ))
    [15:47:20] (( 3 % ))
    [15:47:20] (( 4 % ))
    [15:47:20] [SERVER] Text-Draw's geladen!
    [15:47:20] (( 5 % ))
    [15:47:20] (( 6 % ))
    [15:47:20] (( 7 % ))
    [15:47:20] [CAR] Neulingsfahrzeuge geladen!
    [15:47:20] (( 8 % ))
    [15:47:20] (( 9 % ))
    [15:47:20] (( 10 % ))
    [15:47:20] [MYSQL] Verbindung zur Datenbank wurde erfolgreich hergestellt!
    [15:47:20] (( 11 % ))
    [15:47:20] (( 12 % ))
    [15:47:20] (( 13 % ))
    [15:47:20] [MAP] Alle 3DTextLabels und Pickups geladen!
    [15:47:20] (( 14 %))
    [15:47:20] (( 15 % ))
    [15:47:20] (( 16 % ))
    [15:47:20] [MAP] Stadthalle geladen!
    [15:47:20] [MAP] Stadthallen - Interior geladen!
    [15:47:20] (( 17 % ))
    [15:47:20] (( 18 % ))
    [15:47:20] (( 19 % ))
    [15:47:20] [MAP] Parkanlage Los Santos geladen!
    [15:47:20] (( 20 % ))
    [15:47:20] (( 21 % ))
    [15:47:20] (( 22 % ))
    [15:47:20] [MAP] LSPD geladen!
    [15:47:20] (( 23 % ))
    [15:47:20] (( 24 % ))
    [15:47:20] (( 25 % ))
    [15:47:20] [MAP] LSPD Interior geladen
    [15:47:20] (( 26 % ))
    [15:47:20] (( 27 % ))
    [15:47:20] (( 28 % ))
    [15:47:20] [MAP] Bank-Interior Modern geladen!
    [15:47:20] (( 29 % ))
    [15:47:20] (( 30 % ))
    [15:47:20] (( 31 % ))
    [15:47:20] [CAR] LSPD Fraktionsfahrzeuge geladen!
    [15:47:20] (( 32 % ))
    [15:47:20] (( 33 % ))
    [15:47:20] (( 34 % ))
    [15:47:20] (( 35 % ))
    [15:47:20] [Map] Krankenhaus Exterior geladen!
    [15:47:20] (( 36 % ))
    [15:47:20] (( 37 % ))
    [15:47:20] [CONFIG] Server Einstellungen geladen | Staatskasse: 15652955
    [15:47:20] (null)
    [15:47:20] (( 38 % ))
    [15:47:20] (( 39 % ))
    [15:47:20] (( 40 % ))
    [15:47:20] [MAP] Ordnungsamt geladen!
    [15:47:20] (( 41 % ))
    [15:47:20] (( 42 % ))
    [15:47:20] (( 43 % ))
    [15:47:20] (( 44 % ))
    [15:47:20] (( 45 % ))
    [15:47:20] (( 46 % ))
    [15:47:20] [connection] 127.0.0.1:60282 requests connection cookie.
    [15:47:21] [connection] 127.0.0.1:60283 requests connection cookie.
    [15:47:21] [connection] 127.0.0.1:60284 requests connection cookie.
    [15:47:22] [connection] 127.0.0.1:60285 requests connection cookie.
    [15:47:23] [HAUS] 79 Häuser wurden geladen!
    [15:47:51] Kicking 127.0.0.1 because they didn't logon to the game.
    [15:47:51] Kicking 127.0.0.1 because they didn't logon to the game.
    [15:47:52] Kicking 127.0.0.1 because they didn't logon to the game.
    [15:47:52] Kicking 127.0.0.1 because they didn't logon to the game.
    [15:47:53] Kicking 127.0.0.1 because they didn't logon to the game.
    [15:48:04] (( 47 % ))
    [15:48:04] (( 48 % ))
    [15:48:04] (( 49 % ))
    [15:48:04] (( 50 % ))
    [15:48:04]
    ----------------------------------
    [15:48:04] LoC Roleplay Script by palwal
    [15:48:04] ----------------------------------

    Spoiler anzeigen
    [15:48:04] Number of vehicle models: 17
    [15:48:04] Incoming connection: 127.0.0.1:60281 id: 0
    [15:48:04] NPC Connect: Bad player ID (127.0.0.1)
    [15:48:04] Incoming connection: 127.0.0.1:60282 id: 1
    [15:48:04] NPC Connect: Bad player ID (127.0.0.1)
    [15:48:04] Incoming connection: 127.0.0.1:60283 id: 2
    [15:48:04] NPC Connect: Bad player ID (127.0.0.1)
    [15:48:04] Incoming connection: 127.0.0.1:60284 id: 3
    [15:48:04] NPC Connect: Bad player ID (127.0.0.1)
    [15:48:04] Incoming connection: 127.0.0.1:60285 id: 4
    [15:48:04] NPC Connect: Bad player ID (127.0.0.1)
    [15:50:22] [connection] 127.0.0.1:61225 requests connection cookie.
    [15:50:23] Incoming connection: 127.0.0.1:61225 id: 0
    [15:50:24] [join] Patrick has joined the server (0:127.0.0.1)


    Das Lade-System

    Spoiler anzeigen


    stock LoadMieter(id) {
    new query[250], check, field[200];
    if(HausInfo[id][hDB] == 0) return 1;
    format(query, sizeof(query), "SELECT * FROM hausmieten WHERE DB = '%i'", HausInfo[id][hDB]);
    mysql_query(query);
    mysql_store_result();
    for(new x=0;x<sizeof(HausMieten);x++) {
    if(mysql_retrieve_row()) {
    check++;
    mysql_fetch_field_row(field,"Player");format(HausMieten[x][hmPlayer], 100, "%s", field);
    HausMieten[x][hmDB] = HausInfo[id][hDB];
    }
    }
    mysql_free_result();
    return 1;
    }
    stock LoadHouses()
    {
    new query[250], query2[250], string[250],field[300],field2[20], ok[250], check, check2;
    new field3[200];
    format(query, sizeof(query), "SELECT * FROM haus");
    mysql_query(query);
    mysql_store_result();
    for(new i=0;i<500;i++) {
    if(mysql_retrieve_row()) {

    Spoiler anzeigen
    mysql_fetch_field_row(field,"Besitzer");format(HausInfo[i][hBesitzer], 100, "%s", field);
    mysql_fetch_field_row(field2,"id");HausInfo[i][hDB] = strval(field2);
    mysql_fetch_field_row(field2,"Mietpreis");HausInfo[i][hMietPreis] = strval(field2);
    mysql_fetch_field_row(field2,"Miete");HausInfo[i][hMiete] = strval(field2);
    mysql_fetch_field_row(field2,"X");HausInfo[i][hX] = floatstr(field2);
    mysql_fetch_field_row(field2,"Y");HausInfo[i][hY] = floatstr(field2);
    mysql_fetch_field_row(field2,"Z");HausInfo[i][hZ] = floatstr(field2);
    mysql_fetch_field_row(field2,"IX");HausInfo[i][hiX] = floatstr(field2);
    mysql_fetch_field_row(field2,"IY");HausInfo[i][hiY] = floatstr(field2);
    mysql_fetch_field_row(field2,"IZ");HausInfo[i][hiZ] = floatstr(field2);
    mysql_fetch_field_row(field2,"Interior");HausInfo[i][hInterior] = strval(field2);
    mysql_fetch_field_row(field2,"Hauskasse");HausInfo[i][hHausKasse] = strval(field2);
    mysql_fetch_field_row(field2,"Preis");HausInfo[i][hPreis] = strval(field2);
    mysql_fetch_field_row(field2,"Locked");HausInfo[i][hLock] = strval(field2);
    mysql_fetch_field_row(field2,"Gesperrt");HausInfo[i][hALock] = strval(field2);
    check++;

    HausUpdate(i);
    }

    Spoiler anzeigen
    }
    format(ok, sizeof(ok), "[HAUS] %i Häuser wurden geladen!", check);
    print(ok);
    mysql_free_result();
    //Eingemeitete Häuser werden geladen
    for(new x=0;x<sizeof(HausInfo);x++) {
    LoadMieter(x);
    }
    return 1;
    }



    Publics

    Spoiler anzeigen


    forward IsMieter(playerid, dbid);
    public IsMieter(playerid, dbid) {
    for(new i=0;i<sizeof(HausMieten);i++) {
    if(HausMieten[i][hmDB] == 0) continue;
    if(HausMieten[i][hmDB] != dbid) continue;
    if(strcmp(HausMieten[i][hmPlayer], SpielerName(playerid), true)) continue;
    return 1;
    }
    return 0;
    }
    forward SendMeiete(playerid, dbid);
    public sendMiete(playerid, dbid) {
    for(new x=0;x<sizeof(HausInfo);x++) {
    if(HausInfo[x][hDB] == 0) continue;
    if(HausInfo[x][hDB] != dbid) continue;
    SpielerInfo[playerid][pGeld] -= HausInfo[x][hMietPreis];
    HausInfo[x][hHausKasse] += HausInfo[x][hMietPreis];
    return 1;
    }
    return 1;
    }


    Auszug aus dem PayDay-Timer

    Spoiler anzeigen


    for(new x=0;x<sizeof(HausInfo);x++) {
    if(HausInfo[x][hDB] == 0) continue;
    if(IsMieter(playerid, HausInfo[x][hDB])) {
    mcheck++;
    if(HausInfo[x][hALock] == 1) {
    format(mstr, sizeof(mstr), "[Mietwohnung %i] {FF0000}Administrativ gesperrt", mcheck);
    SendClientMessage(playerid, 0xFFFA00FF, mstr);
    } else {
    format(mstr, sizeof(mstr), "[Mietwohnung %i] -%i", mcheck, HausInfo[x][hMietPreis]);
    SendClientMessage(playerid, 0xFFFA00FF, mstr);
    sendMiete(playerid, HausInfo[x][hDB]);
    }


    continue;
    } else {
    continue;
    }
    }


    1) Warum werdn beim Servstart die NPC's wieder gekickt? Die werden aber nur gekickt wenn LoadMieter(id) ausgeführt wird.


    2) Beim PayDay wird nur ein Haus ausgelesen? Bei mir war es das letzte was nur ausgelesen wurde abwohl ich mich in 3 Häuser eingemietet habe.
    Beim Serverstart werden aber alle 3 existierenden Einträge der Tabelle hausmieten ausgelesen.


    3) Könnte ich das System anders schreiben damit es auch so funktioniert wie ich das möchte?


    4) Gerne auch Optimierungs- und resourcenschonendere Vorschläge. ^^


    Ich hoffe ihr könnt mir helfen. Ich wäre euch sehr dankbar.



    Liebe Grüße
    palwal




    Jeffry:

    Wer PALWAL-Sternchen vergibt, bekommt aus Prinzip ein Like 😏


    @palwal Donald Trump ist einer der besten Präsidenten welche die USA je hatte, meine Meinung.

  • 1)
    Ich gehe davon aus das ist, weil du zu viele Queries sendest = Lag. Connecte die NPCs nach dem Laden der Häuser, gegebenenfalls mit einem Timer.


    2)
    for(new x=0;x<sizeof(HausInfo);x++)
    {
    printf("x: %d | hDB: %d", x, HausInfo[x][hDB]);
    if(HausInfo[x][hDB] == 0) continue;
    printf("Mieter: %d", IsMieter(playerid, HausInfo[x][hDB]));
    if(IsMieter(playerid, HausInfo[x][hDB]))
    {
    mcheck++;
    printf("mcheck: %d | lock: %d", mcheck, HausInfo[x][hALock]);
    if(HausInfo[x][hALock] == 1)
    {
    format(mstr, sizeof(mstr), "[Mietwohnung %i] {FF0000}Administrativ gesperrt", mcheck);
    SendClientMessage(playerid, 0xFFFA00FF, mstr);
    print(mstr);
    }
    else
    {
    format(mstr, sizeof(mstr), "[Mietwohnung %i] -%i", mcheck, HausInfo[x][hMietPreis]);
    SendClientMessage(playerid, 0xFFFA00FF, mstr);
    print(mstr);
    sendMiete(playerid, HausInfo[x][hDB]);
    print("Miete gesendet.");
    }
    }
    }

    Was steht so im Server Log?


    3 & 4)
    Nutze die neuste Plugin Version, das R39-3.

  • [21:43:51] x: 0 | hDB: 7
    [21:43:51] Mieter: 0
    [21:43:51] x: 1 | hDB: 8
    [21:43:51] Mieter: 0
    [21:43:51] x: 2 | hDB: 9
    [21:43:51] Mieter: 0
    [21:43:51] x: 3 | hDB: 10
    [21:43:51] Mieter: 0
    [21:43:51] x: 4 | hDB: 11
    [21:43:51] Mieter: 0
    [21:43:51] x: 5 | hDB: 12
    [21:43:51] Mieter: 0
    [21:43:51] x: 6 | hDB: 13
    [21:43:51] Mieter: 0
    [21:43:51] x: 7 | hDB: 14
    [21:43:51] Mieter: 0
    [21:43:51] x: 8 | hDB: 15
    [21:43:51] Mieter: 0
    [21:43:51] x: 9 | hDB: 16
    [21:43:51] Mieter: 0
    [21:43:51] x: 10 | hDB: 17
    [21:43:51] Mieter: 0
    [21:43:51] x: 11 | hDB: 18
    [21:43:51] Mieter: 0
    [21:43:51] x: 12 | hDB: 19
    [21:43:51] Mieter: 0
    [21:43:51] x: 13 | hDB: 20
    [21:43:51] Mieter: 0
    [21:43:51] x: 14 | hDB: 21
    [21:43:51] Mieter: 0
    [21:43:51] x: 15 | hDB: 22
    [21:43:51] Mieter: 0
    [21:43:51] x: 16 | hDB: 23
    [21:43:51] Mieter: 0
    [21:43:51] x: 17 | hDB: 24
    [21:43:51] Mieter: 0
    [21:43:51] x: 18 | hDB: 25
    [21:43:51] Mieter: 0
    [21:43:51] x: 19 | hDB: 26
    [21:43:51] Mieter: 0
    [21:43:52] x: 20 | hDB: 27
    [21:43:52] Mieter: 0
    [21:43:52] x: 21 | hDB: 28
    [21:43:52] Mieter: 0
    [21:43:52] x: 22 | hDB: 29
    [21:43:52] Mieter: 0
    [21:43:52] x: 23 | hDB: 30
    [21:43:52] Mieter: 0
    [21:43:52] x: 24 | hDB: 31
    [21:43:52] Mieter: 0
    [21:43:52] x: 25 | hDB: 32
    [21:43:52] Mieter: 0
    [21:43:52] x: 26 | hDB: 33
    [21:43:52] Mieter: 0
    [21:43:52] x: 27 | hDB: 34
    [21:43:52] Mieter: 0
    [21:43:52] x: 28 | hDB: 35
    [21:43:52] Mieter: 0
    [21:43:52] x: 29 | hDB: 36
    [21:43:52] Mieter: 0
    [21:43:52] x: 30 | hDB: 37
    [21:43:52] Mieter: 0
    [21:43:52] x: 31 | hDB: 38
    [21:43:52] Mieter: 0
    [21:43:52] x: 32 | hDB: 39
    [21:43:52] Mieter: 0
    [21:43:52] x: 33 | hDB: 40
    [21:43:52] Mieter: 0
    [21:43:52] x: 34 | hDB: 41
    [21:43:52] Mieter: 0
    [21:43:52] x: 35 | hDB: 42
    [21:43:52] Mieter: 0
    [21:43:52] x: 36 | hDB: 43
    [21:43:52] Mieter: 0
    [21:43:52] x: 37 | hDB: 44
    [21:43:52] Mieter: 0
    [21:43:52] x: 38 | hDB: 45
    [21:43:52] Mieter: 0
    [21:43:52] x: 39 | hDB: 46
    [21:43:52] Mieter: 0
    [21:43:52] x: 40 | hDB: 47
    [21:43:52] Mieter: 0
    [21:43:52] x: 41 | hDB: 48
    [21:43:52] Mieter: 0
    [21:43:52] x: 42 | hDB: 49
    [21:43:52] Mieter: 0
    [21:43:52] x: 43 | hDB: 50
    [21:43:52] Mieter: 0
    [21:43:52] x: 44 | hDB: 51
    [21:43:52] Mieter: 0
    [21:43:52] x: 45 | hDB: 52
    [21:43:52] Mieter: 0
    [21:43:52] x: 46 | hDB: 53
    [21:43:52] Mieter: 0
    [21:43:52] x: 47 | hDB: 54
    [21:43:52] Mieter: 0
    [21:43:52] x: 48 | hDB: 55
    [21:43:52] Mieter: 0
    [21:43:52] x: 49 | hDB: 56
    [21:43:52] Mieter: 0
    [21:43:52] x: 50 | hDB: 57
    [21:43:52] Mieter: 1
    [21:43:52] mcheck: 1 | lock: 0
    [21:43:52] [Mietwohnung 1] -40
    [21:43:52] Miete gesendet.
    [21:43:52] x: 51 | hDB: 58
    [21:43:52] Mieter: 0
    [21:43:52] x: 52 | hDB: 59
    [21:43:52] Mieter: 0
    [21:43:52] x: 53 | hDB: 60
    [21:43:52] Mieter: 0
    [21:43:52] x: 54 | hDB: 61
    [21:43:52] Mieter: 0
    [21:43:52] x: 55 | hDB: 62
    [21:43:52] Mieter: 0
    [21:43:52] x: 56 | hDB: 63
    [21:43:52] Mieter: 0
    [21:43:52] x: 57 | hDB: 64
    [21:43:52] Mieter: 0
    [21:43:52] x: 58 | hDB: 65
    [21:43:52] Mieter: 0
    [21:43:52] x: 59 | hDB: 66
    [21:43:52] Mieter: 0
    [21:43:52] x: 60 | hDB: 67
    [21:43:52] Mieter: 0
    [21:43:52] x: 61 | hDB: 68
    [21:43:52] Mieter: 0
    [21:43:52] x: 62 | hDB: 69
    [21:43:52] Mieter: 0
    [21:43:52] x: 63 | hDB: 70
    [21:43:52] Mieter: 0
    [21:43:52] x: 64 | hDB: 71
    [21:43:52] Mieter: 0
    [21:43:52] x: 65 | hDB: 72
    [21:43:52] Mieter: 0
    [21:43:52] x: 66 | hDB: 73
    [21:43:52] Mieter: 0
    [21:43:52] x: 67 | hDB: 74
    [21:43:52] Mieter: 0
    [21:43:52] x: 68 | hDB: 75
    [21:43:52] Mieter: 0
    [21:43:52] x: 69 | hDB: 76
    [21:43:52] Mieter: 0
    [21:43:52] x: 70 | hDB: 77
    [21:43:52] Mieter: 0
    [21:43:52] x: 71 | hDB: 78
    [21:43:52] Mieter: 0
    [21:43:52] x: 72 | hDB: 79
    [21:43:52] Mieter: 0
    [21:43:52] x: 73 | hDB: 80
    [21:43:52] Mieter: 0
    [21:43:52] x: 74 | hDB: 81
    [21:43:52] Mieter: 0
    [21:43:52] x: 75 | hDB: 82
    [21:43:52] Mieter: 0
    [21:43:52] x: 76 | hDB: 83
    [21:43:52] Mieter: 0
    [21:43:52] x: 77 | hDB: 84
    [21:43:52] Mieter: 0
    [21:43:52] x: 78 | hDB: 85
    [21:43:52] Mieter: 0
    [21:43:52] x: 79 | hDB: 0
    [21:43:52] x: 80 | hDB: 0
    [21:43:52] x: 81 | hDB: 0
    [21:43:52] x: 82 | hDB: 0
    [21:43:52] x: 83 | hDB: 0
    [21:43:52] x: 84 | hDB: 0
    [21:43:52] x: 85 | hDB: 0
    [21:43:52] x: 86 | hDB: 0
    [21:43:52] x: 87 | hDB: 0
    [21:43:52] x: 88 | hDB: 0
    [21:43:52] x: 89 | hDB: 0
    [21:43:52] x: 90 | hDB: 0
    [21:43:52] x: 91 | hDB: 0
    [21:43:52] x: 92 | hDB: 0
    [21:43:52] x: 93 | hDB: 0
    [21:43:52] x: 94 | hDB: 0
    [21:43:52] x: 95 | hDB: 0
    [21:43:52] x: 96 | hDB: 0
    [21:43:52] x: 97 | hDB: 0
    [21:43:52] x: 98 | hDB: 0
    [21:43:52] x: 99 | hDB: 0
    [21:43:52] x: 100 | hDB: 0
    [21:43:52] x: 101 | hDB: 0
    [21:43:52] x: 102 | hDB: 0
    [21:43:52] x: 103 | hDB: 0
    [21:43:52] x: 104 | hDB: 0
    [21:43:52] x: 105 | hDB: 0
    [21:43:52] x: 106 | hDB: 0
    [21:43:52] x: 107 | hDB: 0
    [21:43:52] x: 108 | hDB: 0
    [21:43:52] x: 109 | hDB: 0
    [21:43:52] x: 110 | hDB: 0
    [21:43:52] x: 111 | hDB: 0
    [21:43:52] x: 112 | hDB: 0
    [21:43:52] x: 113 | hDB: 0
    [21:43:52] x: 114 | hDB: 0
    [21:43:52] x: 115 | hDB: 0
    [21:43:52] x: 116 | hDB: 0
    [21:43:52] x: 117 | hDB: 0
    [21:43:52] x: 118 | hDB: 0
    [21:43:52] x: 119 | hDB: 0
    [21:43:52] x: 120 | hDB: 0
    [21:43:52] x: 121 | hDB: 0
    [21:43:52] x: 122 | hDB: 0
    [21:43:52] x: 123 | hDB: 0
    [21:43:52] x: 124 | hDB: 0
    [21:43:52] x: 125 | hDB: 0
    [21:43:52] x: 126 | hDB: 0
    [21:43:52] x: 127 | hDB: 0
    [21:43:52] x: 128 | hDB: 0
    [21:43:52] x: 129 | hDB: 0
    [21:43:52] x: 130 | hDB: 0
    [21:43:52] x: 131 | hDB: 0
    [21:43:52] x: 132 | hDB: 0
    [21:43:52] x: 133 | hDB: 0
    [21:43:52] x: 134 | hDB: 0
    [21:43:52] x: 135 | hDB: 0
    [21:43:52] x: 136 | hDB: 0
    [21:43:52] x: 137 | hDB: 0
    [21:43:52] x: 138 | hDB: 0
    [21:43:52] x: 139 | hDB: 0
    [21:43:52] x: 140 | hDB: 0
    [21:43:52] x: 141 | hDB: 0
    [21:43:52] x: 142 | hDB: 0
    [21:43:52] x: 143 | hDB: 0
    [21:43:52] x: 144 | hDB: 0
    [21:43:52] x: 145 | hDB: 0
    [21:43:52] x: 146 | hDB: 0
    [21:43:52] x: 147 | hDB: 0
    [21:43:52] x: 148 | hDB: 0
    [21:43:52] x: 149 | hDB: 0
    [21:43:52] x: 150 | hDB: 0
    [21:43:52] x: 151 | hDB: 0
    [21:43:52] x: 152 | hDB: 0
    [21:43:52] x: 153 | hDB: 0
    [21:43:52] x: 154 | hDB: 0
    [21:43:52] x: 155 | hDB: 0
    [21:43:52] x: 156 | hDB: 0
    [21:43:52] x: 157 | hDB: 0
    [21:43:52] x: 158 | hDB: 0
    [21:43:52] x: 159 | hDB: 0
    [21:43:52] x: 160 | hDB: 0
    [21:43:52] x: 161 | hDB: 0
    [21:43:52] x: 162 | hDB: 0
    [21:43:52] x: 163 | hDB: 0
    [21:43:52] x: 164 | hDB: 0
    [21:43:52] x: 165 | hDB: 0
    [21:43:52] x: 166 | hDB: 0
    [21:43:52] x: 167 | hDB: 0
    [21:43:52] x: 168 | hDB: 0
    [21:43:52] x: 169 | hDB: 0
    [21:43:52] x: 170 | hDB: 0
    [21:43:52] x: 171 | hDB: 0
    [21:43:52] x: 172 | hDB: 0
    [21:43:52] x: 173 | hDB: 0
    [21:43:52] x: 174 | hDB: 0
    [21:43:52] x: 175 | hDB: 0
    [21:43:52] x: 176 | hDB: 0
    [21:43:52] x: 177 | hDB: 0
    [21:43:52] x: 178 | hDB: 0
    [21:43:52] x: 179 | hDB: 0
    [21:43:52] x: 180 | hDB: 0
    [21:43:52] x: 181 | hDB: 0
    [21:43:52] x: 182 | hDB: 0
    [21:43:52] x: 183 | hDB: 0
    [21:43:52] x: 184 | hDB: 0
    [21:43:52] x: 185 | hDB: 0
    [21:43:52] x: 186 | hDB: 0
    [21:43:52] x: 187 | hDB: 0
    [21:43:52] x: 188 | hDB: 0
    [21:43:52] x: 189 | hDB: 0
    [21:43:52] x: 190 | hDB: 0
    [21:43:52] x: 191 | hDB: 0
    [21:43:52] x: 192 | hDB: 0
    [21:43:52] x: 193 | hDB: 0
    [21:43:52] x: 194 | hDB: 0
    [21:43:52] x: 195 | hDB: 0
    [21:43:52] x: 196 | hDB: 0
    [21:43:52] x: 197 | hDB: 0
    [21:43:52] x: 198 | hDB: 0
    [21:43:52] x: 199 | hDB: 0
    [21:43:52] x: 200 | hDB: 0
    [21:43:52] x: 201 | hDB: 0
    [21:43:52] x: 202 | hDB: 0
    [21:43:52] x: 203 | hDB: 0
    [21:43:52] x: 204 | hDB: 0
    [21:43:52] x: 205 | hDB: 0
    [21:43:52] x: 206 | hDB: 0
    [21:43:52] x: 207 | hDB: 0
    [21:43:52] x: 208 | hDB: 0
    [21:43:52] x: 209 | hDB: 0
    [21:43:52] x: 210 | hDB: 0
    [21:43:52] x: 211 | hDB: 0
    [21:43:52] x: 212 | hDB: 0
    [21:43:52] x: 213 | hDB: 0
    [21:43:52] x: 214 | hDB: 0
    [21:43:52] x: 215 | hDB: 0
    [21:43:52] x: 216 | hDB: 0
    [21:43:52] x: 217 | hDB: 0
    [21:43:52] x: 218 | hDB: 0
    [21:43:52] x: 219 | hDB: 0
    [21:43:52] x: 220 | hDB: 0
    [21:43:52] x: 221 | hDB: 0
    [21:43:52] x: 222 | hDB: 0
    [21:43:52] x: 223 | hDB: 0
    [21:43:52] x: 224 | hDB: 0
    [21:43:52] x: 225 | hDB: 0
    [21:43:52] x: 226 | hDB: 0
    [21:43:52] x: 227 | hDB: 0
    [21:43:52] x: 228 | hDB: 0
    [21:43:52] x: 229 | hDB: 0
    [21:43:52] x: 230 | hDB: 0
    [21:43:52] x: 231 | hDB: 0
    [21:43:52] x: 232 | hDB: 0
    [21:43:52] x: 233 | hDB: 0
    [21:43:52] x: 234 | hDB: 0
    [21:43:52] x: 235 | hDB: 0
    [21:43:52] x: 236 | hDB: 0
    [21:43:52] x: 237 | hDB: 0
    [21:43:52] x: 238 | hDB: 0
    [21:43:52] x: 239 | hDB: 0
    [21:43:52] x: 240 | hDB: 0
    [21:43:52] x: 241 | hDB: 0
    [21:43:52] x: 242 | hDB: 0
    [21:43:52] x: 243 | hDB: 0
    [21:43:52] x: 244 | hDB: 0
    [21:43:52] x: 245 | hDB: 0
    [21:43:52] x: 246 | hDB: 0
    [21:43:52] x: 247 | hDB: 0
    [21:43:52] x: 248 | hDB: 0
    [21:43:52] x: 249 | hDB: 0
    [21:43:52] x: 250 | hDB: 0
    [21:43:52] x: 251 | hDB: 0
    [21:43:52] x: 252 | hDB: 0
    [21:43:52] x: 253 | hDB: 0
    [21:43:52] x: 254 | hDB: 0
    [21:43:52] x: 255 | hDB: 0
    [21:43:52] x: 256 | hDB: 0
    [21:43:52] x: 257 | hDB: 0
    [21:43:52] x: 258 | hDB: 0
    [21:43:52] x: 259 | hDB: 0
    [21:43:52] x: 260 | hDB: 0
    [21:43:52] x: 261 | hDB: 0
    [21:43:52] x: 262 | hDB: 0
    [21:43:52] x: 263 | hDB: 0
    [21:43:52] x: 264 | hDB: 0
    [21:43:52] x: 265 | hDB: 0
    [21:43:52] x: 266 | hDB: 0
    [21:43:52] x: 267 | hDB: 0
    [21:43:52] x: 268 | hDB: 0
    [21:43:52] x: 269 | hDB: 0
    [21:43:52] x: 270 | hDB: 0
    [21:43:52] x: 271 | hDB: 0
    [21:43:52] x: 272 | hDB: 0
    [21:43:52] x: 273 | hDB: 0
    [21:43:52] x: 274 | hDB: 0
    [21:43:52] x: 275 | hDB: 0
    [21:43:52] x: 276 | hDB: 0
    [21:43:52] x: 277 | hDB: 0
    [21:43:52] x: 278 | hDB: 0
    [21:43:52] x: 279 | hDB: 0
    [21:43:52] x: 280 | hDB: 0
    [21:43:52] x: 281 | hDB: 0
    [21:43:52] x: 282 | hDB: 0
    [21:43:52] x: 283 | hDB: 0
    [21:43:52] x: 284 | hDB: 0
    [21:43:52] x: 285 | hDB: 0
    [21:43:52] x: 286 | hDB: 0
    [21:43:52] x: 287 | hDB: 0
    [21:43:52] x: 288 | hDB: 0
    [21:43:52] x: 289 | hDB: 0
    [21:43:52] x: 290 | hDB: 0
    [21:43:52] x: 291 | hDB: 0
    [21:43:52] x: 292 | hDB: 0
    [21:43:52] x: 293 | hDB: 0
    [21:43:52] x: 294 | hDB: 0
    [21:43:52] x: 295 | hDB: 0
    [21:43:52] x: 296 | hDB: 0
    [21:43:52] x: 297 | hDB: 0
    [21:43:52] x: 298 | hDB: 0
    [21:43:52] x: 299 | hDB: 0
    [21:43:52] x: 300 | hDB: 0
    [21:43:52] x: 301 | hDB: 0
    [21:43:52] x: 302 | hDB: 0
    [21:43:52] x: 303 | hDB: 0
    [21:43:52] x: 304 | hDB: 0
    [21:43:52] x: 305 | hDB: 0
    [21:43:52] x: 306 | hDB: 0
    [21:43:52] x: 307 | hDB: 0
    [21:43:52] x: 308 | hDB: 0
    [21:43:52] x: 309 | hDB: 0
    [21:43:52] x: 310 | hDB: 0
    [21:43:52] x: 311 | hDB: 0
    [21:43:52] x: 312 | hDB: 0
    [21:43:52] x: 313 | hDB: 0
    [21:43:52] x: 314 | hDB: 0
    [21:43:52] x: 315 | hDB: 0
    [21:43:52] x: 316 | hDB: 0
    [21:43:52] x: 317 | hDB: 0
    [21:43:52] x: 318 | hDB: 0
    [21:43:52] x: 319 | hDB: 0
    [21:43:52] x: 320 | hDB: 0
    [21:43:52] x: 321 | hDB: 0
    [21:43:52] x: 322 | hDB: 0
    [21:43:52] x: 323 | hDB: 0
    [21:43:52] x: 324 | hDB: 0
    [21:43:52] x: 325 | hDB: 0
    [21:43:52] x: 326 | hDB: 0
    [21:43:52] x: 327 | hDB: 0
    [21:43:52] x: 328 | hDB: 0
    [21:43:52] x: 329 | hDB: 0
    [21:43:52] x: 330 | hDB: 0
    [21:43:52] x: 331 | hDB: 0
    [21:43:52] x: 332 | hDB: 0
    [21:43:52] x: 333 | hDB: 0
    [21:43:52] x: 334 | hDB: 0
    [21:43:52] x: 335 | hDB: 0
    [21:43:52] x: 336 | hDB: 0
    [21:43:52] x: 337 | hDB: 0
    [21:43:52] x: 338 | hDB: 0
    [21:43:52] x: 339 | hDB: 0
    [21:43:52] x: 340 | hDB: 0
    [21:43:52] x: 341 | hDB: 0
    [21:43:52] x: 342 | hDB: 0
    [21:43:52] x: 343 | hDB: 0
    [21:43:52] x: 344 | hDB: 0
    [21:43:52] x: 345 | hDB: 0
    [21:43:52] x: 346 | hDB: 0
    [21:43:52] x: 347 | hDB: 0
    [21:43:52] x: 348 | hDB: 0
    [21:43:52] x: 349 | hDB: 0
    [21:43:52] x: 350 | hDB: 0
    [21:43:52] x: 351 | hDB: 0
    [21:43:52] x: 352 | hDB: 0
    [21:43:52] x: 353 | hDB: 0
    [21:43:52] x: 354 | hDB: 0
    [21:43:52] x: 355 | hDB: 0
    [21:43:52] x: 356 | hDB: 0
    [21:43:52] x: 357 | hDB: 0
    [21:43:52] x: 358 | hDB: 0
    [21:43:52] x: 359 | hDB: 0
    [21:43:52] x: 360 | hDB: 0
    [21:43:52] x: 361 | hDB: 0
    [21:43:52] x: 362 | hDB: 0
    [21:43:52] x: 363 | hDB: 0
    [21:43:52] x: 364 | hDB: 0
    [21:43:52] x: 365 | hDB: 0
    [21:43:52] x: 366 | hDB: 0
    [21:43:52] x: 367 | hDB: 0
    [21:43:52] x: 368 | hDB: 0
    [21:43:52] x: 369 | hDB: 0
    [21:43:52] x: 370 | hDB: 0
    [21:43:52] x: 371 | hDB: 0
    [21:43:52] x: 372 | hDB: 0
    [21:43:52] x: 373 | hDB: 0
    [21:43:52] x: 374 | hDB: 0
    [21:43:52] x: 375 | hDB: 0
    [21:43:52] x: 376 | hDB: 0
    [21:43:52] x: 377 | hDB: 0
    [21:43:52] x: 378 | hDB: 0
    [21:43:52] x: 379 | hDB: 0
    [21:43:52] x: 380 | hDB: 0
    [21:43:52] x: 381 | hDB: 0
    [21:43:52] x: 382 | hDB: 0
    [21:43:52] x: 383 | hDB: 0
    [21:43:52] x: 384 | hDB: 0
    [21:43:52] x: 385 | hDB: 0
    [21:43:52] x: 386 | hDB: 0
    [21:43:52] x: 387 | hDB: 0
    [21:43:52] x: 388 | hDB: 0
    [21:43:52] x: 389 | hDB: 0
    [21:43:52] x: 390 | hDB: 0
    [21:43:52] x: 391 | hDB: 0
    [21:43:52] x: 392 | hDB: 0
    [21:43:52] x: 393 | hDB: 0
    [21:43:52] x: 394 | hDB: 0
    [21:43:52] x: 395 | hDB: 0
    [21:43:52] x: 396 | hDB: 0
    [21:43:52] x: 397 | hDB: 0
    [21:43:52] x: 398 | hDB: 0
    [21:43:52] x: 399 | hDB: 0
    [21:43:52] x: 400 | hDB: 0
    [21:43:52] x: 401 | hDB: 0
    [21:43:52] x: 402 | hDB: 0
    [21:43:52] x: 403 | hDB: 0
    [21:43:52] x: 404 | hDB: 0
    [21:43:52] x: 405 | hDB: 0
    [21:43:52] x: 406 | hDB: 0
    [21:43:52] x: 407 | hDB: 0
    [21:43:52] x: 408 | hDB: 0
    [21:43:52] x: 409 | hDB: 0
    [21:43:52] x: 410 | hDB: 0
    [21:43:52] x: 411 | hDB: 0
    [21:43:52] x: 412 | hDB: 0
    [21:43:52] x: 413 | hDB: 0
    [21:43:52] x: 414 | hDB: 0
    [21:43:52] x: 415 | hDB: 0
    [21:43:52] x: 416 | hDB: 0
    [21:43:52] x: 417 | hDB: 0
    [21:43:52] x: 418 | hDB: 0
    [21:43:52] x: 419 | hDB: 0
    [21:43:52] x: 420 | hDB: 0
    [21:43:52] x: 421 | hDB: 0
    [21:43:52] x: 422 | hDB: 0
    [21:43:52] x: 423 | hDB: 0
    [21:43:52] x: 424 | hDB: 0
    [21:43:52] x: 425 | hDB: 0
    [21:43:52] x: 426 | hDB: 0
    [21:43:52] x: 427 | hDB: 0
    [21:43:52] x: 428 | hDB: 0
    [21:43:52] x: 429 | hDB: 0
    [21:43:52] x: 430 | hDB: 0
    [21:43:52] x: 431 | hDB: 0
    [21:43:52] x: 432 | hDB: 0
    [21:43:52] x: 433 | hDB: 0
    [21:43:52] x: 434 | hDB: 0
    [21:43:52] x: 435 | hDB: 0
    [21:43:52] x: 436 | hDB: 0
    [21:43:52] x: 437 | hDB: 0
    [21:43:52] x: 438 | hDB: 0
    [21:43:52] x: 439 | hDB: 0
    [21:43:52] x: 440 | hDB: 0
    [21:43:52] x: 441 | hDB: 0
    [21:43:52] x: 442 | hDB: 0
    [21:43:52] x: 443 | hDB: 0
    [21:43:52] x: 444 | hDB: 0
    [21:43:52] x: 445 | hDB: 0
    [21:43:52] x: 446 | hDB: 0
    [21:43:52] x: 447 | hDB: 0
    [21:43:52] x: 448 | hDB: 0
    [21:43:52] x: 449 | hDB: 0
    [21:43:52] x: 450 | hDB: 0
    [21:43:52] x: 451 | hDB: 0
    [21:43:52] x: 452 | hDB: 0
    [21:43:52] x: 453 | hDB: 0
    [21:43:52] x: 454 | hDB: 0
    [21:43:52] x: 455 | hDB: 0
    [21:43:52] x: 456 | hDB: 0
    [21:43:52] x: 457 | hDB: 0
    [21:43:52] x: 458 | hDB: 0
    [21:43:52] x: 459 | hDB: 0
    [21:43:52] x: 460 | hDB: 0
    [21:43:52] x: 461 | hDB: 0
    [21:43:52] x: 462 | hDB: 0
    [21:43:52] x: 463 | hDB: 0
    [21:43:52] x: 464 | hDB: 0
    [21:43:52] x: 465 | hDB: 0
    [21:43:52] x: 466 | hDB: 0
    [21:43:52] x: 467 | hDB: 0
    [21:43:52] x: 468 | hDB: 0
    [21:43:52] x: 469 | hDB: 0
    [21:43:52] x: 470 | hDB: 0
    [21:43:52] x: 471 | hDB: 0
    [21:43:52] x: 472 | hDB: 0
    [21:43:52] x: 473 | hDB: 0
    [21:43:52] x: 474 | hDB: 0
    [21:43:52] x: 475 | hDB: 0
    [21:43:52] x: 476 | hDB: 0
    [21:43:52] x: 477 | hDB: 0
    [21:43:52] x: 478 | hDB: 0
    [21:43:52] x: 479 | hDB: 0
    [21:43:52] x: 480 | hDB: 0
    [21:43:52] x: 481 | hDB: 0
    [21:43:52] x: 482 | hDB: 0
    [21:43:52] x: 483 | hDB: 0
    [21:43:52] x: 484 | hDB: 0
    [21:43:52] x: 485 | hDB: 0
    [21:43:52] x: 486 | hDB: 0
    [21:43:52] x: 487 | hDB: 0
    [21:43:52] x: 488 | hDB: 0
    [21:43:52] x: 489 | hDB: 0
    [21:43:52] x: 490 | hDB: 0
    [21:43:52] x: 491 | hDB: 0
    [21:43:52] x: 492 | hDB: 0
    [21:43:52] x: 493 | hDB: 0
    [21:43:52] x: 494 | hDB: 0
    [21:43:52] x: 495 | hDB: 0
    [21:43:52] x: 496 | hDB: 0
    [21:43:52] x: 497 | hDB: 0
    [21:43:52] x: 498 | hDB: 0
    [21:43:52] x: 499 | hDB: 0


    Jeffry;

    Wer PALWAL-Sternchen vergibt, bekommt aus Prinzip ein Like 😏


    @palwal Donald Trump ist einer der besten Präsidenten welche die USA je hatte, meine Meinung.

  • tock LoadMieter(id) {
    new query[250], check, field[200];
    if(HausInfo[id][hDB] == 0) return 1;
    format(query, sizeof(query), "SELECT * FROM hausmieten WHERE DB = '%i'", HausInfo[id][hDB]);
    mysql_query(query);
    mysql_store_result();
    for(new x=0;x<sizeof(HausMieten);x++) {
    if(HausMieten[x][hmDB] == 0) continue;
    if(mysql_retrieve_row()) {
    check++;
    mysql_fetch_field_row(field,"Player");format(HausMieten[x][hmPlayer], 100, "%s", field);
    HausMieten[x][hmDB] = HausInfo[id][hDB];
    }
    }
    mysql_free_result();
    return 1;
    }


    Versuche es so.

  • Ah, sorry, ich hab das Prinzip verwechselt. Es muss nicht 0 sein.


    stock LoadMieter(id) {
    new query[250], check, field[200];
    if(HausInfo[id][hDB] == 0) return 1;
    format(query, sizeof(query), "SELECT * FROM hausmieten WHERE DB = '%i'", HausInfo[id][hDB]);
    mysql_query(query);
    mysql_store_result();
    for(new x=0;x<sizeof(HausMieten);x++) {
    if(HausMieten[x][hmDB] != 0) continue;
    if(mysql_retrieve_row()) {
    check++;
    mysql_fetch_field_row(field,"Player");format(HausMieten[x][hmPlayer], 100, "%s", field);
    HausMieten[x][hmDB] = HausInfo[id][hDB];
    }
    }
    mysql_free_result();
    return 1;
    }


    So sollte es passen.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen