SA-MP Forums Archive
Creating Anti-Health Hack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Creating Anti-Health Hack (/showthread.php?tid=536410)



Creating Anti-Health Hack - AroseKhanNiazi - 09.09.2014

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


Re: Creating Anti-Health Hack - Stinged - 09.09.2014

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


Re: Creating Anti-Health Hack - AroseKhanNiazi - 09.09.2014

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


Re: Creating Anti-Health Hack - PMH - 09.09.2014

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


Re: Creating Anti-Health Hack - AroseKhanNiazi - 10.09.2014

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