Raised This Month: $ Target: $400
 0% 

AMXX: Saving data over mapchange?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 04-16-2009 , 09:01   Re: AMXX: Saving data over mapchange?
Reply With Quote #6

No it will not. Here are the lines that are important, I edited them so you can understand them better:

PHP Code:
new const CFG_FILE_NAME[] = "flash_remote_control.cfg"
new CFG_FILE[300
PHP Code:
    // Config file
    
new config[200]
    
// This function gives the location of the config dir from amxmodx
    
get_configsdir(config,199)
    
format(CFG_FILE,299,"%s/%s",config,CFG_FILE_NAME)
    
// Execute the cvars from the cfg
    
exec_cfg() 
PHP Code:
// Cfg save system
public exec_cfg()
{
    if(
file_exists(CFG_FILE))
        
server_cmd("exec %s",CFG_FILE)
}

public 
save_cfg()
{
    new 
file[2000]
    
format(file,1999,"echo [Flashbang Remote Control] Executing config file ...^n")
    
format(file,1999,"mp_friendlyfire 1^n")
    
format(file,1999,"%secho [Flashbang Remote Control] Settings loaded from config file",file)
    
    
delete_file(CFG_FILE)
    
write_file(CFG_FILE,file)

__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.

Last edited by ot_207; 04-16-2009 at 09:03.
ot_207 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 02:19.


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