NW Variables reset on disconnect

This is really starting to piss me off… I haven’t overwrote my PlayerDisconnect function or anything. But when I leave my server most of my NWBools NWInts etc:
Say I were to do
lua_run for k,v in pairs( player.GetAll() ) do v:SetNWBool( “weee”, true ) end

everyone would have that bool as true but when they leave and join it will be false…

For example:
In my InitialSpawn function (Yes I am calling self.BaseClass ) I check if the player has an NWBool, if not it plays an intro and the intro sets it once its done. Iv’e checked with a MsgAll function, the bool does save. If they join again, the bool is set to false and they have to watch the intro all over again, help is appreciated:
function GM:PlayerInitialSpawn( ply )
self.BaseClass:PlayerInitialSpawn( ply )
if ply:EV_IsOwner() then
ply:SetTeam( 1 )
elseif ply:EV_IsAdmin() then
ply:SetTeam( 2 )
ply:SetTeam( 3 )
if ply:GetNWBool( “eclipse_introduction” ) == true then
ply:SetModel( “models/player/Group03/Male_0” … math.random( 1, 5 ) … “.mdl” )
ply:ConCommand( “play eclipse/ambience/EC_TheGlade.mp3” )
ply:ChatPrint( “Welcome to Eclipse, Its recommended to check the instructions on F1!” )
ply:ConCommand( “eclipse_help” )
ply:SetModel( “models/player/Group03/Male_04.mdl” )
ply:ConCommand( “eclipse_intro” )


Thats because when the player leaves their table gets deleted, and when they join again they have a new table.(This info is stored in the servers ram if it continued to hold everyones info that joined your ram would be quiet full) If you want it to save your going to have to use sql or have a txt file that saves the data and check the file everytime someone joins.



These functions will do exactly what you want, but be careful not to spam them.

Thank you so much guys :smiley: <3