Initial import of amb734 - Client preferences extension.

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402072
This commit is contained in:
Matt Woodrow
2008-04-17 04:58:09 +00:00
parent 6c38c9264e
commit e63a5cd3dc
23 changed files with 3236 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#include <sourcemod>
#include "../include/clientprefs.inc"
new Handle:g_Cookie;
public OnPluginStart()
{
g_Cookie = RegClientPrefCookie("test-cookie", "A basic testing cookie");
}
public bool:OnClientConnect(client, String:rejectmsg[], maxlen)
{
LogMessage("Connect Cookie state: %s", AreClientCookiesCached(client) ? "YES" : "NO");
}
public OnClientCookiesLoaded(client)
{
LogMessage("Loaded Cookie state: %s", AreClientCookiesCached(client) ? "YES" : "NO");
new String:hi[100];
GetClientPrefCookie(client, g_Cookie, hi, sizeof(hi));
LogMessage("Test: %s",hi);
SetClientPrefCookie(client, g_Cookie, "somethingsomething");
GetClientPrefCookie(client, g_Cookie, hi, sizeof(hi));
LogMessage("Test: %s",hi);
}