Neues 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
  • Habe ein neues Problem habe den server restartet und es steht die ganze Zeit es sind noch nicht alle Bots Conectet warte.

    Weiß nicht wovon das aufeinmal kommt .


    Server Log :


    ----------
    Loaded log file: "server_log.txt".
    ----------


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


    [19:26:40] gamemode1 = "" (string)
    [19:26:40] gamemode2 = "" (string)
    [19:26:40] filterscripts = "" (string)
    [19:26:40]
    [19:26:40] Server Plugins
    [19:26:40] --------------
    [19:26:40] Loading plugin: crashdetect.so
    [19:26:40] CrashDetect v4.13.1-lse is OK.
    [19:26:40] Loaded.
    [19:26:40] Loading plugin: mysql.so
    [19:26:40]


    > MySQL plugin R5 successfully loaded.


    [19:26:40] Loaded.
    [19:26:40] Loading plugin: streamer.so
    [19:26:40]


    *** Streamer Plugin v2.8 by Incognito loaded ***


    [19:26:40] Loaded.
    [19:26:40] Loading plugin: sscanf.so
    [19:26:40]


    [19:26:40] ===============================


    [19:26:40] sscanf plugin loaded.


    [19:26:40] (c) 2009 Alex "Y_Less" Cole


    [19:26:40] 0.3d-R2 500 Players "dnee"


    [19:26:40] ===============================


    [19:26:40] Loaded.
    [19:26:40] Loading plugin: filemanager.so
    [19:26:40] ******************
    [19:26:40] ** FILE MANAGER **
    [19:26:40] ** Loaded **
    [19:26:40] ** Version 1.1 **
    [19:26:40] ******************
    [19:26:40] Loaded.
    [19:26:40] Loaded 5 plugins.


    [19:26:40]
    [19:26:40] Filterscripts
    [19:26:40] ---------------
    [19:26:40] Loaded 0 filterscripts.
    @
    [19:26:40] weburl = "new-german-reallife.de" (string)
    [19:26:40] SERVER: Der Server wurde erfolgreich gestartet
    [19:26:40] SERVER: Versucht die Verbindung zur Datenbank aufzubauen
    [19:26:40] OnGamemodeInt: LoadBiz (2ms)
    [19:26:40] OnGamemodeInt: LoadSBiz (0ms)
    [19:26:40] OnGamemodeInt: LoadTankenBiz (1ms)
    [19:26:40] OnGamemodeInt: LoadStuff (1ms)
    [19:26:40] OnGamemodeInt: LoadKassenInfo (0ms)
    [19:26:40] OnGamemodeInt: LoadGangfightZones (0ms)
    [19:26:40] OnGamemodeInt: LoadGangWarInfos (2ms)
    [19:26:40] OnGamemodeInt: LoadGangBNDInfos (0ms)
    [19:26:40] sscanf warning: String buffer overflow.
    [19:26:40] [debug] Run time error 5: "Invalid memory access"
    [19:26:40] [debug] AMX backtrace:
    [19:26:40] [debug] #0 002969f0 in public UpdateHaus (0x00000078) from CS.amx
    [19:26:40] [debug] #1 00297284 in ?? () from CS.amx
    [19:26:40] [debug] #2 00132908 in public SSCANF_OnGameModeInit () from CS.amx
    [19:26:40] [debug] #3 00004970 in public FC_OnGameModeInit () from CS.amx
    [19:26:40] [debug] #4 native CallLocalFunction () [080dfac0] from samp03svr
    [19:26:40] [debug] #5 00002e80 in public OnGameModeInit () from CS.amx
    [19:26:40]
    [19:26:40]
    [19:26:40] New German Reallife
    [19:26:40] _____________________
    [19:26:40] New German Reallife !
    [19:26:40]
    [19:26:40] Number of vehicle models: 0


    @Jeffry


    Bitte um Hilfe.

  • Kenne mich noch nicht so gut aus meinst du das ?:


    ocmd:hauserstellen(playerid,params[])
    {
    new string[256], hhLevel, hhPreis, hhInt, bool:bCreation, Float:Pos[3];
    if(PlayerInfo[playerid][pAdmin] < 1337) return 1;
    if(sscanf(params, "ddd", hhLevel, hhPreis, hhInt)) return SendClientMessage(playerid, COLOR_GRAD1,"Benutze: /hauserstellen [Level] [Preis] [Interior]");
    if(hhInt <= 0 || hhInt > 17) return SendClientMessage(playerid, COLOR_GRAD1, "Ungültige InteriorID! (1 - 17)");


    for(new h = 0; h < MAX_HAUS; ++h)
    {
    if(HausInfo[h][hID] != 0) continue;


    bCreation = true;
    GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);


    strmid(HausInfo[h][hOwner], "Niemand", 0, strlen("Niemand"), MAX_PLAYER_NAME);
    strmid(HausInfo[h][hName], "Name » /hname [Name] «", 0, strlen("Name » /hname [Name] «"), 50);
    HausInfo[h][hLevel] = hhLevel;
    HausInfo[h][hPreis] = hhPreis;
    HausInfo[h][hInt] = hhInt;
    HausInfo[h][hausx] = Pos[0];
    HausInfo[h][hausy] = Pos[1];
    HausInfo[h][hausz] = Pos[2];


    format(string, 256, "INSERT INTO `hauser` (`HOwner`, `HName`, `HLevel`, `hausint`, `HPreis`, `hausx`, `hausy`, `hausz`) VALUES ('%s', '%s', %d, %d, %d, %.02f, %.02f, %.02f);", HausInfo[h][hOwner], HausInfo[h][hName], HausInfo[h][hLevel], HausInfo[h][hInt], HausInfo[h][hPreis], Pos[0], Pos[1], Pos[2]);
    mysql_query(string);


    HausInfo[h][hID] = mysql_insert_id();


    format(string, 256, "Du hast das Haus erfolgreich erstellt! (HausID: %d)", HausInfo[h][hID]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    UpdateHaus(h);
    break;
    }


    @Jeffry könntest du mir weiter helfen?

  • Wenn das nicht reicht poste ich den Rest.


    PUBLIC:UpdateHaus(HausID)
    {
    new string[350],
    hstate[5] = "Nein",
    hrentstate[5] = "Nein",
    str[50] = "",
    str1[50] = "";


    if(HausInfo[HausID][hLocked])
    hstate = "Ja";


    if(HausInfo[HausID][hRentable] == 1)
    hrentstate = "Ja";


    if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0)
    strcat(str,"\n\nNutze /buyhouse um das Haus zu kaufen!");


    if(HausInfo[HausID][hRentable] == 1)
    strcat(str1,"\nNutze /einmieten um dich einzumieten!");
    format(string, 280, "%s\n\nHaus Nummer: %d\nBesitzer: %s\nVerschlossen: %s\nLevel: %d\nPreis: $%s\nMietpreis: $%s\nMietbar: %s%s%s", HausInfo[HausID][hName], HausInfo[HausID][hID], HausInfo[HausID][hOwner], hstate, HausInfo[HausID][hLevel], GetPoint(HausInfo[HausID][hPreis]), GetPoint(HausInfo[HausID][hMiete]), hrentstate, str, str1);

  • PUBLIC:UpdateHaus(HausID)
    {
    new string[350],
    hstate[5] = "Nein",
    hrentstate[5] = "Nein",
    str[50] = "",
    str1[50] = "";


    if(HausInfo[HausID][hLocked])
    hstate = "Ja";


    if(HausInfo[HausID][hRentable] == 1)
    hrentstate = "Ja";


    if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0)
    strcat(str,"\n\nNutze /buyhouse um das Haus zu kaufen!");


    if(HausInfo[HausID][hRentable] == 1)
    strcat(str1,"\nNutze /einmieten um dich einzumieten!");
    format(string, 280, "%s\n\nHaus Nummer: %d\nBesitzer: %s\nVerschlossen: %s\nLevel: %d\nPreis: $%s\nMietpreis: $%s\nMietbar: %s%s%s", HausInfo[HausID][hName], HausInfo[HausID][hID], HausInfo[HausID][hOwner], hstate, HausInfo[HausID][hLevel], GetPoint(HausInfo[HausID][hPreis]), GetPoint(HausInfo[HausID][hMiete]), hrentstate, str, str1);


    if(IsValidDynamic3DTextLabel(HausInfo[HausID][hElement]))
    UpdateDynamic3DTextLabelText(HausInfo[HausID][hElement], COLOR_PICKUPS, string);
    else
    HausInfo[HausID][hElement] = CreateDynamic3DTextLabel(
    string,
    COLOR_PICKUPS,
    HausInfo[HausID][hausx],
    HausInfo[HausID][hausy],
    HausInfo[HausID][hausz],
    10,
    INVALID_PLAYER_ID,
    INVALID_VEHICLE_ID,
    1,
    0,
    0,
    -1,
    100
    );


    if(IsValidDynamicPickup(HausInfo[HausID][hPickup]))
    DestroyDynamicPickup(HausInfo[HausID][hPickup]);


    new pickupID = 1272;
    if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0)
    pickupID = 1273;


    HausInfo[HausID][hPickup] = CreateDynamicPickup(pickupID, 1, HausInfo[HausID][hausx], HausInfo[HausID][hausy], HausInfo[HausID][hausz], 0);


    return 1;
    }


    stock loadHauser()
    {
    new str[400], iCounter;
    mysql_query("SELECT * FROM `hauser`");
    mysql_store_result();


    while(mysql_fetch_row(str))
    {
    sscanf(str, "p<|>e<is[24]s[50]iiifffiiiii>", HausInfo[iCounter]);
    UpdateHaus(iCounter);
    ++iCounter;
    }
    mysql_free_result();
    }


  • PUBLIC:UpdateHaus(HausID)
    {
    if(HausID >= sizeof(HausInfo)) return 1;
    new string[350],
    hstate[5] = "Nein",
    hrentstate[5] = "Nein",
    str[50] = "",
    str1[50] = "";



    if(HausInfo[HausID][hLocked])
    hstate = "Ja";



    if(HausInfo[HausID][hRentable] == 1)
    hrentstate = "Ja";



    if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0)
    strcat(str,"\n\nNutze /buyhouse um das Haus zu kaufen!");



    if(HausInfo[HausID][hRentable] == 1)
    strcat(str1,"\nNutze /einmieten um dich einzumieten!");
    format(string, 280, "%s\n\nHaus Nummer: %d\nBesitzer: %s\nVerschlossen:
    %s\nLevel: %d\nPreis: $%s\nMietpreis: $%s\nMietbar: %s%s%s",
    HausInfo[HausID][hName], HausInfo[HausID][hID],
    HausInfo[HausID][hOwner], hstate, HausInfo[HausID][hLevel],
    GetPoint(HausInfo[HausID][hPreis]), GetPoint(HausInfo[HausID][hMiete]),
    hrentstate, str, str1);



    if(IsValidDynamic3DTextLabel(HausInfo[HausID][hElement]))
    UpdateDynamic3DTextLabelText(HausInfo[HausID][hElement], COLOR_PICKUPS, string);
    else
    HausInfo[HausID][hElement] = CreateDynamic3DTextLabel(
    string,
    COLOR_PICKUPS,
    HausInfo[HausID][hausx],
    HausInfo[HausID][hausy],
    HausInfo[HausID][hausz],
    10,
    INVALID_PLAYER_ID,
    INVALID_VEHICLE_ID,
    1,
    0,
    0,
    -1,
    100
    );



    if(IsValidDynamicPickup(HausInfo[HausID][hPickup]))
    DestroyDynamicPickup(HausInfo[HausID][hPickup]);



    new pickupID = 1272;
    if(strcmp(HausInfo[HausID][hOwner], "Niemand", true) == 0)
    pickupID = 1273;



    HausInfo[HausID][hPickup] = CreateDynamicPickup(pickupID, 1,
    HausInfo[HausID][hausx], HausInfo[HausID][hausy],
    HausInfo[HausID][hausz], 0);



    return 1;
    }



    stock loadHauser()
    {
    new str[400], iCounter;
    mysql_query("SELECT * FROM `hauser`");
    mysql_store_result();



    while(mysql_fetch_row(str))
    {
    sscanf(str, "p<|>e<is[24]s[50]iiifffiiiii>", HausInfo[iCounter]);
    UpdateHaus(iCounter);
    ++iCounter;
    }
    mysql_free_result();
    }




    Bitte, sollte nun funktionieren.