Priority-Issue Anti-Hack
#1

As most of you know GetPlayerHealth() is called before SetPlayerHealth() even though it should be called before GetPlayerHealth() in the script.

So my question is in order to realise a nice Anti-Hack System what is required to actually call GetPlayerHealth() after SetPlayerHealth() to avoid wrong hack-warnings?
Reply
#2

I think what you're saying is a script-related issue... Although, I would recommend checking out this topic: https://sampforum.blast.hk/showthread.php?tid=220089
Reply
#3

"wait for it to sync and then monitor it for changes"

How would you wait for it to 'sync'?
Reply
#4

Wait for the next player update. You can't simply get the new health right after you have changed it using SetPlayerHealth. A player update tells you, if the player has synced its new health with the server. A cheater can freely ignore SetPlayerHealth.
Reply
#5

Quote:

A player update tells you, if the player has synced its new health with the server.

So once setting a player's health, with the upcoming call of OnPlayerUpdate is should be set?
Reply
#6

OnPlayerUpdate is basically the client's response to something from the server. If you "SetPlayerHealth" somewhere, OnPlayerUpdate is going to be called once the client "syncs" with that health that you've just set (usually this is instantaneous).

Hackers, on the other hand, won't really respond to "SetPlayerHealth". So if you "SetPlayerHealth(playerid, 90.0);" and the client's health is still (for example) 100, then obviously either one of two things are wrong...

1. There's latency between the client and the server. In this case, check for a high ping. If the ping is below 300, they probably aren't lagging.
2. They are hacking and you should ban them.
Reply
#7

Ye ban him but here are any things u should know example clients-server pickups..machines shops.. Example i removed machines removed shops or pickups but im always fear of ban player if hes health hacking or not
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)