TF2-Sandbox-Studio / TF2SB

🧰 TF2 Sandbox Core Plugin
https://sandbox.moddage.site
GNU General Public License v3.0
10 stars 3 forks source link

sbox_maxprops #12

Open unusual917 opened 6 years ago

unusual917 commented 6 years ago

I'm not sure if this is known, but when you edit sbox_maxprops, for some reason the cvar doesn't change, and it goes to 0 value. So when I do sbox_maxprops 500, it ends up being sbox_maxprops 0.

Worst of all, afterwards, it bugs out and it stays stuck at 0, and no matter what I do (restart server and put sbox_maxprops back to 800), it stays stuck at 0.

Is there any way to fix this? Also, in the code, there seems to be a repeat typo:

("sbox_maxprops", "100", "Server-side props limit.", 0, true, 0.0, true, 0.0); I tried changing it to ("sbox_maxprops", "100", "Server-side props limit.", 0, true, 0.0); but it still stuck at 0.

bakapear commented 6 years ago

https://sm.alliedmods.net/new-api/convars/CreateConVar It's not a repeat typo, the error here is that the maximum value is set to 0, which means that changing the convar results in being 0.

Possible fix:

CreateConVar("sbox_maxprops", "100", "Server-side props limit.", 0, true, 0.0, true, 1000.0);

default value: 100 | min value: 0 | max value 1000

or you set the last boolean to false and remove the float behind it :P

BattlefieldDuck commented 6 years ago

Yes, correct. Hope Danct will fix that soon.