[HELP] Creating a new command...
#8

pawn Code:
forward CheckHealth();
public CheckHealth()
{
for(new i = 0; i < MAX_PLAYERS; i++)
  {
    new Float:health;
    GetPlayerHealth(i,health);
    if(health <= 20)
     {
        ApplyAnimation(i, "ped", "KO_spin_L", 4.1, 1, 1, 1, 1, 1, 1);
        TogglePlayerControllable(i,0);
     }
   }
   return 1;
}
Not tested though..anyways would be better to use OnPlayerUpdate for health checking since it checks health very frequently
Reply


Messages In This Thread
[HELP] Creating a new command... [STILL NEED HELP] - by Da' J' - 19.01.2012, 16:41
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 16:44
Re: [HELP] Creating a new command... - by Konstantinos - 19.01.2012, 16:55
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 17:14
Re: [HELP] Creating a new command... - by Konstantinos - 19.01.2012, 17:26
Re: [HELP] Creating a new command... - by milanosie - 19.01.2012, 18:10
Re: [HELP] Creating a new command... - by Da' J' - 19.01.2012, 18:11
Re: [HELP] Creating a new command... - by mSp - 19.01.2012, 18:22
Re: [HELP] Creating a new command... - by Da' J' - 19.01.2012, 18:44
Re: [HELP] Creating a new command... - by mSp - 19.01.2012, 18:51

Forum Jump:


Users browsing this thread: 2 Guest(s)