Problem with OnPlayerUpdate
#1

(Sorry my english)

Hello, i use a code for when a players health is lower than 20 he gets animation Crack and the server says a message to him.

This message says every seconds and its flood.

Код:
public OnPlayerUpdate(playerid)
{
	new Float:fHealth;

	GetPlayerHealth(playerid, fHealth);

	if(fHealth < 20)
	{
	  // Player health has changed since the last update -> server, so obviously thats the thing updated.
	  // Lets do further checks see if he's lost or gained health, anti-health cheat? ;)

	  if(fHealth < 20)
	  {
		  ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
	    SendClientMessage(playerid, COLOR_RED, "(ATENCIУN) Estбs muy herido, caes al suelo desplomado.");
	    SendClientMessage(playerid, COLOR_YELLOW, "(INFORMACIУN) Se ha llamado a los servicios de emergencia.");
      new name[MAX_PLAYER_NAME], string[48];
      GetPlayerName(playerid, name, sizeof(name));
	    format(string, sizeof(string), "(CIUDADANO HERIDO) El ciudadano (%s) estб gravemente herido",name);
		  SendFactionMessage(12, COLOR_LSPD, string);
		  SendFactionMessage(0, COLOR_LSPD, string);
		  SendFactionMessage(8, COLOR_LSPD, string);
		  SendFactionMessage(11, COLOR_LSPD, string);
		  SendFactionMessage(4, COLOR_LSPD, string);
	  }
	  else
	  {
	    //
	  }
	}
	return 0;
}
Please help me thanks
Reply


Messages In This Thread
Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 17:32
Re: Problem with OnPlayerUpdate - by Gamer_Z - 03.04.2010, 17:35
Re: Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 17:39
Re: Problem with OnPlayerUpdate - by Gamer_Z - 03.04.2010, 17:51
Re: Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 18:04
Re: Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 18:09
Re: Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 18:41
Re: Problem with OnPlayerUpdate - by AdrianX9 - 03.04.2010, 23:30

Forum Jump:


Users browsing this thread: 1 Guest(s)