Biz-System Zeigt beim Namen nur 1 Buchstaben An

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 habe ein (hoffe ich mal) kleines Problem.


    Undzwar, ich habe ein Biz-System, worin man den Namen des Biz ändern kann, welches aber nicht ganz funktioniert.


    In meiner biz.cfg ist folgendes eingetragen:

    Code
    1368.2217,-1279.7111,13.1209,285.1202,-40.8925,1001.5156,Niemand,500000,1,1,0,0,1,5,0,500,LOL LOL,0,100


    Entweder er zeigt mir garnichts als Name oder den ersten Buchstaben "L" an. "LOL LOL" ist der Name als Test. ;)



    public Update3d(cons)
    {
    new a[256], as[256];
    if(cons == 0)
    {
    for(new h = 0; h<sizeof(HouseInfo); h++)
    {
    if(HouseInfo[h][hOwned] == 0)
    {
    format(a, sizeof(a), "Dieses Haus steht zum Verkauf\nPreis: $%d\nLevel: %d\nZum kaufen Tippe /buyhouse",HouseInfo[h][hPrice], HouseInfo[h][hLevel]);
    Update3DTextLabelText(text_house[h], COLOR_WHITE, a);
    }
    else
    {
    format(a, sizeof(a), "Dieses Haus gehört:\n%s\n\nMiete: $%d\nTippe /rentroom zum mieten", HouseInfo[h][hOwner], HouseInfo[h][hRent]);
    Update3DTextLabelText(text_house[h], COLOR_WHITE, a);
    }
    }
    }
    if(cons == 1)
    {
    for(new b = 0; b<sizeof(BizInfo); b++)
    {
    if(BizInfo[b][bOwned] == 0)
    {
    format(bizstring, sizeof(bizstring), "%s\n \nDiese Biz steht zum Verkauf\nPreis: $%d\nLevel: %d\nZum kaufen Tippe /buybiz",BizInfo[b][bName], BizInfo[b][bPrice], BizInfo[b][bLevel]);
    Update3DTextLabelText(text_biz[b], COLOR_WHITE, as);
    }
    else
    {
    format(bizstring, sizeof(bizstring), "%s\n \nBesitzer: %s\nEintritt: $%d\nEnter zum Betreten", BizInfo[b][bName], BizInfo[b][bOwner], BizInfo[b][bEintritt]);
    Update3DTextLabelText(text_biz[b], COLOR_WHITE, as);
    }
    }
    }
    }


    public LoadBiz()
    {
    new arrCoords[30][64];
    new strFromFile2[256];
    new File: file = fopen("biz.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < sizeof(BizInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, ',');
    BizInfo[idx][bEntrancex] = floatstr(arrCoords[0]);
    BizInfo[idx][bEntrancey] = floatstr(arrCoords[1]);
    BizInfo[idx][bEntrancez] = floatstr(arrCoords[2]);
    BizInfo[idx][bExitx] = floatstr(arrCoords[3]);
    BizInfo[idx][bExity] = floatstr(arrCoords[4]);
    BizInfo[idx][bExitz] = floatstr(arrCoords[5]);
    strmid(BizInfo[idx][bOwner], arrCoords[6], 0, strlen(arrCoords[6]), 255);
    BizInfo[idx][bPrice] = strval(arrCoords[7]);
    BizInfo[idx][bInt] = strval(arrCoords[8]);
    BizInfo[idx][bLock] = strval(arrCoords[9]);
    BizInfo[idx][bOwned] = strval(arrCoords[10]);
    BizInfo[idx][bKasse] = strval(arrCoords[11]);
    BizInfo[idx][bLevel] = strval(arrCoords[12]);
    BizInfo[idx][bWorld] = strval(arrCoords[13]);
    BizInfo[idx][bProds] = strval(arrCoords[14]);
    BizInfo[idx][bMaxProds] = strval(arrCoords[15]);
    strmid(BizInfo[idx][bName], arrCoords[16], 0, strlen(arrCoords[16]), 255);
    BizInfo[idx][bEintritt] = strval(arrCoords[17]);
    BizInfo[idx][bProdPreis] = strval(arrCoords[18]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }


    //OnGameModeInit
    SetTimer("OnPropUpdate", 60000, 1);


    LoadBiz();
    for(new b = 0; b < sizeof(BizInfo); b++)
    {
    if(BizInfo[b][bOwned] == 0)
    {
    format(bizstring, sizeof(bizstring), "%s\n \nDiese Biz steht zum Verkauf\nPreis: $%d\nLevel: %d\nZum kaufen Tippe /buybiz",BizInfo[b][bName], BizInfo[b][bPrice], BizInfo[b][bLevel]);
    text_biz[b] = Create3DTextLabel(bizstring, COLOR_WHITE, BizInfo[b][bEntrancex], BizInfo[b][bEntrancey], BizInfo[b][bEntrancez]+1, 15,0,1);
    Update3DTextLabelText(text_biz[b], COLOR_WHITE, bizstring);
    AddStaticPickup(1273, 23, BizInfo[b][bEntrancex], BizInfo[b][bEntrancey], BizInfo[b][bEntrancez]);
    }
    else
    {
    format(bizstring, sizeof(bizstring), "%s\n \nBesitzer: %s\nEintritt: $%d\nEnter zum Betreten", BizInfo[b][bName], BizInfo[b][bOwner], BizInfo[b][bEintritt]);
    text_biz[b] = Create3DTextLabel(bizstring, COLOR_WHITE, BizInfo[b][bEntrancex], BizInfo[b][bEntrancey], BizInfo[b][bEntrancez]+1, 15,0,1);
    Update3DTextLabelText(text_biz[b], COLOR_WHITE, bizstring);
    AddStaticPickup(1273, 23, BizInfo[b][bEntrancex], BizInfo[b][bEntrancey], BizInfo[b][bEntrancez]);
    }
    }


    Ich hoffe ihr könnt mir helfen. :/


    //edit


    Habe Mal ingame was getestet und gesehen dass er den Namen abspeichert als "A" wenn die Biz zB Ammunation LS heißt.
    Wenn ich in der biz.cfg etwas umändere nimmt er es zwar an ( Besitzer etc. ) aber er nimmt hauptsächlich den Namen nicht an. -.-

    Einmal editiert, zuletzt von Ap0llinaris ()

  • Warte mal kurz ich glaube ich kenne die Lösung, gib mir 10 min.



    EDIT: Jetzt bin ich etwas überfordert -.-

    Einmal editiert, zuletzt von K(X)Unit ()