Give cash to all
#1

Hello how can make somthing /agive [ammount] and give cash to all player?
Thanks
Reply
#2

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

Change this to

pawn Код:
if(sscanf(params, "d", value)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /agive [Amount]");
if(value <= 0) return SendClientMessage(playerid, 0xFF0000FF, "Invalid Amount!");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)