View Single Post
Author Message
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 10-22-2016 , 04:01   [solved ] change cvar only by IMMUNITY
Reply With Quote #1

is there any way this cvar should be change by who has ADMIN_IMMUNITY else it wont change

PHP Code:
#include <amxmodx>

new cvar_on;

public 
plugin_init()
{
    
register_clcmd("say /test","show_test");
    
//this cvar should be change by ADMIN_IMMUNITY ONLY
    
cvar_on register_cvar("testing_cvar","1");
}

public 
show_test(id)
{
    if(
get_pcvar_num(cvar_on))
    {
        
client_print(id,print_chat,"command is working");
    }
    else
    {
        
client_print(id,print_chat,"command is not working")
    }

__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 10-22-2016 at 14:01.
indraraj striker is offline