SA-MP Forums Archive
Need help making a payday command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help making a payday command (/showthread.php?tid=290675)



Need help making a payday command - Arsham7 - 16.10.2011

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..


Re: Need help making a payday command - Steve M. - 16.10.2011

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;
}



Re: Need help making a payday command - Arsham7 - 16.10.2011

+Rep

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