Raised This Month: $ Target: $400
 0% 

Fix round win duplication exploit (money buy on dust2 and others)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-18-2017 , 09:24   Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #1

I'm getting headaches from an ancient exploit in the game regarding duplicating round wins by standing in certain areas of the map when the bomb explodes.

You can see a demonstration of the exploit here https://www.youtube.com/watch?v=2CUuQp7UnWg (skip to min 1, if you stand on that line when bomb explodes, you win multiple times)

The problem (besides terrorists winning the first round being able to buy full awp/deag/vesthelm/nades) is that in my PUG manager, since I'm detecting round ends as such:
PHP Code:
register_event("SendAudio""eT_win" "a""2&%!MRAD_terwin");
register_event("SendAudio""eCT_win""a""2&%!MRAD_ctwin" ); 
When this exploit happens, eT_win() is called multiple times (from testing, it seems to depend on number of players somehow, hence why in the video or most singleplayer local tests, it only duplicates the round win money, but online it's possible to get 3x or more). Because of this the T team receives 3 rounds won in the match and a huge money bonus and the match is ruined.


Is there any way to fix this? The exploit happens on multiple maps (just happened to me on airstrip near the pit) and completely breaks the game if abused, but is very hard to counter manually.

Even if I use some other way of detecting who won the round, the money problem is still there.


The exploit can be reproduced on de_dust2 by standing on the line in the video, on latest steam version of 1.6, with latest hlds, amxmodx 1.8.2 and no other plugins / modules loaded
PHP Code:
#include <amxmodx>

new g_count

public plugin_init() {
    
register_event("SendAudio""eT_win" "a""2&%!MRAD_terwin");
}

public 
eT_win() {
    
g_count++
    
client_print(0print_chat"%d t_win called"g_count)

Spoiler


I'm not sure if this is even the right place to ask this, I've searched a lot but can't find much on google about this. I'd assume something like "amxx money fix" if this problem was well known and solved.
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 06-18-2017 at 09:30.
aron9forever is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 06-18-2017 , 11:06   Re: Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #2

Then call it just once.
Code:
#include <amxmodx> new bool:g_bHasBeenCalled ; public plugin_init() {     register_event("SendAudio", "eT_win" , "a", "2&%!MRAD_terwin");     register_event("HLTV", "OnNewRound", "a", "1=0", "2=0") } public eT_win() {    if( ! g_bHasBeenCalled ) {     client_print(0, print_chat, "%d t_win called", g_count)     g_bHasBeenCalled = true ;    } } public OnNewRound() { g_bHasBeenCalled = false ; }
__________________

Last edited by edon1337; 06-18-2017 at 11:07.
edon1337 is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-18-2017 , 12:13   Re: Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
Then call it just once.
Code:
#include <amxmodx> new bool:g_bHasBeenCalled ; public plugin_init() {     register_event("SendAudio", "eT_win" , "a", "2&%!MRAD_terwin");     register_event("HLTV", "OnNewRound", "a", "1=0", "2=0") } public eT_win() {    if( ! g_bHasBeenCalled ) {     client_print(0, print_chat, "%d t_win called", g_count)     g_bHasBeenCalled = true ;    } } public OnNewRound() { g_bHasBeenCalled = false ; }
doesn't solve the money problem though

Quote:
Originally Posted by Natsheh View Post
PHP Code:
#include <infinite_round>

new Float:g_gametime;

public 
OnRoundEnd(   const RoundEndType:type  )
{
        if(
type == RoundEndTypes_Team)
        {
               if(
g_gametime >= get_gametime() - 2.0) {
                    return 
PLUGIN_HANDLED;
               }
               
g_gametime get_gametime();
        }
        return 
0;

Here if you are using amx version 1.8.2 you must follow the instructions & download arkshine infinite round plugin
https://forums.alliedmods.net/showthread.php?t=117782

This plugin checks if ct or ts win is called twice or more and block it.
this requires Orpheu though, and I need this to work without it
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 06-18-2017 at 12:14.
aron9forever is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-18-2017 , 11:42   Re: Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #4

PHP Code:
#include <infinite_round>

new Float:g_gametime;

public 
OnRoundEnd(   const RoundEndType:type  )
{
        if(
type == RoundEndTypes_Team)
        {
               if(
g_gametime >= get_gametime() - 2.0) {
                    return 
PLUGIN_HANDLED;
               }
               
g_gametime get_gametime();
        }
        return 
0;

Here if you are using amx version 1.8.2 you must follow the instructions & download arkshine infinite round plugin
https://forums.alliedmods.net/showthread.php?t=117782

This plugin checks if ct or ts win is called twice or more and block it.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-18-2017 at 11:45.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-18-2017 , 13:23   Re: Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #5

Orpheu is an important module of the amxmodx.
There's no reason why you shouldnt use it.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 06-18-2017 at 13:24.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 06-19-2017 , 08:18   Re: Fix round win duplication exploit (money buy on dust2 and others)
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Orpheu is an important module of the amxmodx.
There's no reason why you shouldnt use it.
reHLDS is the reason
I'll look into ReAPI and see if I can do it; tbh I was hoping someone here already faced and fixed this some other way

an explanation of WHY it's happening in the first place would be a good start, if anyone has a clue
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Reply



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 22:52.


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