Creating Anti-Health Hack
#1

pawn Код:
if(PlayerInfo[playerid][pArmour] == 0)
    {
        new Float:health =GetPlayerHealth(playerid,health);
        SetPlayerHealthEx(playerid,health-amount);
    }
    else
    {
        new Float:armour = GetPlayerArmour(playerid,armour);
        SetPlayerArmourEx(playerid,armour-amount);
        if(PlayerInfo[playerid][pArmour] < 0)
        {
            new Float:hh =GetPlayerHealth(playerid,hh);
            SetPlayerHealthEx(playerid,hh+PlayerInfo[playerid][pArmour]);
            PlayerInfo[playerid][pArmour]=0;
        }
    }
this code i placed under OnPlayerTakeDamage(....)

but if i get any amount of damage my health goes to 0.0 (Dead)

and yea pArmour and pHealth are float values
Reply
#2

pawn Код:
new Float:health =GetPlayerHealth(playerid,health);
Should be:
pawn Код:
new Float:health;
GetPlayerHealth(playerid,health);
etc..
Reply
#3

hmm well when i was doing this part i was not sure i thought lets try and *fail*
and thanks +rep
Reply
#4

LOL! I like your location! btw that loc doesn't exist for now Ganja virus id being detected everytime people try to download/isntall it
Reply
#5

Quote:
Originally Posted by PMH
Посмотреть сообщение
LOL! I like your location! btw that loc doesn't exist for now Ganja virus id being detected everytime people try to download/isntall it
will exist soon
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)