Raised This Month: $32 Target: $400
 8% 

Anti No-Flash


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-07-2010 , 18:51   Anti No-Flash
Reply With Quote #1

Anti No-Flash

Purpose
This is a very simple plugin that reduces the advantage cheaters have with no-flash cheats. It makes other players disappear while a player is fully flashed thus having a similar effect on cheating and no cheating players: they don't know where their enemies are and are completely at their mercy for the duration of their blindness.

Limitations
In order not to alter the game mechanics, other players are hidden only for the time the flashed player is fully blind (completely white screen with no transparency). As soon as players gain "some" vision (the white screen begins to fade), all players are shown normally.

Why is this plugin useful
No-flash cheats are client side programs that ignore the server's order of showing a white screen. Since all server-side orders can be ignored by a client-side cheat, this plugin removes information that all players receive so cheaters don't have it.

Configuration vars
PHP Code:
//Toggles the plugin on and off (default: 1)
anti_noflash_on  

//Removes player flashing for testing purposes (imitates a no-flash cheat for all players). (default: 0)
anti_noflash_demo 

//Delay for player info to come back after the blindness begins to fade (default: 0.0). Suggested: keep it at 0.0.
anti_noflash_delay

//Ignore the anti no-flash effect for the selected teams: 0 = none, 1 = Terrorists, 2 = CTs  (default: 0)
anti_noflash_ignore 
Credits
MeRcyLeZZ for this post on how to cache player values
https://forums.alliedmods.net/showthread.php?t=87977

Changelog
Version 1.0.4 - Also strip grenades information, but only the ones that belong to other players so flashed cheaters don't realize they are flashed when they throw a grenade.
Version 1.0.5 - Improved code readability (thanks to Connor).
Version 1.0.6 - Added vars to ignore anti no-flash according to team (for HnS)
Version 1.0.7 - Only one var to skip teams and some code improvements (thanks to Hawk552)

I hope you find this useful. Suggestions are welcomed.

Enjoy,
Rul4.
Attached Files
File Type: sma Get Plugin or Get Source (antinoflash.sma - 8191 views - 3.6 KB)
__________________
Check out my other plugins.

Last edited by Rul4; 04-12-2010 at 15:40. Reason: Minor optimizations
Rul4 is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-07-2010 , 18:53   Re: Anti No-Flash Anticheat
Reply With Quote #2

I've never seen any "no flash" cheat alone, they always come integrated with a wallhack.
__________________
"There is no knowledge, that is not power"

Last edited by fezh; 03-07-2010 at 19:00. Reason: yay
fezh is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-07-2010 , 18:58   Re: Anti No-Flash Anticheat
Reply With Quote #3

Quote:
Originally Posted by fezh View Post
I've never seen any "no flash" anticheat alone, they always come integrated with a wallhack.
I've never seen a no-flash anticheat. Period.

Are you sure you don't mean a "no-flash cheat" alone?

You can use this plugin in conjunction with your favorite anti-wallhack... I am only solving the flash problem.
__________________
Check out my other plugins.
Rul4 is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-07-2010 , 19:00   Re: Anti No-Flash Anticheat
Reply With Quote #4

Quote:
Originally Posted by Rul4 View Post
I've never seen a no-flash anticheat. Period.

Are you sure you don't mean a "no-flash cheat" alone?

You can use this plugin in conjunction with your favorite anti-wallhack... I am only solving the flash problem.
Yeah, it was a little typo (anyway, shouldn't the title be more like "anti no flash cheat/hack"?). And about your last sentence, "no flash" is very noticeable by any admin spectating the cheater, not like wall hacks at all.
__________________
"There is no knowledge, that is not power"
fezh is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 03-07-2010 , 19:02   Re: Anti No-Flash Anticheat
Reply With Quote #5

Or have the title No Flash Anti-Cheat.
__________________
Hi.
Kreation is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-07-2010 , 19:44   Re: Anti No-Flash
Reply With Quote #6

@ALL
It doesn't matter whether anti-flash is a stand-alone hack or part of a multi-hack.
What matters is that it exists and this plugin does something about it.

@OP
I see that you're calculating the "holdtime" to seconds and saying that is how long the player is flashed.
However, what about when only part of the flash is gone away?
You can see players usually after 1-2 seconds instead of the full flash time because you aren't completely flashed anymore.

Also, if you are flashed multiple times, the duration will be longer than your plugin detects.
You should add support for this.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-07-2010 , 20:14   Re: Anti No-Flash
Reply With Quote #7

Quote:
Originally Posted by Exolent[jNr] View Post
I see that you're calculating the "holdtime" to seconds and saying that is how long the player is flashed.
However, what about when only part of the flash is gone away?
You can see players usually after 1-2 seconds instead of the full flash time because you aren't completely flashed anymore.
HoldTime is the part where you are fully flashed. Duration is the whole flashing time. So after 1-2 seconds you will see other players. Try it yourself.

Quote:
Originally Posted by Exolent[jNr] View Post
Also, if you are flashed multiple times, the duration will be longer than your plugin detects.
You should add support for this.
Are you assuming this or saying something you've tested? Because I have tried multiple flashes in a row on a player and the plugin behaves as you should expect, players disappear up to the exact moment the player starts regaining partial vision. If you have seen otherwise, please tell me how you achieved this and I will fix it.
__________________
Check out my other plugins.
Rul4 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-07-2010 , 23:32   Re: Anti No-Flash
Reply With Quote #8

Quote:
Originally Posted by Rul4 View Post
HoldTime is the part where you are fully flashed. Duration is the whole flashing time. So after 1-2 seconds you will see other players. Try it yourself.
Thanks. I did not know that.

Quote:
Originally Posted by Rul4 View Post
Are you assuming this or saying something you've tested? Because I have tried multiple flashes in a row on a player and the plugin behaves as you should expect, players disappear up to the exact moment the player starts regaining partial vision. If you have seen otherwise, please tell me how you achieved this and I will fix it.
I know that if say 3 flashes go off in your face, you are definitely flashed longer than if 1 flash went off in your face.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Rul4
Senior Member
Join Date: Sep 2008
Location: Argentina
Old 03-08-2010 , 00:15   Re: Anti No-Flash
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
I know that if say 3 flashes go off in your face, you are definitely flashed longer than if 1 flash went off in your face.
Well, from what I've tested, if 3 flashes go off in your face then you get more than one FadeScreen message. How long you should stay flashed is in the last message, the client does not "accumulate" message times (the server makes the math for it). So I believe I've programmed the right behavior in the plugin.

If you want to see for yourself, you can uncomment the chat line in the AddToFullPack and multi-flash yourself, you will see the exact time the plugin ends stripping your information and see that it is the same moment when your screen begins fading (i.e.: you regain partial vision).
__________________
Check out my other plugins.

Last edited by Rul4; 03-08-2010 at 00:32. Reason: typo
Rul4 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-08-2010 , 11:08   Re: Anti No-Flash
Reply With Quote #10

g_flashed_until[id] = read_data(2)/4096.0 + get_gametime();

You should float read_data value

Also i think you could use instead : g_flashed_until[id] = get_pdata_float(id, 514, 5)

Just make some comparison of bith values


Those following offsets were founded by VEN, and arkshine recently confirm, after having decompiled the .dll that it seems to be right.

Code:
514 - fGametime flashed until ?
515 - fGametime flashed at ?
516 - fHoldTimeInSeconds of ScreenFade
517 - fDurationInSeconds of ScreenFade
518 - iAlpha of ScreenFade

Last, you should cache maximum of things that are checked in addtofulpack such as bot, alive, plugin on/off so you can save some native calls.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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

Forum Jump


All times are GMT -4. The time now is 23:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode