Garry's Mod

Garry's Mod

Money and Value System | Sandbox
This topic has been locked
Corey Derg 3 Jan, 2022 @ 7:35pm
Infinite Money Exploit
This addon doesn't take into account players can gain as much money as they want by dropping negative amounts of money on the ground and deleting it.

My suggestion on how to fix this issue: subtract the absolute value of the negative amount of money the player dropped from their account using an If statement that checks if the dropped amount is less than zero.

If an absolute value function isn't possible in LUA, just use multiplying the value by negative one.
< >
Showing 1-4 of 4 comments
OneStep  [developer] 4 Jan, 2022 @ 2:51am 
Thanks for reporting the issue.
Would you be so kind to give a step by step instruction in how to reproduce this issue.

Is it as simple as !drop -<number>?
Corey Derg 4 Jan, 2022 @ 7:52am 
Yes, its that simple. In a few situations where money is moved or given to a player, negative numbers cause a problem.

If a player gives another player negative money, it's just like stealing money. There's no inherent problem with that, but if that is done using a remote command instantly instead of a player clicking on a money entity, that's a big problem, as people could steal money from one another incredibly easily.

The NPC reward system works perfectly with negative numbers.
OneStep  [developer] 7 Jan, 2022 @ 10:15am 
I have updated the addon to hopefully remove this exploit.
The fixes should apply to both chat commands, as well as the ATM.
Last edited by OneStep; 7 Jan, 2022 @ 10:16am
Corey Derg 7 Jan, 2022 @ 1:40pm 
I am very glad I was of help! :melon::melon::steamthumbsup:
< >
Showing 1-4 of 4 comments
Per page: 1530 50