• Alternative to NW values
    2 replies, posted
Hi this is a a basic question. what is an alternative to using NW values as I have heard they're arn't the best. but how would I create a table of a player meta information e.g money, name ect. with NW values you would to it like this. [lua]ply:SetNWInt("money", 930)[/lua] but how would I make a table of information which can be get and set without NW values?
If you want them to be networked, you can look into [url]http://wiki.garrysmod.com/page/PLAYER/SetupDataTables[/url] Once you set them up via Player:NetworkVar() you can call GetVariable() and SetVariable(x) to modify it Only issue with this is that it needs a player class set up [url]http://wiki.garrysmod.com/page/Player_Classes[/url] Otherwise, consider modifying the player metatable with FindMetaTable("Player") EDIT: [url]http://wiki.garrysmod.com/page/Global/AccessorFunc[/url] can be used with the metatable
When using an accessor func When ever I change the value on a server side hook something changes clientside
Sorry, you need to Log In to post a reply to this thread.