Skip to content

Instantly share code, notes, and snippets.

@asherkin
Created December 16, 2017 12:26
Show Gist options
  • Save asherkin/8cacbb8c99a5aae41a8b549acf976cb3 to your computer and use it in GitHub Desktop.
Save asherkin/8cacbb8c99a5aae41a8b549acf976cb3 to your computer and use it in GitHub Desktop.
OnClientPostAdminCheckAndCookiesCached
bool g_bIsPostAdminCheck[MAXPLAYERS + 1];
void OnClientPostAdminCheckAndCookiesCached(int client)
{
// Do thing.
}
void OnClientConnected(int client)
{
g_bIsPostAdminCheck[client] = false;
}
void OnClientPostAdminCheck(int client)
{
g_bIsPostAdminCheck[client] = true;
if (AreClientCookiesCached(client)) {
OnClientPostAdminCheckAndCookiesCached(client);
}
}
void OnClientsCookiesCached(int client)
{
if (g_bIsPostAdminCheck[client]) {
OnClientPostAdminCheckAndCookiesCached(client);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment