Raised This Month: $ Target: $400
 0% 

I do to read a .ini and...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
BannedUser!
BANNED
Join Date: Feb 2010
Old 02-02-2010 , 04:31   Re: I do to read a .ini and...
Reply With Quote #3

Quote:
Originally Posted by SpILL View Post
Answer: Yes.
Advise: Search!
Explain me how to put in client_print.

PHP Code:
#include <amxmodx> 
#include <amxmisc> 

public plugin_init() 

    
// ... 


public 
readfile(const filename[], line

    new 
file[64]; 
    
get_configsdir(filesizeof (file)); 
    
format(filesizeof (file), "%s/%s"filefilename); 

    if (!
file_exists(file)) 
    { 
        return; 
    } 

    new 
text[128]; 
    new 
ln
    
read_file(filelinetextsizeof (text), ln); 

    if (
ln && (text[0] != ';') && (text[0] != '/')) // if text length > 1 and line is no as comment; 
    

        new 
param1[32]; 
        new 
param2[32]; 
        new 
param3[32]; 
        
parse(textparam1sizeof (param1), param2sizeof (param2), param3sizeof (param3)); 
        
// if line is: 1 "admin-xy" "action1" for example, you will get: 
        // "1" in param1; "admin-xy" in param2; "action1" in param2; 
    




Examples .__.
BannedUser! 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 07:25.


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