Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #define PLUGIN "Set Pass | IntelGaming Club"
- #define VERSION "1.0b"
- #define AUTHOR "CheezPuff"
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- register_concmd("amx_pass","admin_pass",ADMIN_PASSWORD,"<password>"); // console Cmd
- register_concmd("amx_nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Console Cmdg
- register_clcmd("say /pass","admin_pass",ADMIN_PASSWORD,"<password>"); // Chat Cmd
- register_clcmd("say /nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Chat Cmd
- register_clcmd("say .pass","admin_pass",ADMIN_PASSWORD,"<password>"); // Chat Cmd
- register_clcmd("say .nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Chat cmd
- }
- public admin_pass(id,level,cid)
- {
- if (!cmd_access(id,level,cid,1)) // Admin Access
- return PLUGIN_HANDLED
- if (read_argc() > 1)
- {
- new argv[32]
- read_argv(1,argv,31)
- set_cvar_string("sv_password",argv) // Func
- return PLUGIN_CONTINUE
- }
- return 1;
- }
- public admin_nopass(id,level,cid)
- {
- if (!cmd_access(id,level,cid,1))
- return PLUGIN_HANDLED
- set_cvar_string("sv_password","")
- return PLUGIN_CONTINUE
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement