/givemoney value too big
#9

Try this one,

pawn Код:
CMD:givemoney(playerid, params[])
{
    new
        pid,
        money
    ;
   
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You Are Not Admin But You Allowed To Use /pay");
    if(sscanf(params, "ui", pid, money)) return SendClientMessage(playerid, 0xFFFF00FF, "Usage : /{FF0000}GiveMoney {FFFF00}[ID] [Value]!");
    if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, 0xFFFF00FF, "Player Doesn't Exist!");

    new pName[MAX_PLAYER_NAME], Str[128];
    GetPlayerName(playerid, pName, sizeof(pName));
    format(Str, sizeof(Str), "Admin : %s Gave You $%i Cash!", pName, money);
    SendClientMessage(pid, 0x00FF00FF, Str);
    GivePlayerMoney(pid, money);
    return 1;
}
PS: You have created a local variable to hold the amount as an integer var and you're using it as float, that won't gonna work at all.
Reply


Messages In This Thread
/givemoney value too big - by UltraScripter - 10.11.2014, 13:53
Re: /givemoney value too big - by Inesh - 10.11.2014, 13:57
Re: /givemoney value too big - by DavidBilla - 10.11.2014, 14:01
Re: /givemoney value too big - by UltraScripter - 10.11.2014, 14:03
Re: /givemoney value too big - by UltraScripter - 10.11.2014, 14:07
Re: /givemoney value too big - by DavidBilla - 10.11.2014, 14:20
Re: /givemoney value too big - by Diti1 - 10.11.2014, 14:20
Re: /givemoney value too big - by HY - 10.11.2014, 14:22
Re: /givemoney value too big - by iOxide - 10.11.2014, 14:22
Re: /givemoney value too big - by biker122 - 10.11.2014, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)