k so
Code:
public save_tmptop15() {
new pathname[128]
get_cvar_string("top15temp_path",pathname,127)
new mapname[128]
get_mapname(mapname,127)
new filename[128]
format(filename, 127, "%s/tmptop15.txt", pathname)
if( file_exists(filename) )
delete_file(filename)
write_file(filename, mapname) // save the map name in the firstline
for( new i = 0; i < 15; i++ ) {
if( top15_times[i] == CT_MAX_TIME )
return
new number[192]
num_to_str(top15_times[i],number,191)
write_file(filename, top15_authid[i])
write_file(filename, top15_names[i])
write_file(filename, number)
}
return
}
Wrote the map in the firstline:
Code:
write_file(filename, mapname)
Then Wrote in the next 15lines 15ranks with name time and steamid
Code:
write_file(filename, top15_authid[i])
write_file(filename, top15_names[i])
write_file(filename, number)
that is the command for the textfile creating.