What are you trying to turn on and off? Is it something in the same plugin or is it in another plugin controlled by a cvar or command? The answer to this question may change the answer to your question.
This is a simple example for doing this:
PHP Code:
// plugin_init
register_clcmd("say /example", "cmdExample")
public cmdExample(id)
{
if( cs_get_user_team(id) == CS_TEAM_CT ) // Only allow do something if player is CT.
{
// Change state of plugin or function being controlled
if( /* on */ }
{
// turn off
}
else
{
// turn on
}
}
}
If this doesn't work or you don't understand then you need to answer my above question and explain exactly what you are using it for.
__________________