TakePlayerMoney
#1

When i was new I have many difficulties regarding how to take money from player. So this is its stock. So that new players will do this easily.

PHP код:
stock TakePlayerMoney(player,amount)
{
    new 
cash;
    new 
togive;
    
cash GetPlayerMoney(player);
    
togive cash-amount;
    
ResetPlayerMoney(player);
    
GivePlayerMoney(playertogive);
}
//add this to your  gamemode
//Example
public OnPlayerDeath(playerid,killerid,reason)
{
       
TakePlayerMoney(playerid,200);

Reply


Messages In This Thread
TakePlayerMoney - by Maheerali - 19.09.2016, 17:15
Re: TakePlayerMoney - by oMa37 - 19.09.2016, 17:21
Re: TakePlayerMoney - by SickAttack - 19.09.2016, 20:12

Forum Jump:


Users browsing this thread: 1 Guest(s)