SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 14/10/2019, 12:14 PM   #1
MajesticPTR
Little Clucker
 
Join Date: Jan 2016
Posts: 15
Reputation: 0
Thumbs down [Cheater] Car destruction

Hello, for a long time I have been struggling with the problem of cars being destroyed by cheaters. How can this be secured?

video: https://www.youtube.com/watch?v=nQp_S-oNadI
MajesticPTR is offline   Reply With Quote
Old 15/10/2019, 04:07 PM   #2
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 93
Reputation: 17
Default Re: [Cheater] Car destruction

I don't have a solution, but it'd be interesting to see how these kinds of hacks look in OnPlayerStateChange.

In my experience these hacks work by affecting several cars at once, it might be possible to detect a player using them by using a timer and seeing how many calls to OnPlayerStateChange are made in a second. I reckon more than two would be uncommon, but I'm not sure.
__________________
mashallah
Markski is online now   Reply With Quote
Old 15/10/2019, 04:08 PM   #3
Lokii
Huge Clucker
 
Join Date: Sep 2017
Posts: 373
Reputation: 87
Default Re: [Cheater] Car destruction

Quote:
Originally Posted by Markski View Post
I don't have a solution, but it'd be interesting to see how these kinds of hacks look in OnPlayerStateChange.

In my experience these hacks work by affecting several cars at once, it might be possible to detect a player using them by using a timer and seeing how many calls to OnPlayerStateChange are made in a second. I reckon more than two would be uncommon, but I'm not sure.
if player is in a car and uses this type of troll OnPlayerStateChange wont be called
__________________
Lokii is offline   Reply With Quote
Old 15/10/2019, 05:34 PM   #4
Markski
Big Clucker
 
Markski's Avatar
 
Join Date: Apr 2015
Location: La Plata, Argentina
Posts: 93
Reputation: 17
Default Re: [Cheater] Car destruction

Quote:
Originally Posted by Lokii View Post
if player is in a car and uses this type of troll OnPlayerStateChange wont be called
That is true, but the most common instance of this cheat makes a player pick up all the streamed-in vehicles and pile them up in the space of a few seconds or even under a second. This action does call OnPlayerStateChange at least twice per vehicle I reckon
__________________
mashallah
Markski is online now   Reply With Quote
Old 16/10/2019, 10:33 AM   #5
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,107
Reputation: 67
Default Re: [Cheater] Car destruction

these kind of cheats can be detected by callbacks
- OnPlayerStateChange >> if player's state changed without OnPlayerEnterVehicle, he's obviously hacking or placed by a function - PutPlayerInVehicle.
- OnUnoccupiedVehicleUpdate >> only 1 vehicle can be updated by player (on foot case only, otherwise player can collision to another vehicles and make these vehicles to be updated) so if he updates more than 1 vehicles, he's hacking.
- OnVehicleDamageStatusUpdate >> if vehicle loses everything (doors, bonnet and etc..) in one update, player is obviously trying to crash other players, or explode that vehicle.
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala 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
[FilterScript] Destruction God [0.3.7] Ygzeb Filterscripts 2 06/02/2015 03:04 AM
Destruction Derby Help Quinten Scripting Help 2 09/11/2014 09:59 AM
destruction pickup toi Scripting Help 3 11/12/2012 09:49 PM
[FilterScript] Perfect UnoccupiedVehicle Destruction - Ares Vehicle Destruction Rapgangsta Filterscripts 25 17/08/2011 03:10 AM
[GameMode] [GM] Redneck Destruction Abernethy Gamemode Scripts 5 01/08/2011 05:17 PM


All times are GMT. The time now is 10:42 PM.


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