Jump to content
  • 0

Problema /givemoney


Marius Adrian Mihaila

Question

Salut 

Am si eu o problema , cand dau /givemoney sau /money /set money  dau banii dar se actualizeaza doar in /stats nu si pe ecran in dreapta , se actualizeaza doar dupa ce primeste bani de la payday/job etc . 

 

YCMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 7) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    if(CheckerBigInt(money) != 0) return true;
    Translate32Bit(StoreMoney[id], MoneyMoney[id], money);

    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 7);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Trebuie sa updatezi si UI-ul.

YCMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 7) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    if(CheckerBigInt(money) != 0) return true;
    Translate32Bit(StoreMoney[id], MoneyMoney[id], money);

    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 7);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    
    ResetPlayerMoney(id);
    GivePlayerMoney(id, MoneyMoney[id]);
                                        
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

 

Edited by CritteR
  • Thanks 1
Link to comment
Share on other sites

  • 0
Acum 10 minute, CritteR a spus:

Trebuie sa update-zi si UI-ul.

YCMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 7) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    if(CheckerBigInt(money) != 0) return true;
    Translate32Bit(StoreMoney[id], MoneyMoney[id], money);

    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 7);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    
    ResetPlayerMoney(id);
    GivePlayerMoney(id, MoneyMoney[id]);
                                        
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

 

Multumesc , merge perfect acum . 

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.