Quote:
Originally Posted by darklordpazuzu
Found a bug messing with the plugin tonight.
Say, I give everyone 10000 cash. If we lose the wave, everyone is set to -10000 cash. A negative value, and sm_addcash, sm_setcash do nothing what-so-ever. Using @red, @all, or "PlayerName". Nothing. sm_removecash works to drop them lower, only legit cash drops will increase the player cash.
|
As I said several posts ago:
Quote:
Originally Posted by Tylerst
Quote:
Originally Posted by KnoXviLLe
Bug.5 min after -12000$
|
Quote:
Originally Posted by Mitchell
I get that too, it's valve's shop thing, it trys to re-add the money, valve glitch though.
|
Quote:
Originally Posted by Jim E. Rustler
Valve can't math good.
|
Yeah, nothing I can do about it as far as I know.
|
Quote:
Originally Posted by Blacklight21
I'm new here, but for me, the best way to fix this problemm would be command to freeze cash, such as sm_freezecash ...
|
This wouldn't work to fix the problem either. The problem is that when you fail, your current upgrades are subtracted from your money, however, money given with the plugin isn't registered.
IE, You have 1000$ at wave start. You sm_addcash 3000 and buy 4000$ worth of stuff. You fail. The game sets your money back at 1000$, but subtracts the 4000$ worth of upgrades, leaving you at -3000$
I tried several different methods to fix this, such as firing the mvm_pickup_currency event, but have so far been unsuccessful.
The closest I've gotten to a fix was stripping the cheat flag and using the game's built in currency_give, which was able to bring the money back to positives. Unfortunately, it has the flag which disallows the server to force a client to use it, so I can't build it into the plugin.
I could also probably spawn a pile of money at the player's position if their currency is negative, but then everyone would get more money.
I also wanted to try SDKTools and using CTFPlayer::AddCurrency(int), but I'm still bad at getting signatures for these things.
Suffice to say, I haven't found any viable fixes yet.