Quote:
Originally Posted by ddhoward
Does clientprefs keep track of which plugin assigned which cookie?
|
Not really.
Quote:
Originally Posted by ddhoward
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);
}
}
__________________