Jump to content
  • 0

Problema comanda /bonus


StrypS

Question

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
 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
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.

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.