12.06.2010, 15:06
Hi,
Try this instead:
I have edited where you had:
to:
I believe that should work now. I also removed the extra code under IsPlayerInAnyVehicle because that should still be called regardless underneath.
Try this instead:
pawn Код:
forward DeathSystem();
public DeathSystem()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Float:health;
GetPlayerHealth(i, health);
if(health < 10)
{
if(IsPlayerInAnyVehicle(i))
{
RemovePlayerFromVehicle(i);
}
TogglePlayerControllable(i, 0);
ApplyAnimation( i, "INT_HOUSE", "BED_Loop_R", 4.0, 1, 0, 0, 0, 0 );
ApplyAnimation( i, "INT_HOUSE", "BED_Loop_R", 4.0, 1, 0, 0, 0, 0 );
PulseSystem[i] = 1;
}
}
}
return 1;
}
pawn Код:
new Float:health;
if(GetPlayerHealth(i, health) < 10)
{...
pawn Код:
new Float:health;
GetPlayerHealth(i, health);
if(health < 10)
{...