anti cheat tips
#21

Quote:
Originally Posted by [ABK]Antonio
View Post
For armor...the best way is probably just creating your own ammunation menu/dialog...that way you can control that sort of thing...same with HP and stuff(though with HP machines you can probably check their animation if they're in a certain position instead of removing every sprunk machine/healer)
Care to say what would happen to the checkpoints already in the Ammunation?
Reply
#22

Quote:
Originally Posted by Tee
View Post
Care to say what would happen to the checkpoints already in the Ammunation?
afaik just disabling the interior enter/exits will disable all the ammunation checkpoints.

also the point of timing out a player is so they don't have to rejoin manually, crashing a players client would force them to manually rejoin or they'd just stop playing
Reply
#23

Well considering that the user doesn't want it disabled. In my house system, players enter via the pickup and exit via the default San Andreas house marker. When they exit I check their position and set them to the correct exit, so it would work.
Reply
#24

Quote:
Originally Posted by cessil
View Post
Rejoin Check
A pesky thing I've seen on CrazyBob's more than any other server is people rejoining within 20 seconds, these players have been cheaters and very troublesome. You can create a simple check to see if a player rejoins after a Kick or Quit, timeouts usually rejoin within 30seconds so only check for Kicks or Quits.
I save the last 10 names, ips and time they left and check under OnPlayerConnect to see when they quit/were kicked last.
Shall I explain why this is a vry bad method? Especially if we have (My)SQL[i] databases as native functions?
... Use ya brain, tip: timestamp, playername. SQLI: SELECT `time_left_server` FROM player_info WHERE `playername` = `Gamer_Z`; , or something


This is just to point out your faults and so you can correct them.

Anyway you put much time in it so I respect this piece of work (although I won't use any [new?] methods from your #1 post. I'll keep using my own ones ;P ).
Reply
#25

Quote:
Originally Posted by Gamer_Z
View Post
Shall I explain why this is a vry bad method? Especially if we have (My)SQL[i] databases as native functions?
... Use ya brain, tip: timestamp, playername. SQLI: SELECT `time_left_server` FROM player_info WHERE `playername` = `Gamer_Z`; , or something


This is just to point out your faults and so you can correct them.

Anyway you put much time in it so I respect this piece of work (although I won't use any [new?] methods from your #1 post. I'll keep using my own ones ;P ).
You haven't pointed out to as why it's a "vry bad method", why would you want to save another variable for every single player when you could just use a small array?

How many players do you have quitting your server per 30 seconds? If it's more than 10 then just increase the array.

I'm open to suggestions but it looks like you're just trying to correct something which doesn't need correcting for the sake of trying to sound smart.
Reply
#26

Quote:
Originally Posted by cessil
View Post
You haven't pointed out to as why it's a "vry bad method", why would you want to save another variable for every single player when you could just use a small array?

How many players do you have quitting your server per 30 seconds? If it's more than 10 then just increase the array.

I'm open to suggestions but it looks like you're just trying to correct something which doesn't need correcting for the sake of trying to sound smart.
You are limiting yourself, with SA-MP's abilities you shouldn't.


It's like having a pro sports car but just using it to drive around the city..
Reply
#27

Quote:
Originally Posted by Gamer_Z
View Post
You are limiting yourself, with SA-MP's abilities you shouldn't.


It's like having a pro sports car but just using it to drive around the city..
How is he limiting himself? Seems to work fine if you ask me.
Reply
#28

Quote:
Originally Posted by Infinity
View Post
How is he limiting himself? Seems to work fine if you ask me.
let's create an situation where more than 30 players quit because of an crash or whatever, just anything,
If you use built in SQLi functions you can easily save them all, if you use just the 10 player variable you are limiting yourself to the last 10 players, so the other 20 won't be saved....
that is at least NOT usefull to ME, Don't know what you need guys, but again, not usefull for me.. just pointing out as I think there is AT LEAST one more person who thinks the same way as me..
Reply
#29

So what you are saying is that: Your players only ever have 100% health if they are hacking? Else they will have 99%. This is a good idea
Reply
#30

@DarkKillerWithPride<3
No it's not go re-read it again

@Gamer_Z
If 30 players quit because of a crash then how are they going to reconnect within 30seconds?
Reply
#31

Quote:
Originally Posted by Y_Less
View Post
Ambulances, vending machines, shops, and possibly other places, all modify health upwards too unless you disable them.
Yeah, the code would look like:

if ((!IsPlayerNearHealingSpot(playerid)) && (ssHealth < csHealth)) {
// cheat detected...
}

That syncing system has that problem too.
Reply
#32

A recent topic by wups about autoaiming was removed, I dont know why, but I guess it was people talked too much about the cheats and hacks, instead of ways how to detect and avoid them.
So this topic should be a discussion about ways to detect and ban certain hacks with pure scripting methods, so no external anti-cheat clients that players need to download or stuff like that. imo that stuff is just unrealistic, as noones gonna use it. Scripters should get good and elaborated ideas how to script their anticheat.
If this topic should get deleted again, please be kind and send me the reason, as I think that a topic like this is one of the most effective ways to face the raising number of hacks, without always begging the samp devs to "create sume anticheat".
Also avoid talking about the hacks themselves, if it is not neccessary. Hack reports should NOT contain a download link or how to use it ofc, but just describe how the hack works, and what it does, as exactly as possible.


Autoaiming
Ill start with a theory about detecting auto aim, that got deleted with the recent topic. I got no idea of how autoaiming really works, so please correct me if i assume anything wrong.
Autoaiming, or aim hacking automatically moves the players camera to target enemy players. It will of course move the camera (or the mouse) in straight lines, theres no reason why the software should move stuttery and in zig-zag lines. Im just still wondering if autoaim instantly moves the camera, so it jumps to the next target, or if it moves it with a certain speed.
So for some time we got the GetPlayerCameraFrontVector native to get the aiming vector (angles) of a player.
This can then be observed over a short time, like in OnPlayerUpdate, to see if it changes in straight, linear lines.
Sure human players can move their mouse in a straight line without any hacks, if they move fast or precise enough. So you shouldnt declare everyone as a hacker who does that. Its important to separate and weight: If a player turns 20° left straight, its nothing special, but if he turns around 180° with a fantastic speed, and without any stuttering or stops to directly target a player, it is a sure thing that this movement wasnt done by a human being.

Id like to elaborate my ideas of observing the aiming vector a bit, but would rather hear of my theroy is right, and autoaiming works this way, else it would be pointless to work out antihacks for non-existant hacks.
Reply
#33

A good bot will randomize his movements and speed to avoid getting detected. I doubt any of the SAMP mods do that though.
Reply
#34

To detect jetpack hacking you can hook SetPlayerSpecialAction and set a variable to true when the special action is a jetpack. Then you can hook OnPlayerSpawn, ClearAnimations, and SetPlayerSpecialAction (for SPECIAL_ACTION_NONE) to set the variable to false.

You should also hook OnPlayerKeyStateChange to detect if the car enter key is pressed and the player isn't moving (0 velocity) and set the variable to false at that time.

Then under OnPlayerUpdate check if GetPlayerSpecialAction equals SPECIAL_ACTION_USEJETPACK and if the variable is false, ban the player.

That's how you make a simple jetpack anticheat in an include.
Reply
#35

Quote:
Originally Posted by Dan..
View Post
Why should I use the syncing system for health checks? I mean, I can hook all functions that are modifying the value of health and use a timer to check if the server-sided value of health is lower than clients. If it is, it means they are cheating, else the client-sided value is stored. Isn't this a good idea too?
I'm not sure what you think I explained in the first post but you described what I explained in the first post

Quote:
Originally Posted by Mauzen
View Post
Autoaiming, or aim hacking automatically moves the players camera to target enemy players. It will of course move the camera (or the mouse) in straight lines, theres no reason why the software should move stuttery and in zig-zag lines.
Doesn't sound like a very good idea, when would you run the checks? they sound too intensive to run frequently
also one or both of the players would probably be moving and possibly jumping so the camera might seem to zigzag
Reply
#36

As it comes to teleporting, I have a little idea flowing in my mind.
You could extract all the default teleport positions from m0*_*a and check, if player has the exact same location. You can also use OnPlayerClickMap and check, if player traveled over A distance in B time (different in car and by foot) and ban them.
Reply
#37

Quote:
Originally Posted by Forever Alone
View Post
As it comes to teleporting, I have a little idea flowing in my mind.
You could extract all the default teleport positions from m0*_*a and check, if player has the exact same location. You can also use OnPlayerClickMap and check, if player traveled over A distance in B time (different in car and by foot) and ban them.
The locations are always a random amount off on the x/y/z each time the teleport is used, but it could still work.
Reply
#38

Quote:
Originally Posted by linuxthefish
View Post
The locations are always a random amount off on the x/y/z each time the teleport is used, but it could still work.
Didn't know that.
It would cause few false bans but in overall it does the job.
Reply
#39

Very nice tips, cessil. However, I don't understand on the Complete Server Side Money this line.
pawn Code:
if(GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));//if they have a new maximum cash then set it.
What should we store on the maxcash?
Reply
#40

Quote:
Originally Posted by Dwane
View Post
Very nice tips, cessil. However, I don't understand on the Complete Server Side Money this line.
pawn Code:
if(GetPVarInt(playerid,"cash") > GetPVarInt(playerid,"maxcash")) SetPVarInt(playerid,"maxcash",GetPVarInt(playerid,"cash"));//if they have a new maximum cash then set it.
What should we store on the maxcash?
their maximum cash that they've had in your server as given by the script during that connect time

Quote:
Originally Posted by SuperViper
View Post
To detect jetpack hacking you can hook SetPlayerSpecialAction and set a variable to true when the special action is a jetpack.
Is the only way to get a jetpack through SetPlayerSpecialAction?

Quote:
Originally Posted by Forever Alone
View Post
You can also use OnPlayerClickMap and check, if player traveled over A distance in B time (different in car and by foot) and ban them.
Added
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)