Re: [Tutorial] ClientPrefs
Quote:
|
Re: [Tutorial] ClientPrefs
(plugin bugged. removed.)
|
Re: [Tutorial] ClientPrefs
Try to simply run OnClientPutInServer() for every InGame client OnPluginStart() rather than L33-37. EDIT nvm; misread code; didn't notice at 2 places you were getting client cookies |
Re: [Tutorial] ClientPrefs
Quote:
Quote:
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. |
Re: [Tutorial] ClientPrefs
...
Ok Mabye you are writing over them. Are you by chance using onclientputinserver to initialize stuff! Because careclientcookiescached can happen before or after that. You may want to use onclientdonnected instead, to pre-initialize vars while you wait for cookies to load in. It may be that they are loading, but you are overwriting them with junk data later. Edit:didnt see this second page, but looks like is still probly relevant. |
Re: [Tutorial] ClientPrefs
Oka, thanks for help. I updated this plugin.
|
Re: [Tutorial] ClientPrefs
Does clientprefs keep track of which plugin assigned which cookie? Or should plugin authors be careful to ensure that the cookie name is unique?
|
Re: [Tutorial] ClientPrefs
Quote:
Quote:
Code:
|
Re: [Tutorial] ClientPrefs
Good to know. I recently saw a plugin (not on this site) that named its cookie "cookie." Was wondering if this might conflict with any other plugin with the same non-descriptive cookie name. Now I know it will lol
|
Re: [Tutorial] ClientPrefs
Should also mention that cookies should not be used to store stats, as in time played. It makes it nearly impossible to reset all the players in that cookie back to 0, etc. Should only be used as preferences.
|
| All times are GMT -4. The time now is 22:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.