PHP Code:
//The code that is fired should a client type !counter or /counter in chat, or sm_counter in console
public Action:Command_Counter(client, args)
{
//Since their status is already saved, use it to determine the change
if(g_canDisplay[client])
{
//Display is on, they want off
SetClientCookie(client, g_displayStatus, "0");
PrintToChat(client, "Yo what up with you, you don't like my counter? Fine then, I'll hide it from you");
}
else
{
//Display is off, turn on
SetClientCookie(client, g_displayStatus, "1");
PrintToChat(client, "You love my counter, don't you? Admit it! I shall show it to you then!");
}
g_canDisplay[client] = !g_canDisplay[client];
return Plugin_Handled;
}
__________________