How to check money
#2

This might help:
Код:
new amount=random(GetPlayerMoney(target))+1; //+1 otherwise the ransom will be 0
GivePlayerMoney(target,-amount);
GivePlayerMoney(playerid,amount);
Alternately You can set a minimum random amount:
Код:
new amount;
while(amount<1000)amount=random(GetPlayerMoney(target))+1;
GivePlayerMoney......
note that in the second one you need to make sure that they HAVE the minimum otherwise it will freeze your server.
Reply


Messages In This Thread
How to check money - by MWF2 - 05.08.2010, 19:25
Re: How to check money - by jonrb - 05.08.2010, 19:31
Re: How to check money - by MWF2 - 05.08.2010, 21:33
Re: How to check money - by MWF2 - 06.08.2010, 01:40
Re: How to check money - by Kar - 06.08.2010, 04:28
Re: How to check money - by MWF2 - 06.08.2010, 14:35
Re: How to check money - by Kar - 06.08.2010, 14:45
Re: How to check money - by MWF2 - 06.08.2010, 14:51
Re: How to check money - by MWF2 - 06.08.2010, 20:00
Re: How to check money - by Kar - 06.08.2010, 20:16
Re: How to check money - by MWF2 - 06.08.2010, 22:00
Re: How to check money - by Kar - 06.08.2010, 22:03
Re: How to check money - by MWF2 - 06.08.2010, 22:11
Re: How to check money - by westre - 06.08.2010, 22:25
Re: How to check money - by Kar - 06.08.2010, 23:50

Forum Jump:


Users browsing this thread: 1 Guest(s)