View Single Post
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 01-16-2014 , 17:33   Re: [Tutorial] ClientPrefs
Reply With Quote #18

Quote:
Originally Posted by ddhoward View Post
Does clientprefs keep track of which plugin assigned which cookie?
Not really.
Quote:
Originally Posted by ddhoward View Post
Or should plugin authors be careful to ensure that the cookie name is unique?
This. For example, in some of my plugins I retrieve quake sounds client preferences this way.
Code:
new bool:QPreferences[MAXPLAYERS + 1]; public OnClientCookiesCached(client) {     if (AreClientCookiesCached(client))     {         decl String:value[5], Handle:preferences;         preferences = FindClientCookie("Quake Sound Pref");         GetClientCookie(client, preferences, value, sizeof(value));         CloseHandle(preferences);         QPreferences[client] = bool:!StringToInt(value);     } }
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline