Großes Problem.. Profis ran !

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 Liebe Brotfische ..


    ich habe folgedenes Problem .. undzwar habe ich zwar Biz.cfg usw alles da ..
    auch die Funktionen :


    forward LoadBizz();
    forward LoadSBizz();


    Aber ingame sind keine icons ? Kann mir bitte wer helfen ?


    MFG Rapture

    Einmal editiert, zuletzt von K3V1N ()

  • public LoadBizz()
    {
    new arrCoords[19][64];
    new strFromFile2[256];
    new File: file = fopen("Biz.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < sizeof(BizzInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, '|');
    BizzInfo[idx][bOwned] = strval(arrCoords[0]);
    strmid(BizzInfo[idx][bOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
    strmid(BizzInfo[idx][bMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
    strmid(BizzInfo[idx][bExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
    BizzInfo[idx][bEntranceX] = floatstr(arrCoords[4]);
    BizzInfo[idx][bEntranceY] = floatstr(arrCoords[5]);
    BizzInfo[idx][bEntranceZ] = floatstr(arrCoords[6]);
    BizzInfo[idx][bExitX] = floatstr(arrCoords[7]);
    BizzInfo[idx][bExitY] = floatstr(arrCoords[8]);
    BizzInfo[idx][bExitZ] = floatstr(arrCoords[9]);
    BizzInfo[idx][bLevelNeeded] = strval(arrCoords[10]);
    BizzInfo[idx][bBuyPrice] = strval(arrCoords[11]);
    BizzInfo[idx][bEntranceCost] = strval(arrCoords[12]);
    BizzInfo[idx][bTill] = strval(arrCoords[13]);
    BizzInfo[idx][bLocked] = strval(arrCoords[14]);
    BizzInfo[idx][bInterior] = strval(arrCoords[15]);
    BizzInfo[idx][bProducts] = strval(arrCoords[16]);
    BizzInfo[idx][bMaxProducts] = strval(arrCoords[17]);
    BizzInfo[idx][bPriceProd] = strval(arrCoords[18]);
    printf("BizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
    idx,
    BizzInfo[idx][bOwner],
    BizzInfo[idx][bMessage],
    BizzInfo[idx][bEntranceCost],
    BizzInfo[idx][bTill],
    BizzInfo[idx][bProducts],
    BizzInfo[idx][bMaxProducts],
    BizzInfo[idx][bInterior]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }


    public LoadSBizz()
    {
    new arrCoords[16][64];
    new strFromFile2[256];
    new File: file = fopen("sbizz.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < sizeof(SBizzInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, '|');
    SBizzInfo[idx][sbOwned] = strval(arrCoords[0]);
    strmid(SBizzInfo[idx][sbOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
    strmid(SBizzInfo[idx][sbMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
    strmid(SBizzInfo[idx][sbExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
    SBizzInfo[idx][sbEntranceX] = floatstr(arrCoords[4]);
    SBizzInfo[idx][sbEntranceY] = floatstr(arrCoords[5]);
    SBizzInfo[idx][sbEntranceZ] = floatstr(arrCoords[6]);
    SBizzInfo[idx][sbLevelNeeded] = strval(arrCoords[7]);
    SBizzInfo[idx][sbBuyPrice] = strval(arrCoords[8]);
    SBizzInfo[idx][sbEntranceCost] = strval(arrCoords[9]);
    SBizzInfo[idx][sbTill] = strval(arrCoords[10]);
    SBizzInfo[idx][sbLocked] = strval(arrCoords[11]);
    SBizzInfo[idx][sbInterior] = strval(arrCoords[12]);
    SBizzInfo[idx][sbProducts] = strval(arrCoords[13]);
    SBizzInfo[idx][sbMaxProducts] = strval(arrCoords[14]);
    SBizzInfo[idx][sbPriceProd] = strval(arrCoords[15]);
    printf("SBizzInfo:%d Owner:%s Message:%s Entfee:%d Till:%d Products:%d/%d Interior:%d.\n",
    idx,
    SBizzInfo[idx][sbOwner],
    SBizzInfo[idx][sbMessage],
    SBizzInfo[idx][sbEntranceCost],
    SBizzInfo[idx][sbTill],
    SBizzInfo[idx][sbProducts],
    SBizzInfo[idx][sbMaxProducts],
    SBizzInfo[idx][sbInterior]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }


    Bitteschöön

  • Am Anfang

    new PlayerIcons[MAX_PLAYERS][100];
    new picon[MAX_PLAYERS] = 0;


    Und nun musst in die While-Schleife nur folgenden Code einfügen:



    SetPlayerMapIcon(playerid, PlayerIcons[playerid][picon++], BizzInfo[idx][bEntranceX], BizzInfo[idx][bEntranceY], BizzInfo[idx][bEntranceZ], 36, 0, MAPICON_LOCAL);

    siehe: Hier

  • Voila, ein Tutorial über Schleifen.
    [ SCRIPTING ] Schleifen

    Nur wenn man das Unmögliche versucht kann man das absolut Mögliche erreichen
    Hermann Hesse


    „Was manche Menschen sich selber vormachen, das macht ihnen so schnell keiner nach.”
    Gerhard Uhlenbruck

  • Nein, so



    //Das steht bei dir schon im Script:
    while (idx < sizeof(BizzInfo)) {


    //Dann fügst du hier das ein:
    SetPlayerMapIcon(playerid, PlayerIcons[playerid][picon++], BizzInfo[idx][bEntranceX], BizzInfo[idx][bEntranceY], BizzInfo[idx][bEntranceZ], 36, 0, MAPICON_LOCAL);


    }


  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Nein,
    Syntax der while-Schleife:


    while(Bedingung)
    {
    anweisungen
    }

    Nur wenn man das Unmögliche versucht kann man das absolut Mögliche erreichen
    Hermann Hesse


    „Was manche Menschen sich selber vormachen, das macht ihnen so schnell keiner nach.”
    Gerhard Uhlenbruck

  • Ja dann bekomme ich erroor ...


    Zeile (11239) : error 017: undefined symbol "playerid"


    1 Errors, 0 Warnungen
    Du hast Errors im Skript. Kompilierung abgebrochen


    Und was muss bei den Sbizzes rein ? Das gleiche ?


    MFG Rapture

  • So habe ich gemacht...


    Zeile (11239) : error 022: must be lvalue (non-constant)
    Zeile (11651) : error 017: undefined symbol "playerid"


    2 Errors, 0 Warnungen
    Du hast Errors im Skript. Kompilierung abgebrochen


    PWNMod Compiler Version 1.2
    (c) Trooper[Y]
    In Kooperation mit GTA-Servers.de


    Schon wieder Errors :(

    Einmal editiert, zuletzt von K3V1N ()

  • Was dreht ihr dem armen Kerl denn für nen Scheiß an?


    Das stimmt ja hinten und vor nicht.


    Wenn überhaupt gehört SetPlayerMapIcon in OnPlayerConnect

    "Bevor ich mir Informationen aus der "Bild" hole,
    werde ich anfangen, Wahlergebnisse danach vorauszusagen,
    neben welchen Busch unsere Katze gepinkelt hat."

    Margarete Stokowski

  • Und wenn er das macht, hängt sich sein Script auf und er muss wieder einen neuen Beitrag schreiben.
    @Rapture:


    while (idx < sizeof(BizzInfo))
    {
    SetPlayerMapIcon(playerid, PlayerIcons[playerid][picon++], BizzInfo[idx][bEntranceX], BizzInfo[idx][bEntranceY], BizzInfo[idx][bEntranceZ], 36, 0, MAPICON_LOCAL);
    idx++;
    }


  • Bei dem bekomme ich genau das gleiche ^^


    Zeile (11239) : error 022: must be lvalue (non-constant)
    Zeile (11651) : error 017: undefined symbol "playerid"


    2 Errors, 0 Warnungen
    Du hast Errors im Skript. Kompilierung abgebrochen


    PWNMod Compiler Version 1.2
    (c) Trooper[Y]
    In Kooperation mit GTA-Servers.de


    :(((