• How to use New Network Vars?
    2 replies, posted
Just need a little help understanding the new network vars, I was using the old ones for a while and now have to change all mine and I'm not having much luck. In the old version of the mod there were two network vars for you "On hand money" and your "money in the bank" and they worked fine, but the new Network vars I'm having trouble simulating that. Any help is wanted ;P What I "think" I under stand is the first value is the type of var( in my case a int ) and the second value is the unique identifier 0 to 32( I set "money on hand" to 0 and "bank money" to 1 ) then the names of the var which I set them to AmountMoney and AmountBank. After that what I read said you use Set<var name>(), in my case SetAmountMoney(), to set the vars value and you get it with Get<var name>().
You'll have to tell us what the actual problem is if you want help. And your code also helps most of the time. What you call "the new network vars" are called DataTable Vars. ( DTVars ) If you want to use the NWVars ( SetNWInt, etc ), you can still do it, they are not going anywhere. [editline]22nd April 2015[/editline] So you don't [i]have[/i] to use DTVars.
[QUOTE=Robotboy655;47572019]You'll have to tell us what the actual problem is if you want help. And your code also helps most of the time. What you call "the new network vars" are called DataTable Vars. ( DTVars ) If you want to use the NWVars ( SetNWInt, etc ), you can still do it, they are not going anywhere. [editline]22nd April 2015[/editline] So you don't [i]have[/i] to use DTVars.[/QUOTE] but on the garrys mod website in the updates the said they were obsolete. [QUOTE]The previously obsolete NWVars have been remade from scratch and now provide the same features and speed benefits as NetworkVars (formerly known as DTVars). Unlike NetworkVars, NWVars require no prior initialization and are identified by a name rather than a numerical index, making them suitable for every type of entity while minimizing conflicts with other addons. As a result, the maximum number of NetworkVars per entity has been reduced from 64 to 32 to reduce server load.[/QUOTE] anyway if they still work I feel dumb
Sorry, you need to Log In to post a reply to this thread.