03.04.2010, 11:24
This will set your health to the amount of money you have.
This will set your money to the amount of health you have.
pawn Код:
public OnPlayerUpdate(playerid)
{
new Money = GetPlayerMoney(playerid);
SetPlayerHealth(playerid, Money);
}
pawn Код:
public OnPlayerUpdate(playerid)
{
new Float:Health = GetPlayerHealth(playerid);
SetPlayerMoney(playerid, Health);
}
//Somewhere in script
stock SetPlayerMoney(playerid, money)
{
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, money);
}