give money to another player
#1

i searching for a script , so that a player can give some money from himself to give to another player
Reply
#2

It's in your Money Grub Gamemode that comes as a default gamemode. Check that giving money to another player in that gamemode.
Reply
#3

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.
Reply
#4

TYSM!!!!!
Reply
#5

damn i allready have a commands /givemoney from my ZAdmin :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)