#include <amxmodx> #include <amxmisc> #include <cstrike> new const ny_time = 1262300400 // 00:00:00 1 styczen 2010 new c_info = 0 new const max_info = 100 public plugin_init() { register_plugin("New Year Countdown", "0.1", "Pavulon") set_task(1.0, "B4",777) } public B4() { new sek_left = ny_time - get_systime() if (sek_left>0) set_task(1.0, "countdown",0,_,_,"b") else pause("a") } public countdown() { new sek_left = ny_time - get_systime() if (sek_left<0) { remove_task(0) set_task(0.1,"ny_info", 999) return } new Time[128] format(Time, 127, "%s", timeleft(sek_left)) set_hudmessage(0, 0, 255, 0.020, 0.16, 0, 6.0, 1.0, 0.0, 0.0) ShowSyncHudMsg(0,CreateHudSyncObj(),"Do nowego roku pozostalo:^n%s",Time) } public ny_info() { if (c_info>max_info) return set_hudmessage(random_num(0,255), random_num(0,255), random_num(0,255), -1.0, -1.0, 0, 6.0, 0.1, 0.0, 0.0) ShowSyncHudMsg(0,CreateHudSyncObj(),"!!! SZCZESLIWEGO NOWEGO ROKU !!!^n!!! GL & HF !!!") c_info++ set_task(0.1,"ny_info", 999) } stock timeleft(sek_left) { new dni, godzin, minut, left = sek_left new Time[128], len = 0 if (left / 86400 >= 1) { dni = (left / 86400) left -= dni * 86400 len += format(Time[len], 127 -len, "%d d. ", dni) } if (left / 3600 >= 1) { godzin = (left / 3600) left -= godzin * 3600 len += format(Time[len], 127 -len, "%d godz. ", godzin) } if (left / 60 >= 1) { minut = (left / 60) left -= minut * 60 len += format(Time[len], 127 -len, "%d min. ", minut) } format(Time[len], 127 -len, "%d sek.", left) return Time }
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse