Using some code lines to detect a cheat..?
#1

Hello world,

So long story short I had coded a very simple and short code, my plan was to use that code to kick triggerfinger.cs users.
If that CLEO script makes you shoot automatically, even if the server receives the packet about that bullet (like if you actually shot it), OnPlayerKeyStateChange crossed with OnPlayerWeaponShot would detect it and send warnings to online admins.
And it did work, or well, it was somewhat close.

When OnPlayerWeaponShot was getting called, a simple boolean would have told me if that bullet was shot after triggering KeyStateChange, or if it didn't and so it got shot automatically.

Precision with Deagle was almost 100%. Only glitchy weapons were the m4/ak-74, and I think SMG too. Those weapons when you crouched and shoot right after crouching were triggering warnings everytime. Also C-Bugging was triggering warnings too.

Now, I do not have it anymore, and I have done some mistakes when using newkeys and oldkeys under KeyStateChange for sure but.. shall I try to code it back? Do you think that is even possible?

Thanks!
Reply
#2

"Precision with Deagle was almost 100%."

There's your answer. I mean why not, If u don't find a way to detect m4/ak-47 then just don't
Reply
#3

First thing i will say, use triggerfinger script only for Deagle, its kinda useless with other weapons and people are using it specially with deagle.

Can you show us the code?
Reply
#4

I don't get it.

How are you even planning to detect triggerfinger? There are trigger fingers out there which emulates mouse left click press when aimed at a player, instead of just firing a bullet. It's nearly impossible to detect that, unless otherwise you've a specific launcher that would give you those info.
Reply
#5

Here is a video I've made

EDIT: Cannot manage to share utube link... it gets censored

EDIT2: Here, copy this link, remove the 2 spaces after "you".

Код:
https://www.you tube.com/watch?v=l91jO1xW39o&feature=you tu.be
Reply
#6

Quote:
Originally Posted by v1k1nG
Посмотреть сообщение
Here is a video I've made

EDIT: Cannot manage to share utube link... it gets censored

EDIT2: Here, copy this link, remove the 2 spaces after "you".

Код:
https://www.you tube.com/watch?v=l91jO1xW39o&feature=you tu.be
Like said before, if the cheat doesn't trigger key states it is possible to detect. Add some tolerance to it since the calls might not happen in the same moment.

But if it does trigger OnPlayerKeyStateChange it won't help much. There are triggerbots that trigger a mouse click like a legit player would do.
Reply
#7

I bet there are.. will take a deeper look into it. Do you know any of such bots?
Reply
#8

Use triggerfinger script only for Deagle, its kinda useless with other weapons and people are using it specially with deagle.

Can you show us the code?
Reply
#9

As I wrote in 1st post, I do not have that file anymore on my pc.
I've scripted something that should work like that, I don't like it yet, needs a lot of improvements.

Anyways it's pretty simple:

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys){
    if(
newkeys & (KEY_AIM) || oldkeys & (KEY_AIM)){
        if(
HOLDING(KEY_FIRE) && oldkeys & (KEY_AIM)){
            
P[playerid][IsShooting] = true;
            return 
1;
        }
        
P[playerid][IsShooting] = false;    
        return 
1;
    }
return 
1;
}
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ){
    if(
P[playerid][IsShooting] == false)SendClientMessage(playerid, -1"Invalid bullet | Not shooting");
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)