AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   I do to read a .ini and... (https://forums.alliedmods.net/showthread.php?t=117542)

BannedUser! 02-02-2010 04:18

I do to read a .ini and...
 
Do I make to read a .ini and write it in print_chat?

Examples please.

SpILL 02-02-2010 04:26

Re: I do to read a .ini and...
 
Answer: Yes.
Advise: Search!

BannedUser! 02-02-2010 04:31

Re: I do to read a .ini and...
 
Quote:

Originally Posted by SpILL (Post 1075923)
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 .__.

fysiks 02-02-2010 21:13

Re: I do to read a .ini and...
 
client_print(id, print_chat, "message %s", "here")


All times are GMT -4. The time now is 07:25.

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