03.04.2010, 17:32 
	
	
	
		(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.
Please help me thanks
	
	
	
	
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;
}

