Re: [Tutorial] ClientPrefs
Quote:
|
Re: [Tutorial] ClientPrefs
Quote:
(Actually, your plugin already covers the one exception to that rule) |
Re: [Tutorial] ClientPrefs
I tend to avoid making cookies for FakeClients because well... they'll never use them.
|
Re: [Tutorial] ClientPrefs
Well, my cookies are restored when I'm on my server and I manually reload the plugin (sm plugins reload XXXX or sm plugins unload XXXX + sm plugins load XXXX) BUT are not restored when I join the server.
NOTE: I don't think it's a "late load", because I have put the GetClientCookie() code when OnClientCookiesCached(). Also, my cookies are saved when player leave server (they are saved OnPluginEnd() too.). Can someone explain me what I have done wrong ? Should I give you my code ? |
Re: [Tutorial] ClientPrefs
Quote:
|
Re: [Tutorial] ClientPrefs
Quote:
|
Re: [Tutorial] ClientPrefs
Quote:
I already made a post for this, but it seems none saw it, or was able to fix it (or just wasn't interested). Quote:
Not sure if it's what you are asking for but, yes, it's called. I have print some debug text on OnClientCookiesCached() and GetClientCookies work for my other cookies. EDIT: Really ? No one wanna give me a hint ? Damn it ! |
Re: [Tutorial] ClientPrefs
I think this example have little mistake,
in cookie menu handler - CookieMenuAction_SelectOption action happens when you pick option "TestCookie" from cookie menu. So, you are picking old cookie value on OnClientCookiesCached(), So so, cookie OnOff integer value get change and saved AFTER you have choose menu option "On/Off". So so so, you need choose twice "on/off" option from menu to update rigth value in global variable g_bClientPreference[client]. how ever, I do have SourceMod Version: 1.5.2, has this feature changed for now ?? *edit could problem be SetCookiePrefabMenu ? bad timing |
Re: [Tutorial] ClientPrefs
Quote:
|
Re: [Tutorial] ClientPrefs
Quote:
OnPluginStart -> For 1 < i <= MaxClients > IsClientInGame(i) && AreClientCookiesCached(i) > OnClientCookiesCached(i) Here's another 'gotcha' the plugin tutorial forgot. BAD PHP Code:
GOOD PHP Code:
|
| All times are GMT -4. The time now is 22:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.