Raised This Month: $ Target: $400
 0% 

Reload File


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Haskyutza
Junior Member
Join Date: May 2013
Location: Romania
Old 05-17-2013 , 15:44   Reload File
Reply With Quote #1

Hi
I have a little problem with this code.I tried to reload a file with a command but it is not working(I don't know why).I saw on the another plugin this method and there it's work.
In this file I want to put the names of players (even if i think it does not matter)

I hope you can fix that or tell me where i'm wrong
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <celltrie>

new gfi_WorkFile128 ];
new const 
gs_VipsFile[ ] = "file.ini";
new 
Trie:file_reload;

public 
plugin_init() 
{
    
register_plugin("File Beta","1.0""Hasky")
    
register_concmd("amx_reloadfile""reloadfile")
    
file_reload TrieCreate()
    
}
public 
plugin_cfg ( )
{
    new 
fi_Dir64 ];
    
get_configsdir fi_Dircharsmax fi_Dir ) );
    
formatex gfi_WorkFilecharsmax gfi_WorkFile ), "%s/%s"fi_Dirgs_VipsFile );
}


public 
reloadfile(id)
{
    
TrieClear(file_reload)
    
    new 
s_Buffer192 ], i_Linei_Lenname[32];
    while ( ( 
i_Line read_file gfi_WorkFilei_Lines_Buffercharsmax s_Buffer ), i_Len ) ) )
    {
        if ( ! 
strlen s_Buffer ) || s_Buffer] == ';' || ( s_Buffer] == '/' && s_Buffer] == '/' ) )
        continue;
        
        
parse(s_Buffernamecharsmax(name))
        
        if(!
name[0])
        continue
        
        
TrieSetCell(file_reloadname1);
    }


Haskyutza is offline
 


Thread Tools
Display Modes

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 16:15.


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