Kod pluginu:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "IP LOger"
#define VERSION "1.0"
#define AUTHOR "GuTeK"
#define LOGER_TASK 1133
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("amx_iploger", "1")
}
public loger(id){
id-=LOGER_TASK
new logfile[64],text[128],timme[9]
new name[33], ip[16];
get_time("%d%m%Y",timme,8)
get_user_name(id, name, 32)
get_user_ip(id, ip, 15, 1)
if(get_cvar_num("amx_iploger") == 1){
client_print(0, print_chat, "Nazywam sie %s wrazie gdybym cheatowal podajcie moje ip adminowi %s", name,ip)
format (text, 63, "Nick: %s <!!> IP: %s",name,ip)
format( logfile, 63, "addons/amxmodx/logs/loger%s.log",timme)
write_file( logfile, text )
}
if(get_cvar_num("amx_iploger") == 2){
client_print(0, print_chat, "Nazywam sie %s wrazie gdybym cheatowal podajcie moje ip adminowi %s", name,ip)
}
if(get_cvar_num("amx_iploger") == 3){
format (text, 63, "Nick: %s <!!> IP: %s",name,ip)
format( logfile, 63, "addons/amxmodx/logs/loger%s.log",timme)
write_file( logfile, text )
}
}
public client_putinserver(id){
set_task(3.0, "loger",id+LOGER_TASK)
}
.log
Nick: waeldreegia <!!> IP: 127.0.0.1 Nick: bobjones <!!> IP: 127.0.0.1 Nick: DROP DEAD FRED <!!> IP: 127.0.0.1 Nick: pyr0` <!!> IP: 127.0.0.1 Nick: k0h0 <!!> IP: 127.0.0.1 Nick: Texas <!!> IP: 127.0.0.1
Jak widac mam pelno logow z IP lokalnego ( przez boty ). Chcialbym aby ten IP lub inny ( nawet kilka ) byly wyjatkami i sie nie dodawaly do loga... Jest ktos w stanie to przerobic ?
Pozdrawiam,
Dariusz.


Dodatki SourceMod



Temat jest zamknięty








