give money to another player - 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 money to another player (
/showthread.php?tid=359571)
give money to another player -
prefex - 14.07.2012
i searching for a script , so that a player can give some money from himself to give to another player
Re: give money to another player -
Captain_Mani - 14.07.2012
It's in your Money Grub Gamemode that comes as a default gamemode. Check that giving money to another player in that gamemode.
Re: give money to another player -
leonardo1434 - 14.07.2012
Here you go, i've made it quirclky.
pawn Код:
CMD:givemoney(playerid,params[])
{
new
id,
amount,
l_string[77],
name[25];
if(sscanf(params,"ui",id,amount)) return SendClientMessage(playerid,-1,"/givemoney [id] [amount]");
if(GetPlayerMoney(playerid) < amount || GetPlayerMoney(playerid) <= 0)return SendClientMessage(playerid,-1,"You have no money enought");
if(id == playerid) return SendClientMessage(playerid,-1,"You can't give money to yourself.");
GivePlayerMoney(playerid,-amount);
GivePlayerMoney(id,amount);
GetPlayerName(playerid,name,25);
format(l_string,128,"%s has given to you the amount of money: %i",name,amount);
SendClientMessage(id,-1,l_string);
return 1;
}
its required zcmd && sscanf.
Re: give money to another player -
prefex - 14.07.2012
TYSM!!!!!
Re: give money to another player -
prefex - 14.07.2012
damn i allready have a commands /givemoney from my ZAdmin :S