Raised This Month: $ Target: $400
 0% 

if authid is bla bla {


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-24-2005 , 05:33  
Reply With Quote #1

This is my code:
Code:
#include <amxmodx> #include <amxmisc> #define max_admins 64 public login(id) {     new usercfg[64]     new arguser[32], argpass[32], password[32]     new line = 0     new flags     new strflags[32]     new linetext[255], linetextlength         read_argv(1,arguser,31)     read_argv(2,argpass,31) {     if((arguser[0] > 0)&&(argpass[0] > 0))     {           get_customdir(usercfg, 63)         format(usercfg, 63, "%s/amxmodx_login/admins.ini", usercfg)         if (file_exists(usercfg))         {             while ((line = read_file(usercfg, line, linetext, 256, linetextlength)))             {                 if(linetext[0] == ';')                 {                     continue                 }                       parse(linetext, 31, password, 31, strflags, 31)                 flags = read_flags(strflags)                 if((equal(arguser))&&(equal(password, argpass)))                 {                     set_user_flags(id, flags)                     new text[128]                     format(text, 128, "[AMXX AUTH] You are now logged in, with the flags: %s.", strflags)                       client_print(id, print_console, text)                     return PLUGIN_HANDLED                 }             }             client_print(id, print_console, "[AMXX AUTH] Incorrect password.")         }     }     return PLUGIN_HANDLED } public logout(id) {     remove_user_flags(id, -1)     client_print(id, print_console, "[AMXX AUTH] You are now logged out of administrator status")     return PLUGIN_HANDLED } public plugin_init() {        ///////////gonna fix later     register_clcmd("amx_login","login",-1,"amx_login - <password> - Logs a player in as admin")     register_clcmd("amx_logout","logout",-1,"amx_logout - Logs a player out of admin") }
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
Reply



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 00:28.


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