hey, i have one problem with my code and... the problem is :
when write some line in commandsdetected only wrote one line and replace the others
code
Code:
new filex[930]
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTOR)
data()
}
data()
{
new datadir[64];
get_configsdir(datadir, 63);
formatex(filex, charsmax(filex) , "%s/commandsdetected.ini", datadir);
new fileopen = fopen(filex, "r");
if(!fileopen)
{
server_print("[ERROR] El Server No Ha Encontrado [ - %s - ] ; Se Esta Creando una nueva database..", filex);
write_file(filex, "//Commands Detected |name|command");
}
fclose(fileopen);
}
Code:
new name[32], INI[256];
get_user_name(player, name, 31);
formatex( INI , charsmax(INI),"Player Name: %s Command Detected: UpSpeed" , name);
new file = fopen(filex, "wt+");
write_file(filex, INI);
fclose(file);
set_hudmessage(255, 0, 0, -1.0, 0.01)
get_user_name(player, name, 31)
show_hudmessage(0,"Player (%s) UPSpeed commands", name)
sorry for my enlgish but im spanish and i cant write any post in spanis section