How to make /givecashall Command ?
#2

Use: zcmd, sscanf2,

Include(s):
Код:
#include <zcmd>
#include <sscanf2>
Try This:
pawn Код:
CMD:givecashall(playerid, params[])
{
    new value;
    if(!IsPlayerAdmin(playerid)) return 1;
    if(sscanf(params, "d", value) != 0) SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /givecashall [Amount]"); return 1;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GivePlayerMoney(i, value);
        }
    }
    return 1;
}
or

pawn Код:
CMD:givecashall(playerid, params[])
{
    new value;
    if(sscanf(params, "d", value) != 0)
    return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /givecashall [Amount]");
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GivePlayerMoney(i, value);
        }
    }
    return 1;
}
Reply


Messages In This Thread
How to make /givecashall Command ? - by dakata994 - 01.11.2013, 12:04
Re: How to make /givecashall Command ? - by SAMProductions - 01.11.2013, 12:07
Re: How to make /givecashall Command ? - by Patrick - 01.11.2013, 12:10
Re: How to make /givecashall Command ? - by dakata994 - 01.11.2013, 12:11
Re: How to make /givecashall Command ? - by Patrick - 01.11.2013, 12:15
Re: How to make /givecashall Command ? - by d0nTtoucH - 01.11.2013, 12:15
Re: How to make /givecashall Command ? - by DaniceMcHarley - 01.11.2013, 12:17
Re: How to make /givecashall Command ? - by SAMProductions - 01.11.2013, 12:18
Re: How to make /givecashall Command ? - by DanishHaq - 01.11.2013, 12:23
Re: How to make /givecashall Command ? - by dakata994 - 01.11.2013, 12:25

Forum Jump:


Users browsing this thread: 1 Guest(s)