Priority-Issue Anti-Hack -
GiS - 20.06.2013
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?
Re: Priority-Issue Anti-Hack -
Scenario - 20.06.2013
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
Re: Priority-Issue Anti-Hack -
GiS - 20.06.2013
"wait for it to sync and then monitor it for changes"
How would you wait for it to 'sync'?
AW: Priority-Issue Anti-Hack -
BigETI - 20.06.2013
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.
Re: Priority-Issue Anti-Hack -
GiS - 20.06.2013
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?
Re: Priority-Issue Anti-Hack -
Scenario - 20.06.2013
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.
Re: Priority-Issue Anti-Hack -
dEcooR - 20.06.2013
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