Money bar and the variable
#4

Код:
forward GivePlayerMoneyEx(playerid, amount);
public GivePlayerMoneyEx(playerid, amount)
{
	if(IsPlayerConnected(playerid))
	{
		PlayerInfo[playerid][Money] = PlayerInfo[playerid][Money] + amount;
	}
	return 1;
}

CMD:10cash(playerid, params[])
{
	GivePlayerMoneyEx(playerid, 10);
	SendClientMessage(playerid, -1, "You just received $10 from custom function");
	return 1;
}
Just replace all GivePlayerMoney with GivePlayerMoneyEx function and you are done

Now you can put on GivePlayerMoneyEx the update bar function so it will update the bar when you use it
Reply


Messages In This Thread
Money bar and the variable - by Bondage - 12.10.2015, 11:50
Re: Money bar and the variable - by bgedition - 12.10.2015, 11:54
Re: Money bar and the variable - by Vince - 12.10.2015, 12:55
Re: Money bar and the variable - by SecretBoss - 12.10.2015, 12:59
Re: Money bar and the variable - by AbyssMorgan - 12.10.2015, 13:07

Forum Jump:


Users browsing this thread: 1 Guest(s)