Łap
zapisywane jest do pliku "nazwamapy_dzien.miesiac.rok"
#include <amxmodx>
#include <amxmisc>
#define CZAS_MAPY 20 // wpisz ile u ciebie trwa mapa
new liczba_graczy[3], nazwa_mapy[33]
public plugin_init() {
register_plugin("Logowanie Graczy", "1.0", "MarWit")
register_event("HLTV", "Nowa_Runda", "a", "1=0", "2=0")
get_mapname(nazwa_mapy, 32)
}
public plugin_end(){
if(task_exists(222)) remove_task(222)
if(task_exists(333)) remove_task(333)
new log_file[32], data[32], buffer[128]
get_time("%d.%m.%Y", data, 31)
format(log_file, 31, "%s_%s.log", nazwa_mapy, data)
log_to_file(log_file, "------------------------------------------------------")
formatex(buffer, 127, "-------- Mapa %s --------", nazwa_mapy)
log_to_file(log_file, buffer)
formatex(buffer, 127, "-------- Ilosc graczy na poczatku mapy: %d --------", liczba_graczy[0])
log_to_file(log_file, buffer)
formatex(buffer, 127, "-------- Ilosc graczy w polowie mapy: %d --------", liczba_graczy[1])
log_to_file(log_file, buffer)
formatex(buffer, 127, "-------- Ilosc graczy na koncu mapy: %d --------", liczba_graczy[2])
log_to_file(log_file, buffer)
}
public Nowa_Runda(){
liczba_graczy[0] = get_playersnum(0)
set_task(float(CZAS_MAPY*60/2), "HalfLog", 222)
set_task(float(CZAS_MAPY*60)-120.0, "EndLog", 333)
}
public HalfLog()
liczba_graczy[1] = get_playersnum(0)
public EndLog()
liczba_graczy[2] = get_playersnum(0)
Użytkownik MarWit edytował ten post 27.07.2011 17:12