Can i use this with OnPlayerStateChange ??
#1

Am i able to use this:
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;
}
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 ^^'
Reply


Messages In This Thread
Can i use this with OnPlayerStateChange ?? - by Martin_White - 09.08.2009, 16:32
Re: Can i use this with OnPlayerStateChange ?? - by Martin_White - 09.08.2009, 16:49
Re: Can i use this with OnPlayerStateChange ?? - by Moustafa - 09.08.2009, 17:26
Re: Can i use this with OnPlayerStateChange ?? - by Martin_White - 09.08.2009, 17:27
Re: Can i use this with OnPlayerStateChange ?? - by MadeMan - 09.08.2009, 18:44

Forum Jump:


Users browsing this thread: 1 Guest(s)