Now im working with the SQL tutorial found on garrysmod.com and im trying to add buttons in a derma menu that increase the stats that the tutorial sets. It works on the derma menu but it doesnt seem to save. Now ive when to where its being saved and added
fish = ply:GetNWInt( "fish" ) + 2
and it seems to save that, yet it only saves it once and i have to reconnect for it to update it once again.
Could someone give me some insight with this? Im not sure i should be using NWInt's...
ok, this works kind of like my money system. for my money system I created functions to give/take/check/display/set the networked integer. they pretty much take current add to current then reset NWInt to the updated value.
You need to set the NWvars serverside, you can just get the values clientside, not saving it, you can use concommand to send the new values clientside and apply it serverside.
Also, if all the players, don't need to know the values of others player, you should use usermessages to send your variables.
It will reduce the "buffer overflow" problem.
Sorry, you need to Log In to post a reply to this thread.