#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define col_grey 0xADADADFF
#define COLOR_RED 0xAA3333AA
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 20)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
return 1;
}
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#define col_grey 0xADADADFF
#define COLOR_RED 0xAA3333AA
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid,*health);*
if(health*>=*30)*
{
ClearAnimations(playerid);
}
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 20)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
else if(health >= 30)
{
ClearAnimations(playerid);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
{
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 20)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health >= 30)
{
ClearAnimations(playerid);
}
return 1;
}
forward _UpdatePlayersStatus();
public OnGameModeInit()
{
SetTimer("_UpdatePlayersStatus", 1000, true);
return 1;
}
public _UpdatePlayersStatus()
{
new Float:plHealth;
for(new i = 0,j = GetMaxPlayers(); i < j; i ++)
{
if(!IsPlayerConnected(i)) continue;
GetPlayerHealth(i, plHealth);
if(plHealth <= 20)
{
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
else if(plHealth >= 30)
{
SetPlayerSpecialAction(i, SPECIAL_ACTION_NONE);
ClearAnimations(i);
}
}
}
public OnPlayerUpdate(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health <= 20)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
if(health >= 30)
{
ClearAnimations(playerid);
SetPlayerSpecialAction(i, SPECIAL_ACTION_NONE);
}
return 1;
}
all fine but my player move with bugs now LOL but thank you for the help...
I think it cleans every second the anim |