garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

NWVars NW2Vars

Open d4kir92 opened this issue 3 years ago • 5 comments

Details

any branch, latest version i made an admin mod, but in the scoreboard some nw2vars are not showing the right values is it because of "pvs"? what should i use for showing for example usergroup string NWVars? NW2Vars? or something else?

Steps to reproduce

server: ply:SetNW2String( "ug", "superadmin" )

client ply:GetNW2String( "ug", "NOTSET" )

for some players the usergroup shows "NOTSET"

is there a limitation how many NW2, NW vars i can use on an entity? is there a way to find out how many currently are on that entity?

d4kir92 avatar Jan 07 '22 15:01 d4kir92

Do not use NW2Vars. They were made available for testing, and should only be used for such.

robotboy655 avatar Jan 07 '22 15:01 robotboy655

ohhhh, thanks for the info! will use nwvars then. i started using them because NWVars wasnt working for some reason a time ago, atleast for me.

d4kir92 avatar Jan 07 '22 17:01 d4kir92

Preferably you should use the net library since you are exclusively sending data outside of prediction. The stock usergroup nwvar is a convenience garry-ism and should not be replicated.

Kefta avatar Jan 07 '22 18:01 Kefta

This happened so many times when I used to host.

thegrb93 avatar Jan 07 '22 22:01 thegrb93

yes, switch to net library for some use cases and use only nwvars (instead of nw2vars), helped! thanks guys 😄

d4kir92 avatar Jan 10 '22 15:01 d4kir92