View Single Post
01-11-18, 08:36 PM   #15
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Originally Posted by Ammako View Post
Can SetCVar be called at PLAYER_LOGOUT?
If so, I imagine a (partial) solution to this could be for an addon author to revert affected CVars back to defaults at logout.
Partial, because it wouldn't work if the user incorrectly exited the game before removing the addon, without explicitly logging out properly, but for the average user, this would effectively ensure that any changes to CVars from the addon wouldn't remain after uninstalling.
I'm just thinking/typing out loud, but what if you set a flag when PLAYER_LOGOUT is properly used or exited? If the player exits improperly, then the app would know that things didn't end well and make changes appropriately.
__________________
Author of JWExpBar and JWRepBar.
  Reply With Quote