Raised This Month: $ Target: $400
 0% 

Authid.ini


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-07-2005 , 14:43  
Reply With Quote #2

Try this:
Code:
#include <amxmodx> #include <amxmisc> new g_szCfgsDir[64]; new g_szFile[] = "authid.ini"; public plugin_init() {   // ...   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))       {         FoundID(id);         server_print("Found positive match for %s", szAuthID);       }       else       {         server_print("No match for %s", szAuthID);       }     }   }   else   {     log_amx("File not found: %s", szFileStr);   } } public FoundID( id ) {   // Hooray! We found it! }
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 23:44.


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