Raised This Month: $ Target: $400
 0% 

Sorry to ask a noob question but...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Extremeone
Senior Member
Join Date: Jan 2005
Old 02-05-2005 , 16:21   Sorry to ask a noob question but...
Reply With Quote #1

how do i alter this code so only people with admin level t can have this command?

Code:
/* * * AMX_GRAVITY *  by JustinHoMi * */ #include <amxmodx> public admin_gravity(id,level){     if (!(get_user_flags(id)&level)){             console_print(id,"[AMX] You have no access to that command.")             return PLUGIN_HANDLED         }     if (read_argc() < 2){             new gravity_cvar = get_cvar_num("sv_gravity")             console_print(id,"[AMX] ^"sv_gravity^" is ^"%i^"",gravity_cvar)             return PLUGIN_HANDLED     }     new gravity[6]     read_argv(1, gravity, 5)     set_cvar_num("sv_gravity", str_to_num(gravity))     console_print(id,"[AMX] Gravity has been set to %s",gravity)     return PLUGIN_HANDLED } public check_gravity(id){     client_print(id,print_chat,"[AMX] The gravity is set at %i", get_cvar_num("sv_gravity"))     return PLUGIN_HANDLED } public plugin_init(){     register_plugin("Admin Gravity","0.2","JustinHoMi")     register_concmd("amx_gravity","admin_gravity",ADMIN_CVAR,"< gravity >")     register_clcmd("say /gravity","check_gravity")     register_clcmd("say_team /gravity","check_gravity")     return PLUGIN_CONTINUE }
[/small]
Extremeone is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode