Garry's Mod

Garry's Mod

Money and Value System | Sandbox
此主题已被锁定
Corey Derg 2022 年 1 月 3 日 下午 7:35
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.
< >
正在显示第 1 - 4 条,共 4 条留言
OneStep  [开发者] 2022 年 1 月 4 日 上午 2:51 
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 2022 年 1 月 4 日 上午 7:52 
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  [开发者] 2022 年 1 月 7 日 上午 10:15 
I have updated the addon to hopefully remove this exploit.
The fixes should apply to both chat commands, as well as the ATM.
最后由 OneStep 编辑于; 2022 年 1 月 7 日 上午 10:16
Corey Derg 2022 年 1 月 7 日 下午 1:40 
I am very glad I was of help! :melon::melon::steamthumbsup:
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50