22.08.2015, 18:14
Hello,
How can I detect if player is falling ( without parachute )
I got this, but not working very well.
How can I detect if player is falling ( without parachute )
I got this, but not working very well.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(GetPlayerAnimationIndex(playerid))
{
new animlib[32];
new animname[32];
GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,animname,32);
if(!strcmp(animname,"FALL_COLLAPSE",true))
{
if(PlayerInfo[playerid][pHas] == 0)
{
GivePlayerHP(playerid,-10);
SCM(playerid,COLOR_RED,"You fall and will -10 hp");
PlayerInfo[playerid][pHas] = 1;
SetTimerEx("UnHass",3000,0,"i",playerid);
}
}