As TKers often drop before you even manage to open the ban menu...
What I want to do is an extra ban menu from which dropped players can be banned.
The idea is to write a file containing the last 10 dropped players.
Code:
public add_dropped_player(id){
new name[32],authid[32],ip[32],text[128],num[32]
new line,len
get_user_name(id,name,31)
get_user_authid(id,authid,31)
get_user_ip(id,ip,31)
format(text,127,"^"%s^" ^"%s^" ^"%s^"", name,authid,ip)
read_file ( filename, 0, num, 31, len ) // what line to read from
line = str_to_num(num)
write_file(filename,text,line)
line++
if(line > 10) line = 1
num_to_str(line,num,32)
write_file(filename,num,0)
return PLUGIN_CONTINUE
}
But if I use the client_disconnect, it will loose dropped players at mapchange as all players are disconnected.
Any suggestions?