Advertisement
CheezPuff

Set Password Cmd [Soon update]

Feb 12th, 2017
388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.30 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5.  
  6. #define PLUGIN "Set Pass | IntelGaming Club"
  7. #define VERSION "1.0b"
  8. #define AUTHOR "CheezPuff"
  9.  
  10.  
  11. public plugin_init() {
  12.    register_plugin(PLUGIN, VERSION, AUTHOR)
  13.    
  14.    register_concmd("amx_pass","admin_pass",ADMIN_PASSWORD,"<password>"); // console Cmd
  15.    register_concmd("amx_nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Console Cmdg
  16.  
  17.    register_clcmd("say /pass","admin_pass",ADMIN_PASSWORD,"<password>"); // Chat Cmd
  18.    register_clcmd("say /nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Chat Cmd
  19.  
  20.    register_clcmd("say .pass","admin_pass",ADMIN_PASSWORD,"<password>"); // Chat Cmd
  21.    register_clcmd("say .nopass","admin_nopass",ADMIN_PASSWORD,"- remove server password"); // Chat cmd
  22. }
  23.  
  24. public admin_pass(id,level,cid)
  25. {
  26.    if (!cmd_access(id,level,cid,1)) // Admin Access
  27.       return PLUGIN_HANDLED
  28.    
  29.    if (read_argc() > 1)
  30.    {
  31.       new argv[32]
  32.       read_argv(1,argv,31)
  33.       set_cvar_string("sv_password",argv) // Func
  34.       return PLUGIN_CONTINUE
  35.    }
  36.    return 1;
  37. }
  38.  
  39. public admin_nopass(id,level,cid)
  40. {
  41.    if (!cmd_access(id,level,cid,1))
  42.       return PLUGIN_HANDLED
  43.    
  44.    set_cvar_string("sv_password","")
  45.    return PLUGIN_CONTINUE
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement