Level

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
  • Füg in den Payday ne abfrage ein , die abfragt ob der Spieler im mom. die Respect Punkte hat die erfordert werden , dann führst du die Aktion aus die in dem Level kauf Command
    durchgeführt wird

    Mfg. BlackFoX_UD_ alias [BFX]Explosion


  • Habs schon gemacht :D Fügs bei PayDay() ein

    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast nicht lange Genug gespielt!Kein PayDay!");
    }
    }
    new nxtlevel = PlayerInfo[i][pLevel]+1;
    new expamount = nxtlevel*levelexp-1;
    if (PlayerInfo[i][pExp] > expamount)
    {
    format(string, sizeof(string), "~g~LEVEL UP~n~~w~Du bist nun Level %d", nxtlevel);
    GameTextForPlayer(i, string, 5000, 1);
    //GivePlayerMoney(i, (-costlevel));
    PlayerInfo[i][pLevel]++;
    }
    }
    }
    Checkprop();
    return 1;
    }

  • jo so:

    //ma hier abgeschnitten ;)
    format(string, sizeof(string), "~y~PayDay!~n~~g~ cash!");
    GameTextForPlayer(i, string, 5000, 1);
    rent = 0;
    PlayerInfo[i][pPayDay] = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
    PlayerInfo[i][pExp]++;
    PlayerInfo[i][pPayDayHad] = 0;
    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast nicht lange Genug gespielt!Kein PayDay!");
    }
    }
    new nxtlevel = PlayerInfo[i][pLevel]+1;
    new expamount = nxtlevel*levelexp-1;
    if (PlayerInfo[i][pExp] > expamount)
    {
    format(string, sizeof(string), "~g~LEVEL UP~n~~w~Du bist nun Level %d", nxtlevel);
    GameTextForPlayer(i, string, 5000, 1);
    //GivePlayerMoney(i, (-costlevel));
    PlayerInfo[i][pLevel]++;
    }
    }
    }
    Checkprop();
    return 1;
    }

  • So kannste mit 0$ lvlup kommen....


    //ma hier abgeschnitten ;)
    format(string, sizeof(string), "~y~PayDay!~n~~g~ cash!");
    GameTextForPlayer(i, string, 5000, 1);
    rent = 0;
    PlayerInfo[i][pPayDay] = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    PlayerInfo[i][pPayDayHad] += 1;
    if(PlayerInfo[i][pPayDayHad] >= 5)
    {
    PlayerInfo[i][pExp]++;
    PlayerInfo[i][pPayDayHad] = 0;
    }
    }
    }
    else
    {
    SendClientMessage(i, COLOR_LIGHTRED, "* Du hast nicht lange Genug gespielt!Kein PayDay!");
    }
    }
    new nxtlevel = PlayerInfo[i][pLevel]+1;
    new expamount = nxtlevel*levelexp-1;
    new costlevel = nxtlevel*levelcost;
    if(GetPlayerMoney(playerid) < costlevel)
    {
    new infostring[256];
    format(infostring, 256, " Du verfügst nicht über ausreichend Geld ($%d)!",costlevel);
    SendClientMessage(playerid, COLOR_GRAD1, infostring);
    return 1;
    }
    if (PlayerInfo[i][pExp] > expamount)
    {
    format(string, sizeof(string), "~g~LEVEL UP~n~~w~Du bist nun Level %d", nxtlevel);
    GameTextForPlayer(i, string, 5000, 1);
    //GivePlayerMoney(i, (-costlevel));
    PlayerInfo[i][pLevel]++;
    }
    }
    }
    Checkprop();
    return 1;
    }


    thx an Interlink.....
    ^^
    PS: Aber so brauchst du auch /buylevel falls er nicht genügend Geld hat...
    und das mit dem Geld ist aus /buylevel :D

  • so, hier mal PayDay():


    public PayDay()
    {
    new string[128];
    new account,interest;
    new rent = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pLevel] > 0)
    {
    if(MoneyMessage[i]==1)
    {
    SendClientMessage(i, COLOR_LIGHTRED, "Fehlgeschlagen das Zahlen.");
    GameTextForPlayer(i, "~r~Verhaftet!", 2000, 1);
    SetPlayerInterior(i, 6);
    SetPlayerPos(i, 264.6288,77.5742,1001.0391);
    PlayerInfo[i][pJailed] = 1;
    ResetPlayerWeapons(i);
    WantedPoints[i] = 0;
    PlayerInfo[i][pJailTime] = 240;
    format(string, sizeof(string), "Sie Müssen noch %d Sekunden Absitzen. Freikauf: Unable", PlayerInfo[i][pJailTime]);
    SendClientMessage(i, COLOR_LIGHTBLUE, string);
    }
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(i, playername2, sizeof(playername2));
    account = PlayerInfo[i][pAccount];
    new key = PlayerInfo[i][pCribKey];
    if(key != 9999)
    {
    rent = CribInfo[key][hRent];
    if(strcmp(playername2, CribInfo[key][hOwner], true) == 0)
    {
    rent = 0;
    }
    else if(rent > GetPlayerMoneyKrayzie(i))
    {
    PlayerInfo[i][pCribKey] = 9999;
    SendClientMessage(i, COLOR_WHITE, "You have been evicted.");
    rent = 0;
    }
    CribInfo[key][hSafeCash] = CribInfo[key][hSafeCash]+rent;
    }
    new tmpintrate;
    if (key != 9999 && strcmp(playername2, CribInfo[key][hOwner], true) == 0)
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = intrate+4; }
    else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
    }
    else
    {
    if(PlayerInfo[i][pDonateRank] > 0) { tmpintrate = 3; }
    else { tmpintrate = 1; }
    }
    if(PlayerInfo[i][pPayDay] >= 5)
    {
    Tax += TaxValue;//Should work for every player online
    PlayerInfo[i][pAccount] -= TaxValue;
    if(PlayerInfo[i][pDonateRank] > 0)
    {
    new bonus = PlayerInfo[i][pPayCheck] / 2;
    PlayerInfo[i][pPayCheck] += bonus;
    }
    new citytax;
    new checks = PlayerInfo[i][pPayCheck];
    new ebill = (PlayerInfo[i][pAccount]/10000)*(PlayerInfo[i][pLevel]);
    new gangtax;
    new playergang = PlayerInfo[i][pGMember];
    ConsumingMoney[i] = 1;
    if (PlayerInfo[i][pGMember] > 0)
    {
    gangtax = (checks / 100) * GangInfo[playergang][GangTax];
    checks -= gangtax;
    GangInfo[playergang][GangMoney] += gangtax;
    }
    citytax = (checks / 100) * 5;
    checks -= citytax;
    CityValue += citytax;
    checks -= rent;
    GivePlayerMoneyKrayzie(i, checks);
    if(PlayerInfo[i][pAccount] > 0)
    {
    PlayerInfo[i][pAccount] -= ebill;
    SBizzInfo[4][sbTill] += ebill/85;
    }
    else
    {
    ebill = 0;
    }
    interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
    PlayerInfo[i][pExp]++;
    PlayerPlayMusic(i);
    PlayerInfo[i][pAccount] = account+interest;
    if (PlayerInfo[i][pGMember] == 0)
    {
    gangtax = 0;
    }
    if(PlayerInfo[i][pCribKey] == 9999 || PlayerInfo[i][pPbiskey] == 255)
    {
    ebill = 0;
    }
    SendClientMessage(i, COLOR_WHITE, "|----------------BANK Daten----------------|");
    format(string, sizeof(string), "| Bezahlung: $%d Steuern: -$%d", checks, citytax);
    SendClientMessage(i, COLOR_GRAD1, string);
    if (PlayerInfo[i][pGMember] > 0)
    {
    format(string, sizeof(string), "| Gang Taxes: -$%d", gangtax);
    SendClientMessage(i, COLOR_GRAD1, string);
    }
    if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
    {
    format(string, sizeof(string), "| Strom: -$%d", ebill);
    SendClientMessage(i, COLOR_GRAD1, string);
    }
    format(string, sizeof(string), "| Interest Rate: 0.%d percent [+$%d]",tmpintrate,interest);
    SendClientMessage(i, COLOR_GRAD2, string);
    format(string, sizeof(string), "| Alter Stand: [$%d] Neuer Stand: [$%d]", account,PlayerInfo[i][pAccount]);
    SendClientMessage(i, COLOR_GRAD5, string);
    if (key != 9999 && strcmp(playername2, CribInfo[key][hOwner], true) == 1)
    {
    format(string, sizeof(string), "| Miete: -$%d", rent);
    SendClientMessage(i, COLOR_GRAD5, string);
    }
    SendClientMessage(i, COLOR_WHITE, "|----------------BANK Daten----------------|");
    PlayerInfo[i][LastPDTax] = citytax + gangtax;
    PlayerInfo[i][LastPDEbill] = ebill;
    PlayerInfo[i][LastPDInterest] = interest;
    PlayerInfo[i][LastPDInterestRate] = tmpintrate;
    PlayerInfo[i][LastPDRent] = rent;
    PlayerInfo[i][LastPDPayCheck] = checks;
    PlayerInfo[i][LastPDBalance] = PlayerInfo[i][pAccount];
    PlayerInfo[i][PayDayDrawTimer] = 40;
    /*new coordsstring[256];
    format(coordsstring, sizeof(coordsstring), "~r~BANK STATEMENT~n~~w~Taxes: $~r~-%d~n~~w~Electricity: $~r~-%d~n~~w~Interest Rate: 0.%d (~g~+%d~w~)~n~Rent: $~r~-%d~n~~n~~w~Paycheck: $+~g~%d~n~~w~Bank Balance: $~g~%d", PlayerInfo[i][LastPDTax],PlayerInfo[i][LastPDEbill],
    PlayerInfo[i][LastPDInterestRate],
    PlayerInfo[i][LastPDInterest],
    PlayerInfo[i][LastPDRent],
    PlayerInfo[i][LastPDPayCheck],
    PlayerInfo[i][LastPDBalance]
    );
    TextDrawSetString(StatsDraws[i],coordsstring);
    TextDrawShowForPlayer(i,StatsDraws[i]);
    TextDrawHideForPlayer(i,StatsDraws[200+i]);*/


    format(string, sizeof(string), "~y~Zahltag!");
    GameTextForPlayer(i, string, 5000, 1);
    rent = 0;
    SaveGangs();
    PlayerInfo[i][pPayDay] = 0;
    PlayerInfo[i][pPayCheck] = 0;
    PlayerInfo[i][pConnectTime] += 1;
    PlayerInfo[i][pFishLicenseTime] -= 1;
    if (PlayerInfo[i][pFishLic] == 1 && PlayerInfo[i][pFishLicenseTime] <= 0)
    {
    PlayerInfo[i][pFishLic] = 0;
    PlayerInfo[i][pFishLicenseTime] = 0;
    SendClientMessage(i, COLOR_LIGHTRED, "* Ihre Fischer Licens ist Abgelaufen!");
    }
    // ... ^^




    ich habs schon versucht es da rein zu machen aber immer errors: invalid function or declaeration

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