Problem mit Bizsystem

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
  • Hey Leute,
    Ich hab ein Problem mit dem Biz System vom SoL Script hier habt ihr mal den Code:


    if (strcmp(cmd, "/bizinfo", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if(bouse == 255)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Dir gehört kein Geschäfft.");
    return 1;
    }
    if (bouse >= 100)
    {


    PrintSBizInfo(playerid,bouse-100);
    }
    else
    {
    PrintBizInfo(playerid,bouse);
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/prodprice", true) == 0)
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört kein Geschäfft");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "FEHLER: /prodprice [kosten pro Produkt]");
    }
    if(strval(tmp) < 10 || strval(tmp) > 5000)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Der Prodpreis muss mindestens 10$ sein und kann höchsten 5000$ sein.");
    return 1;
    }
    if (bouse >= 100)
    {
    if(strval(tmp) > SBizzInfo[bouse-100][sbTill])
    {
    SendClientMessage(playerid, COLOR_WHITE, "Nicht genug Geld in der Businesskasse");
    return 1;
    }
    SBizzInfo[bouse-100][sbPriceProd] = strval(tmp);
    format(string, sizeof(string), "Produkte werden nun für %d$ / Produkt gekauft.", SBizzInfo[bouse-100][sbPriceProd]);
    new string4[160];
    if(SBizzInfo[bouse-100][sbOwned] == 1)
    {
    format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
    Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
    }
    }
    else
    {
    if(strval(tmp) > BizzInfo[bouse][bTill])
    {
    SendClientMessage(playerid, COLOR_WHITE, "Nicht genug Geld inder Businesskasse");
    return 1;
    }
    BizzInfo[bouse][bPriceProd] = strval(tmp);
    format(string, sizeof(string), "Produkte werden nun für %d$ / Produkt gekauft.", BizzInfo[bouse][bPriceProd]);
    new string3[200];
    if(BizzInfo[bouse][bOwned] == 1)
    {
    format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
    Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
    }
    }
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_WHITE, string);
    return 1;
    }
    if(strcmp(cmd, "/bizfee", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Dir gehört kein Geschäfft!");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "NUTZE: /bizfee [Preis]");
    }
    if(strval(tmp) < 0 || strval(tmp) > 250 && bouse != 102 && bouse != 105)
    {
    SendClientMessage(playerid, COLOR_WHITE, "Minimaler eintritt ist $0, Maximaler eintritt ist $250.");
    return 1;
    }
    if(bouse == 102)
    {
    if(strval(tmp) < 0 || strval(tmp) > 50)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Minimaler Spritpreis ist 0$, Maximaler Sprittpreis 50$.");
    return 1;
    }
    }
    if(bouse == 105)
    {
    if(strval(tmp) < 0 || strval(tmp) > 50)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Maximaler Preis pro Buchstabe: 50$, Minimaler Preis: 0$!");
    return 1;
    }
    }
    if (bouse >= 100)
    {
    SBizzInfo[bouse-100][sbEntranceCost] = strval(tmp);
    format(string, sizeof(string), "Eintritts Preis wurde auf $%d gesetzt.", SBizzInfo[bouse-100][sbEntranceCost]);
    }
    else
    {
    BizzInfo[bouse][bEntranceCost] = strval(tmp);
    format(string, sizeof(string), "Eintritts Preis wurde auf $%d gesetzt.", BizzInfo[bouse][bEntranceCost]);
    }
    new string3[160];
    if(BizzInfo[bouse][bOwned] == 1)
    {
    format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
    Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
    }
    new string4[160];
    if(SBizzInfo[bouse-100][sbOwned] == 1)
    {
    format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
    Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
    }
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/extortion", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Dir gehört kein Geschäfft");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "NUTZUNG: /extortion [playerid] (oder 555 für keinen)");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid))
    {
    if(giveplayerid != INVALID_PLAYER_ID)
    {
    GetPlayerName(playerid, sendername, sizeof(sendername));
    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
    format(string, sizeof(string), "* %s ist nun Teilhaber.",giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    format(string, sizeof(string), "* %s hat sein Business geteilt, nun bist du Teilhaber.",sendername);
    SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
    if (bouse >= 100)
    {
    format(string, sizeof(string), "%s",giveplayer);
    strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
    format(string, sizeof(string), "Business Teilhaber Name = %s",SBizzInfo[bouse-100][sbExtortion]);
    format(ALLSTRING, sizeof(ALLSTRING), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbBuyPrice],SBizzInfo[bouse-100][sbLevelNeeded]);
    Update3DTextLabelText(SBizzInfo[bouse-100][sbText], COLOR_FORSELL, ALLSTRING);


    }
    else
    {
    format(string, sizeof(string), "%s",giveplayer);
    strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
    format(string, sizeof(string), "Business Teilhaber Name = %s",BizzInfo[bouse][bExtortion]);
    format(ALLSTRING, sizeof(ALLSTRING), "[Business zu Verkaufen - %s]\nPreis: %d$\nLevel: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bBuyPrice],BizzInfo[bouse][bLevelNeeded]);
    Update3DTextLabelText(BizzInfo[bouse][bText], COLOR_FORSELL, ALLSTRING);
    }
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    }
    else if(giveplayerid == 555)
    {
    if (bouse >= 100)
    {
    format(string, sizeof(string), "Niemand");
    strmid(SBizzInfo[bouse-100][sbExtortion], string, 0, sizeof(string), 255);
    format(string, sizeof(string), "Business Teilhaber Name = %s",SBizzInfo[bouse-100][sbExtortion]);
    }
    else
    {
    format(string, sizeof(string), "Niemand");
    strmid(BizzInfo[bouse][bExtortion], string, 0, sizeof(string), 255);
    format(string, sizeof(string), "Business Teilhaber Name = %s",BizzInfo[bouse][bExtortion]);
    }
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
    return 1;
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/bizname", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Dir gehört kein Geschäfft");
    return 1;
    }
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_WHITE, "NUTZE: /bizname [Name]");
    }
    if (bouse >= 100)
    {
    strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
    format(string, sizeof(string), "Businessname wurde auf %s geändert",SBizzInfo[bouse-100][sbMessage]);
    }
    else
    {
    strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
    format(string, sizeof(string), "Businessname wurde auf %s geändert",BizzInfo[bouse][bMessage]);
    }
    new string3[160];
    if(BizzInfo[bouse][bOwned] == 1)
    {
    format(string3, sizeof(string3), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", BizzInfo[bouse][bMessage],BizzInfo[bouse][bOwner],BizzInfo[bouse][bExtortion],BizzInfo[bouse][bEntranceCost],BizzInfo[bouse][bLevelNeeded],BizzInfo[bouse][bProducts],BizzInfo[bouse][bMaxProducts],BizzInfo[bouse][bPriceProd]);
    Update3DTextLabelText(BizzInfo[bouse][bText],COLOR_BUYED,string3);
    }
    new string4[160];
    if(SBizzInfo[bouse-100][sbOwned] == 1)
    {
    format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[bouse-100][sbMessage],SBizzInfo[bouse-100][sbOwner],SBizzInfo[bouse-100][sbExtortion],SBizzInfo[bouse-100][sbEntranceCost],SBizzInfo[bouse-100][sbLevelNeeded],SBizzInfo[bouse-100][sbProducts],SBizzInfo[bouse-100][sbMaxProducts], SBizzInfo[bouse-100][sbPriceProd]);
    Update3DTextLabelText(SBizzInfo[bouse-100][sbText],COLOR_BUYED,string4);
    }
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    return 1;
    }
    if(strcmp(cmd, "/bizwithdraw", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Dir gehört kein Geschäfft");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    if (bouse >= 100)
    {
    format(string, sizeof(string), " Du hast $%d in deiner Kasse.", SBizzInfo[bouse-100][sbTill]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    }
    else
    {
    format(string, sizeof(string), " Du hast $%d in deiner Kasse.", BizzInfo[bouse][bTill]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    }
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /bizwithdraw [Betrag]");
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZE: /bizwithdraw [Betrag]");
    return 1;
    }
    if (bouse >= 100)
    {
    if(cashdeposit > SBizzInfo[bouse-100][sbTill] || cashdeposit < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du hast nicht so viel Geld");
    return 1;
    }
    }
    else
    {
    if (cashdeposit > BizzInfo[bouse][bTill] || cashdeposit < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du hast nicht so viel Geld");
    return 1;
    }
    }
    if (bouse >= 100)
    {
    if(!IsPlayerInRangeOfPoint(playerid,100.0,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist zu weit von deinem Geschäfft entfernt");
    return 1;
    }
    else
    {
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,cashdeposit);
    SBizzInfo[bouse-100][sbTill] -= cashdeposit;
    format(string, sizeof(string), " Du hast $%d aus deiner Kasse genommen Total: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_YELLOW, string);
    return 1;
    }
    }
    else
    {
    if (!IsPlayerInRangeOfPoint(playerid,100.0,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist zu weit von deinem Geschäfft entfernt");
    return 1;
    }
    else
    {
    ConsumingMoney[playerid] = 1;
    GivePlayerMoney(playerid,cashdeposit);
    BizzInfo[bouse][bTill] -= cashdeposit;
    format(string, sizeof(string), " Du hast $%d aus deiner Kasse genommen Total: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_YELLOW, string);
    return 1;
    }
    }
    }
    return 1;
    }
    if(strcmp(cmd, "/bizbank", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    new bouse = PlayerInfo[playerid][pPbiskey];
    if (bouse == 255)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Dir gehört kein Geschäfft");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    if (bouse >= 100)
    {
    format(string, sizeof(string), " Du hast $%d in deiner Kasse.", SBizzInfo[bouse-100][sbTill]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    }
    else
    {
    format(string, sizeof(string), " Du hast $%d in deiner Kasse.", BizzInfo[bouse][bTill]);
    SendClientMessage(playerid, COLOR_GRAD3, string);
    }
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZER: /bizbank [Betrag]");
    return 1;
    }
    new cashdeposit = strval(tmp);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /bizbank [nutze]");
    SendClientMessage(playerid, COLOR_GRAD3, string);
    return 1;
    }
    if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du hast nicht so viel");
    return 1;
    }
    if (bouse >= 100)
    {
    if(!IsPlayerInRangeOfPoint(playerid,100.0,SBizzInfo[bouse-100][sbEntranceX],SBizzInfo[bouse-100][sbEntranceY],SBizzInfo[bouse-100][sbEntranceZ]))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist zu weit von deinem Geschäfft entfernt");
    return 1;
    }
    else
    {
    GivePlayerMoney(playerid,-cashdeposit);
    SBizzInfo[bouse-100][sbTill] += cashdeposit;
    ExtortionSBiz(bouse-100, cashdeposit);
    format(string, sizeof(string), " Du hast $%d in die Kasse getan Total: $%d ", cashdeposit,SBizzInfo[bouse-100][sbTill]);
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_YELLOW, string);
    return 1;
    }
    }
    else
    {
    if (!IsPlayerInRangeOfPoint(playerid,100.0,BizzInfo[bouse][bExitX],BizzInfo[bouse][bExitY],BizzInfo[bouse][bExitZ]))
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist zu weit von deinem Geschäfft entfernt");
    return 1;
    }
    else
    {
    GivePlayerMoney(playerid,-cashdeposit);
    BizzInfo[bouse][bTill] += cashdeposit;
    ExtortionBiz(bouse, cashdeposit);
    format(string, sizeof(string), " Du hast $%d in die Kasse getan Total: $%d ", cashdeposit,BizzInfo[bouse][bTill]);
    OnPropUpdate();
    SendClientMessage(playerid, COLOR_YELLOW, string);
    return 1;
    }
    }
    }
    return 1;
    }
    Immer wenn ich diese Befehle eingebe kommt immer SERVER: Unknown Command.
    MfG
    Denis