Raised This Month: $ Target: $400
 0% 

random password generator ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-24-2009 , 11:58   Re: random password generator ?
Reply With Quote #2

Code:
#include <amxmodx> #include <amxmisc> #define PASSWORD_LENGTH 16 new sv_password; public plugin_init() {     register_plugin("Password Generator", "0.1", "Exolent");         register_clcmd("say /pass", "CmdPass");         sv_password = get_cvar_pointer("sv_password"); } public CmdPass(client) {     if( !access(client, ADMIN_CVAR) )     {         client_print(client, print_chat, "You have no access to that command!");         return PLUGIN_HANDLED;     }         new password[PASSWORD_LENGTH];     for( new i = 0; i < sizeof(password) - 1; i++ )     {         switch( i % 3 )         {             case 0: password[i] = random_num('0', '9');             case 1: password[i] = random_num('a', 'z');             case 2: password[i] = random_num('A', 'Z');         }     }         client_print(client, print_chat, "Password has been printed to your console.");     console_print(client, "^"sv_password^" is ^"%s^"", password);         set_pcvar_string(sv_password, password);         new name[32];     get_user_name(client, name, sizeof(name) - 1);         client_print(0, print_chat, "ADMIN %s :  set a random server password.", name);         return PLUGIN_HANDLED; }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 16:56.


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