09.08.2009, 16:32
Am i able to use this:
With OnPlayerStateChange?
Because the script above is not working good with the OnPlayerUpdate, and i need serious help, if you did help me i will give credits in /credits command ^^'
pawn Код:
#include <a_samp>
new neardeath[MAX_PLAYERS];
forward death(playerid);
forward crack(playerid);
forward OnPlayerUpdate(playerid);
new Float:pHealth;
public OnPlayerUpdate(playerid)
{
GetPlayerHealth(playerid,pHealth);
if (pHealth < 20.0)
{
SetPlayerFacingAngle(playerid, 0);
TogglePlayerControllable(playerid, 0);
SetTimerEx("crack", 55, false, "i", playerid);
neardeath[playerid]=true;
}
return 1;
}
public crack(playerid)
{
ApplyAnimation(playerid, "CRACK", "crckdeth1", 1, 1, 0, 0, 0, 1);
SetTimerEx("death", 60000, false, "i", playerid);
return 1;
}
public death(playerid)
{
SetPlayerHealth(playerid, 0);
return 1;
}
public OnPlayerDeath (playerid)
{
neardeath[playerid] = false;
return 1;
}
Because the script above is not working good with the OnPlayerUpdate, and i need serious help, if you did help me i will give credits in /credits command ^^'