Need help making a payday command
#1

Hi, i want to make a payday command, to do /payday [Amount] and it will announce to server and GivePlayerMoney to all.

for example.

/payday 5000

Код:
Server Payday: $5000
simple as that. anyone tell me what i need to do?

CMD : payday etc.. etc..
Reply
#2

This is some basic command of that what you want:
pawn Код:
CMD:payday(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, -1, "[USAGE]: /payday [amount]");

    for(new p; p < MAX_PLAYERS; p++)
    {
        GivePlayerMoney(p, strval(params));
    }
     
    new
        pMsg[25];
     
    format(pMsg, sizeof(pMsg), "Server payday: $%d", strval(params));
     
    SendClientMessageToAll(-1, pMsg);
    return 1;
}
Reply
#3

+Rep

This will help me improve my future commands :P thanks!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)