GetNWInt in a SetNWInt?

Is it possible? if so how?

I wan’t to get the current one and then set it to like +500 on the current one.

[lua]local newvalue = self.Entity:GetNWEntity(“NWname”) + 500
self.Entity:SetNWEntity(“NWname”,newvalue)[/lua]

Give more information please, we can’t guess when you want to call it.

When they press a button on a menu it will get the NWInt and then set it with GetNWInt + 500.

Just a button on menu… it’s called when they click it.

You can’t set a Networked Value in cl_init.lua what I do is make a console command in init.lua which sets the Networked Value and then you call that console command when you press the button

Lets say I’ll set it on PlayerSpawn, how do I get the NW and set it to +500 above the current.

[lua]button.DoClick = function()
if ( !LocalPlayer():GetNWEntity(“NWname”) ) then LocalPlayer():SetNWEntity(“NWname”,0) end
local newvalue = LocalPlayer():GetNWEntity(“NWname”) + 500
LocalPlayer():SetNWEntity(“NWname”,newvalue)
end[/lua]

I don’t know if it will work, try it out.

I got it working, thanks.