As the title suggests you can buy a heal (Health = 100%) or Armour.
Adapt this to your script however you want to, change 5000/8000 if you think it's too much or too little
else if ( szCommand == "heal" ) {
if ( pPlayer.Health != 100 && pPlayer.Cash >= 5000)
{
pPlayer.Health = 100;
pPlayer.Cash -= 5000;
MessagePlayer( "Purchased a heal for $5000. Remaining cash: $" + pPlayer.Cash + ".", pPlayer);
}
else if ( pPlayer.Health == 100)
{
MessagePlayer( "You already have full health!", pPlayer);
}
else if ( pPlayer.Cash < 5000)
{
MessagePlayer( "You don't have enough money!", pPlayer);
}
}
else if ( szCommand == "armour" || szCommand == "armor" ) {
if ( pPlayer.Armour != 100 && pPlayer.Cash >= 8000)
{
pPlayer.Armour = 100;
pPlayer.Cash -= 8000;
MessagePlayer( "Purchased armour for $8000. Remaining cash: $" + pPlayer.Cash + ".", pPlayer);
}
else if ( pPlayer.Armour == 100)
{
MessagePlayer( "You already have full armour!", pPlayer);
}
else if ( pPlayer.Cash < 8000)
{
MessagePlayer( "You don't have enough money!", pPlayer);
}
}