Making sure someone is dead?
#1

Alright, so I've made a system where if someone hits something while driving, and their vehicle takes damage, then they take a portion of damage too. However, I'm having some trouble with this. When the person's health gets to 0/-999.9, they don't properly die. Can someone please tell me how I can ensure they die.

Here's a snippet of relevant code

pawn Код:
if(damageAmount > 0.0)
{
    new Float:tmpFloat;
    GetPlayerHealth(i, tmpFloat);
    SetPlayerHealth(i, floatsub(tmpFloat, damageAmount));
    if((tmpFloat - damageAmount) <= 0.0) SetPlayerHealth(i, -999.99);
    else SetPlayerHealth(i, floatsub(tmpFloat, damageAmount));
}
Reply


Messages In This Thread
Making sure someone is dead? - by TaMeD - 22.06.2011, 05:16
Re: Making sure someone is dead? - by iggy1 - 22.06.2011, 05:44

Forum Jump:


Users browsing this thread: 1 Guest(s)