Give cash to all - 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: Give cash to all (
/showthread.php?tid=454008)
Give cash to all -
Configuration - 27.07.2013
Hello how can make somthing /agive [ammount] and give cash to all player?
Thanks
Re: Give cash to all -
Donvalley - 27.07.2013
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
AW: Give cash to all -
Skimmer - 27.07.2013
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!");