Increasing Health
#10

It should work like that

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys == KEY_FIRE)
	{
	  if(IsPlayerInRangeOfPoint(playerid, RANGE, CORDX, CORDY, CORDZ))
	  {
			new Float:health;
			GetPlayerHealth(playerid, health);
			if(health <=95)
			{
				SetPlayerHealth(playerid, health + 5);
				GivePlayerMoney(playerid, -2);
		  	SendClientMessage(playerid, COLOR_LIGHTBLUE, "You've bought a drink for $2");
			}
			else
		  {
		    SendClientMessage(playerid, COLOR_RED, "You still have plenty of health left");
			}
			return 1;
		}
	}
	return 1;
}
Reply


Messages In This Thread
Increasing Health - by sidhu123 - 27.01.2010, 01:49
Re: Increasing Health - by sidhu123 - 27.01.2010, 01:58
Re: Increasing Health - by lolumadd - 27.01.2010, 02:20
Re: Increasing Health - by sidhu123 - 27.01.2010, 02:28
Re: Increasing Health - by mansonh - 27.01.2010, 08:09
Re: Increasing Health - by sidhu123 - 27.01.2010, 16:52
Re: Increasing Health - by Joe Staff - 27.01.2010, 17:00
Re: Increasing Health - by sidhu123 - 27.01.2010, 17:10
Re: Increasing Health - by sidhu123 - 27.01.2010, 21:33
Re: Increasing Health - by actiwe - 27.01.2010, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)