SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 14/12/2011, 10:47 PM   #1
fiki574
Gangsta
 
fiki574's Avatar
 
Join Date: Mar 2011
Location: Croatia
Posts: 816
Reputation: 150
Default The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

ANTI HEALTH-HACK


VERSION 1.1 (NEW RELEASE)


New in version 1.1:

- Changed PVarInt(s) to PVarFloat(s)
- Added BanPlayer option (true/false)
- Few more changes in script

__________________________________________________ __________________________________________________

VIDEO:

http://www.youtube.com/watch?v=TXAup...ature=youtu.be

__________________________________________________ __________________________________________________

EXPLANATION:

Command to check health hack is /checkhh!

So, you must be logged in RCON to use this! Also, if you wanna have this in your admin script, then

find this:
pawn Code:
#define Admin IsPlayerAdmin
and change to this:
pawn Code:
#define Admin YourAdminScript

Lets begin!
Use /checkhh (playerid) to check target player! The target player´s Z position will be raised for 15

and he/she will fall down! When the /checkhh command is performed, it will triger

"CheckTakenHealth" timer! This timer is set to check health after 1 second, but you can change it

(its recommended to leave 1 second check):
pawn Code:
#define TakenHealthTime 1000
to:
pawn Code:
#define TakenHealthTime DesiredTime

When "CheckTakenHealth" ends, it will set PVar named "CurrHealth" (stands for CurrentHealth)! Also,

it will start new timer, which is "CheckNewHealth"! Change "NewHealthTime" from this:
pawn Code:
#define NewHealthTime 1000
into this:
pawn Code:
#define NewHealthTime DesiredTime

Then, "CheckNewHealth" finishes, stores new player health - also in PVar ("NewHealth") - and starts

timer "BanIfHacker" (timer wont be started if player lost health)! If player did not lose health,

system will automaticly ban him/her!
"BanIfHacker" timer is set to 1 second, but again, you can freely change it:
pawn Code:
#define BanHackerTime 1000
to:
pawn Code:
#define BanHackerTime DesiredTime
If player got banned, it will show him/her DIALOG_STYLE_MSGBOX with ban info and website where

he/she can post his unban app:
pawn Code:
#define Website yourwebsite

Choosing either to ban player or send message to admin bout possible HHacker!
pawn Code:
#define BanPlayer true //"true" -> it will ban player if he/she has HH | "false" -> it will send message to admin that player might be HHacking

__________________________________________________ _______________________________________________

IMPORTANT:

If you have AFK and/or Unlimited Health command, be sure you prevent checking immediately on command performing!

__________________________________________________ _______________________________________________

CREDITS:

fiki574_CRO - script
ZeeX - zcmd
Y_Less - sscanf

__________________________________________________ _______________________________________________

BUGS:

Shouldnt be any, but report if found!

__________________________________________________ _______________________________________________

DOWNLOAD:

Pastebin (v1.1)
Mediafire (v1.1)
__________________

If you need any help with anything related to SAMP and/or scripting/programming, feel free to PM me!
I am scripting/programming for money (very low prices, from $5 to $15 or more, price depends on complexity)

Last edited by fiki574; 15/12/2011 at 08:52 AM.
fiki574 is offline   Reply With Quote
Old 14/12/2011, 10:49 PM   #2
[Nikk]
High-roller
 
[Nikk]'s Avatar
 
Join Date: Jun 2011
Location: Argentina.
Posts: 1,522
Reputation: 52
Default Respuesta: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

very nice, thanks for this
__________________
[Nikk] is offline   Reply With Quote
Old 15/12/2011, 01:32 AM   #3
Emmet_
High-roller
 
Join Date: Dec 2009
Posts: 1,977
Reputation: 974
Default Re: Respuesta: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

Quote:
Originally Posted by Nikk123 View Post
very nice, thanks for this
You are seriously one hell of a spammer. 70% of your posts, are posted in old old threads, until you've bumped them, and you say "nice, very nice, thanks, etc..".

On-topic:
Very nice job. I think I'm going to be using this.

Also..

pawn Code:
new Float:CurrHealth;
GetPlayerHealth(target,CurrHealth);
SetPVarInt(target,"CurrHealth",GetPlayerHealth(target,CurrHealth));

I don't think that's going to work properly (you've used GetPlayerHealth 2 times, wtf ), however, instead of Int, try Float.

pawn Code:
new Float:CurrHealth;
GetPlayerHealth(target,CurrHealth);
SetPVarFloat(target,"CurrHealth",CurrHealth);

And instead of using GetPVarInt, you use GetPVarFloat.

Very nice, wish I could give you Rep+, but I already did for the NPC creator, and now I have to spread it around first.
Emmet_ is offline   Reply With Quote
Old 15/12/2011, 01:54 AM   #4
cessil
Beta Tester
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 2,266
Reputation: 250
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

I don't understand, you set their position so they fall down, then a second later you save their health and then another second later check their health? why would you even delay the first check?
also like Emmet_ said you're not using the PVar's properly but also you're not using the timers properly either

pawn Code:
SetTimer("CheckTakenHealth",TakenHealthTime,false);

public CheckTakenHealth() //contains target

SetTimer("CheckNewHealth",NewHealthTime,false);

CheckNewHealth() //contains target

SetTimer("BanIfHacker",BanHackerTime,false);

public BanIfHacker() //contains target
I'm wondering if you even tried to compile this, because that'd give you heaps of undefined errors with the target

also also
pawn Code:
if(sscanf(params, "uis", target))

only needs the u parameter.

you're not taking into consideration that players lag.
cessil is offline   Reply With Quote
Old 15/12/2011, 04:58 AM   #5
Dragony92
Huge Clucker
 
Dragony92's Avatar
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 438
Reputation: 25
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

I made this in a hurry... Should be useful....
http://pastebin.com/PNYK4JL8
pawn Code:
#include <YSI\y_timers>
#include <foreach>

new PlayerHealth[MAX_PLAYERS];
new Spawned[MAX_PLAYERS] = 1;

public OnPlayerConnect(playerid)
{
    Spawned[playerid] = 0;
    PlayerHealth[playerid] = 0;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    new Float:Health;
    GetPlayerHealth(playerid, Health);
    PlayerHealth[playerid] = Health;
    Spawned[playerid] = 1;
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    Spawned[playerid] = 0;
    return 1;
}

Timer:CheckHP[5000]()
{
    foreach(Player, i)
    {
        if(Spawned[i] == 1)
        {
            new Float:Health, string[58 + MAX_PLAYER_NAME];
            GetPlayerHealth(i, Health);
            if(Health > PlayerHealth[i])
            {
                Kick(i);
                format(string, sizeof(string),"Player %d has been kicked by AntiCheat. Reason: HealthHack");
                SendClientMessage(playerid, -1, string);
            }
            else
            {
                PlayerHealth[i] = Health;
            }
        }
    }
    return 1;
}

forward ACSetPlayerHealth(playerid, Float:health)
public ACSetPlayerHealth(playerid, Float:health) //Use this to SetPlayerHealth
{
    PlayerHealth[playerid] = health;
    SetPlayerHealth(playerid, health);
    return 1;
}

DraGoN's AntiCheat
Dragony92 is offline   Reply With Quote
Old 15/12/2011, 05:33 AM   #6
Neonman
High-roller
 
Join Date: Sep 2009
Posts: 2,278
Reputation: 257
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

useful. But fix bugs which cessil told you.
__________________
Neonman is offline   Reply With Quote
Old 15/12/2011, 07:45 AM   #7
fiki574
Gangsta
 
fiki574's Avatar
 
Join Date: Mar 2011
Location: Croatia
Posts: 816
Reputation: 150
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

Quote:
Originally Posted by Nikk123 View Post
very nice, thanks for this
Thank you!

Quote:
Originally Posted by Emmet_ View Post
You are seriously one hell of a spammer. 70% of your posts, are posted in old old threads, until you've bumped them, and you say "nice, very nice, thanks, etc..".

On-topic:
Very nice job. I think I'm going to be using this.

Also..

pawn Code:
new Float:CurrHealth;
GetPlayerHealth(target,CurrHealth);
SetPVarInt(target,"CurrHealth",GetPlayerHealth(target,CurrHealth));

I don't think that's going to work properly (you've used GetPlayerHealth 2 times, wtf ), however, instead of Int, try Float.

pawn Code:
new Float:CurrHealth;
GetPlayerHealth(target,CurrHealth);
SetPVarFloat(target,"CurrHealth",CurrHealth);

And instead of using GetPVarInt, you use GetPVarFloat.

Very nice, wish I could give you Rep+, but I already did for the NPC creator, and now I have to spread it around first.
Ok! So, it will give same results! I tried with Float and Int, bans me with HH both way! :P

Quote:
Originally Posted by cessil View Post
I don't understand, you set their position so they fall down, then a second later you save their health and then another second later check their health? why would you even delay the first check?
also like Emmet_ said you're not using the PVar's properly but also you're not using the timers properly either

pawn Code:
SetTimer("CheckTakenHealth",TakenHealthTime,false);

public CheckTakenHealth() //contains target

SetTimer("CheckNewHealth",NewHealthTime,false);

CheckNewHealth() //contains target

SetTimer("BanIfHacker",BanHackerTime,false);

public BanIfHacker() //contains target
I'm wondering if you even tried to compile this, because that'd give you heaps of undefined errors with the target

also also
pawn Code:
if(sscanf(params, "uis", target))

only needs the u parameter.

you're not taking into consideration that players lag.
Oh, my mystake (bout "uis")!
And timers work perfectly and do what they are supposed to do! Theres nothing wrong with timers! Just go and try it and you will see! :P
__________________

If you need any help with anything related to SAMP and/or scripting/programming, feel free to PM me!
I am scripting/programming for money (very low prices, from $5 to $15 or more, price depends on complexity)
fiki574 is offline   Reply With Quote
Old 15/12/2011, 08:31 AM   #8
cessil
Beta Tester
 
cessil's Avatar
 
Join Date: Apr 2009
Posts: 2,266
Reputation: 250
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

Quote:
Originally Posted by Dragony92 View Post
I made this in a hurry... Should be useful....
http://pastebin.com/PNYK4JL8
you're really depending on the player not pausing and the player having a low ping, although, even if the player had a low ping and had their health set just before the check then they'd get a false positive.
Also you should be removing everything that gives health like fast food restaurants and vending machines
cessil is offline   Reply With Quote
Old 15/12/2011, 08:45 AM   #9
Dragony92
Huge Clucker
 
Dragony92's Avatar
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 438
Reputation: 25
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

I know, i made it different for my mod, works perfect whole anticheat (stops when that is necessary),....
I only used your tip with armour 99
Dragony92 is offline   Reply With Quote
Old 15/12/2011, 08:53 AM   #10
fiki574
Gangsta
 
fiki574's Avatar
 
Join Date: Mar 2011
Location: Croatia
Posts: 816
Reputation: 150
Default Re: The Best Anti Health-Hack [Works 100%][Bans every single HealthHacker]

Ok! New version links are up! REDOWNLOAD!

@cessil
Params fixed, now its just "u" (tnx)

@Emmet_
Changed PVarInt(s) to PVarFloat(s)
__________________

If you need any help with anything related to SAMP and/or scripting/programming, feel free to PM me!
I am scripting/programming for money (very low prices, from $5 to $15 or more, price depends on complexity)
fiki574 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Anti Health Hack Rocketeer Help Archive 22 01/08/2011 02:48 AM
Anti Health Hack. Alex_Obando Help Archive 19 30/07/2011 09:19 AM
anti health hack vladi866 Help Archive 1 29/05/2011 02:52 PM
Anti Health Hack Unknown123 Help Archive 27 25/02/2011 12:46 AM
Anti-health hack. Auto-Sized Help Archive 4 24/02/2011 12:16 AM


All times are GMT. The time now is 04:25 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.