/removemoney - 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: /removemoney (
/showthread.php?tid=393477)
/removemoney -
Blackazur - 18.11.2012
Hello, i have script a /givemoney Command and all works, but how can i make a /removemoney Command, to remove from a Player any Money?
Here the /givemoney Cmd:
Код:
COMMAND:givemoney(playerid, params[])
{
new targetid, amount;
if(PlayerAdmin[playerid] < 4) return SendClientMessage(playerid,COLOR_RED,"You cannot use this Command!");
if(sscanf(params, "ud", targetid, amount)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givemoney <Part of Name/ ID> <Money>");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player is not connected");
GivePlayerMoneyEx(targetid, amount);
return 1;
}
Re: /removemoney -
[KHK]Khalid - 18.11.2012
https://sampwiki.blast.hk/wiki/ResetPlayerMoney
Re: /removemoney -
doreto - 18.11.2012
Just change from GivePlayerMoneyEx(targetid, amount); to
ResetPlayerMoney(targetid);
Re: /removemoney -
AaronKillz - 18.11.2012
Код:
COMMAND:removemoney(playerid, params[])
{
new targetid, amount;
if(PlayerAdmin[playerid] < 4) return SendClientMessage(playerid,COLOR_RED,"You cannot use this Command!");
if(sscanf(params, "ud", targetid, amount)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /removemoney <Part of Name/ ID> <Money>");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1, "Player is not connected");
GivePlayerMoneyEx(targetid, -amount);
return 1;
}
AW: /removemoney -
Blackazur - 18.11.2012
Works, thanks.