Vending Machine Re-Heal
#9

ok i've put the machines at each hospital and put in front of them the checkpoint.. now i want to do like this but i don't know very well the if statement.. i have this code

Quote:

public OnPlayerEnterCheckpoint(playerid)
{

GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid, 100);
return 1;
}

i want to do this thing (i wrtite it like i would like to do)

Quote:

public OnPlayerEnterCheckpoint(playerid)
{
if(PlayerMoney < 1000) SendClientMessage(playerid, 0x800080AA, "You don't have much money!!"); else
GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid, 100);
return 1;
if(PlayerHealth = 100) SendClientMessage(playerid, 0x800080AA, "Your life is full!!"); else
GivePlayerMoney(playerid, -1000);
SetPlayerHealth(playerid, 100);
return 1;
}

I know this is an wrong code but this is what i would like to have... anyone can help me?
Reply


Messages In This Thread
Vending Machine Re-Heal - by VanillaRain - 26.04.2012, 18:31
Re: Vending Machine Re-Heal - by Falco-Ger - 26.04.2012, 22:36
Re: Vending Machine Re-Heal - by TheDominator - 27.04.2012, 02:22
Re: Vending Machine Re-Heal - by Ballu Miaa - 27.04.2012, 03:32
Re: Vending Machine Re-Heal - by MP2 - 27.04.2012, 07:35
Re: Vending Machine Re-Heal - by VanillaRain - 27.04.2012, 09:28
Re: Vending Machine Re-Heal - by MP2 - 27.04.2012, 09:33
Re: Vending Machine Re-Heal - by VanillaRain - 27.04.2012, 09:56
Re: Vending Machine Re-Heal - by VanillaRain - 27.04.2012, 11:56

Forum Jump:


Users browsing this thread: 1 Guest(s)