Server sided health & armour
#2

I guess you want to do it like this?
Код:
if (Armour[playerid] > amount) Armor[playerid] -= amount;
else if (Armour[playerid])
{
    amount - Armour[playerid];

    Armour[playerid] = 0.0;

    if (amount)
    {
        if (Health[playerid] > amount) Health[playerid] -= amount;
        else Health[playerid] = 0.0;
    }
}
else if (Health[playerid] > amount) Health[playerid] -= amount;
else Health[playerid] = 0.0;
That will work just like the default damages. I got a similiar thing in my script as well. :P
Reply


Messages In This Thread
Server sided health & armour - by NeXoR - 30.10.2016, 11:21
Re: Server sided health & armour - by GoldenLion - 30.10.2016, 11:28
Re: Server sided health & armour - by NeXoR - 30.10.2016, 11:46

Forum Jump:


Users browsing this thread: 1 Guest(s)