Jump to content
  • 0

Problema comanda /bonus


Question

Posted

YCMD:bonus(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] > 1)
        return true;
    new string[43];
    new money = PlayerInfo[playerid][pLevel] * 500000 + random(8000000);
    new lvlbonus = PlayerInfo[playerid][pLevel] * 3 + random(5);
    new ppbonus = PlayerInfo[playerid][pLevel] * 10 + random(50);
    SetPlayerScore(playerid, lvlbonus);
    PlayerInfo[playerid][pLevel] += lvlbonus;
    UpdateVar(playerid, "Level", 3);
    PlayerInfo[playerid][pPremiumPoints] += ppbonus;
    UpdateVar(playerid, "PremiumPoints", 3);
    GivePlayerCash(playerid, 1, money);
    format(string, sizeof(string), "Server Bonus Random: Ai primit %s PremiumPoints, Level %d si %i $.", ppbonus, lvlbonus, FormatNumber(money));
    SCM(playerid, -1, string);
    return true;
}
image.thumb.png.4b03fdd74ea2c280e9f5c0e4292b1c00.png
 

3 answers to this question

Recommended Posts

  • 0
Posted
Acum 1 oră, StrypS a spus:

YCMD:bonus(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] > 1)
        return true;
    new string[43];
    new money = PlayerInfo[playerid][pLevel] * 500000 + random(8000000);
    new lvlbonus = PlayerInfo[playerid][pLevel] * 3 + random(5);
    new ppbonus = PlayerInfo[playerid][pLevel] * 10 + random(50);
    SetPlayerScore(playerid, lvlbonus);
    PlayerInfo[playerid][pLevel] += lvlbonus;
    UpdateVar(playerid, "Level", 3);
    PlayerInfo[playerid][pPremiumPoints] += ppbonus;
    UpdateVar(playerid, "PremiumPoints", 3);
    GivePlayerCash(playerid, 1, money);
    format(string, sizeof(string), "Server Bonus Random: Ai primit %s PremiumPoints, Level %d si %i $.", ppbonus, lvlbonus, FormatNumber(money));
    SCM(playerid, -1, string);
    return true;
}
image.thumb.png.4b03fdd74ea2c280e9f5c0e4292b1c00.png
 

Poftim

YCMD:bonus(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] > 1)
        return true;
    new string[43];
    new money = PlayerInfo[playerid][pLevel] * 500000 + random(8000000);
    new lvlbonus = PlayerInfo[playerid][pLevel] * 3 + random(5);
    new ppbonus = PlayerInfo[playerid][pLevel] * 10 + random(50);
    SetPlayerScore(playerid, lvlbonus);
    PlayerInfo[playerid][pLevel] += lvlbonus;
    UpdateVar(playerid, "Level", 3);
    PlayerInfo[playerid][pPremiumPoints] += ppbonus;
    UpdateVar(playerid, "PremiumPoints", 3);
    GivePlayerCash(playerid, 1, money);
    format(string, sizeof(string), "Server Bonus Random: Ai primit %d PremiumPoints, Level %d si %s$.", ppbonus, lvlbonus, FormatNumber(money));
    SCM(playerid, -1, string);
    return true;
}

 

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

  • 0
Posted
1 hour ago, StrikerM said:

Poftim


YCMD:bonus(playerid, params[], help) {
    if(PlayerInfo[playerid][pLevel] > 1)
        return true;
    new string[43];
    new money = PlayerInfo[playerid][pLevel] * 500000 + random(8000000);
    new lvlbonus = PlayerInfo[playerid][pLevel] * 3 + random(5);
    new ppbonus = PlayerInfo[playerid][pLevel] * 10 + random(50);
    SetPlayerScore(playerid, lvlbonus);
    PlayerInfo[playerid][pLevel] += lvlbonus;
    UpdateVar(playerid, "Level", 3);
    PlayerInfo[playerid][pPremiumPoints] += ppbonus;
    UpdateVar(playerid, "PremiumPoints", 3);
    GivePlayerCash(playerid, 1, money);
    format(string, sizeof(string), "Server Bonus Random: Ai primit %d PremiumPoints, Level %d si %s$.", ppbonus, lvlbonus, FormatNumber(money));
    SCM(playerid, -1, string);
    return true;
}

 

Era de la string am folosit unul prea mic, daca nu era de la string varianta ta era buna ms ori cum

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.