Raised This Month: $ Target: $400
 0% 

Authid.ini


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Striker
Senior Member
Join Date: Mar 2004
Location: Germany
Old 11-13-2005 , 07:18  
Reply With Quote #7

hello,

I edited the plugin like this:

Code:
#include <amxmodx> #include <amxmisc> new g_szCfgsDir[64]; new g_szFile[] = "authid.ini"; public plugin_init(){     register_plugin("Plugin Name","0.1","Author")     get_configsdir(g_szCfgsDir, 63); } public WriteIt( id ){     new szAuthID[33];     get_user_authid(id, szAuthID, 32);     new szFileStr[64];     format(szFileStr, 63, "%s/%s", g_szCfgsDir, g_szFile);     new szText[64]     format(szText, 63, "^n^"%s^"", szAuthID);     if(file_exists(szFileStr)){         write_file(szFileStr, szText, -1);         console_print(id, "Added %s", szAuthID);     }else{         log_amx("File not found: %s", szFileStr);     }     return PLUGIN_HANDLED; } public client_putinserver( id ){     get_configsdir(g_szCfgsDir, 63);           new szFileStr[64];     format(szFileStr, 63, "%s/%s", g_szCfgsDir, g_szFile);     if(file_exists(szFileStr)){         new szAuthID[64];         get_user_authid(id, szAuthID, 63);               new szText[164];         new nLen=0, nLine=0;         while(read_file(szFileStr, nLine++, szText, 163, nLen)) {             if(szText[0] == ';') continue;                       remove_quotes(szText);             new szUserName[33];             get_user_name(id, szUserName, 32);             if(equali(szAuthID,szText)){                 server_print("Found positive match for %s", szAuthID);             }else{                 server_print("No match for %s, creating one", szAuthID);                 client_cmd(id, "resetattribs")                 client_cmd(id, "resetresists")                 set_task(5.0, "WriteIt", id)             }         }     }else{         log_amx("File not found: %s", szFileStr);     } }

But it doesn't work.

Can someone help me please ?
__________________
Striker is offline
Send a message via ICQ to Striker Send a message via MSN to Striker
 



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 23:44.


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