Hi Guys everyone ones the Climbtimer 15 the kreedz plugin.
Atm i'm working on a Top15 in MYSQL but i only want to save the first place in mysql and it won't work :/ Maybe u have some ideas?
Code:
public save_top15() {
new pathname[128]
get_cvar_string("amx_climbtimer_path",pathname,127)
new mapname[64]
get_mapname(mapname,63)
new filename[128]
format(filename, 127, "%s/%s-top15.txt", pathname, mapname)
if( file_exists(filename) )
delete_file(filename)
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)
for (new w = 0; w < 1; w++) {
dbi_query(dbc,"INSERT INTO `top15` ( `map` , `jumper` , `steamid` , `time`) VALUES ( '%s', '%s', '%s' , '%d:%02d')", mapname, top15_names[w], top15_authid[w], number )
}
}
return
}