Quote:
Originally Posted by RedSword
Because when the plugins load, it doesn't get the clients' cookie. What it does is check that the clients have their cookie loaded (but not in your plugin's memory) using OnClientCookiesCached ==> why even do this ?.
Try to simply run OnClientPutInServer() for every InGame client OnPluginStart() rather than L33-37.
|
Quote:
Originally Posted by Arkarr
Here is it.
|
It looks like you've preserved the load code in OnClientPutInServer, which is horribly incorrect. It also looks like you only store the client data when they disconnect, which would reproduce the plugin reload bug. If you're worried about the overhead of updating your cookie data over and over again in your timer, you can use OnPluginEnd; but that's a thing.
EDIT: Unrelated to ClientPrefs, you should return Plugin_Stop in your Timer, otherwise you're leaking timers. Your plugin will eventually auto-unload after enough clients connect, from running out of Handles. You should also pass the flag TIMER_FLAG_NO_MAPCHANGE, as all of your timers should die then anyways.