You just have to use 1 cvar and have inside all states you want.
Here is an example:
PHP Code:
new cvar_ShopStatus
public plugin_init() {
cvar_ShopStatus = register_cvar("command_in_console_to_change_cvar", "default_value(0/1/2...)")
}
public Shop(id)
{
switch(cvar_ShopStatus)
{
case 0:
{
OpenShop(id)
}
case 1:
{
BlockShop(id)
}
// and more...
}
/****** OR *******/
if (get_pcvar_num(cvar_ShopStatus) == 2)
{
// Do something, if the value of the cvar is 2
}
}