autocrack when player have 20 hp
#3

I have something like this.

pawn Код:
forward Health();
pawn Код:
public Health()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(gPlayerSpawned[i] == 1)
{
new Float:health;
GetPlayerHealth(i, health);
if(health < 30)
{
if(IsPlayerInAnyVehicle(i))
{
RemovePlayerFromVehicle(i);
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(i, "~r~You are injured, you need a medic !", 5000, 3);
}
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
GameTextForPlayer(i, "~r~You are injured, you need a medic !", 5000, 3);
}
}
}
}
return 1;
}
Don't mind the identation..

E:Fixed the failure
Reply


Messages In This Thread
autocrack when player have 20 hp - by Malkinu - 05.04.2010, 17:21
Re: autocrack when player have 20 hp - by pmk1 - 05.04.2010, 17:45
Re: autocrack when player have 20 hp - by Jay420 - 05.04.2010, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)