Hali ez igy mukodhet? es szeretnek olyat kerni pl 15:30-16:00 mukodjon
#include <amxmodx> #include <amxmisc> #include <fun> #include <colorchat> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "HunGamer" new bool:aktiv = false; new bool:aktiv2 = false; public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_event("DeathMsg","hook_death","a"); set_task(60.0, "check", 0, _, _, "b"); } public check() { new hour, minute, second; time(hour, minute, second); if(23 <= hour && 7 > hour) { aktiv = true; set_task(1.0,"event") } else { aktiv = false; aktiv2 = false; } return PLUGIN_CONTINUE } public event() { if(aktiv2 == false) { ColorChat(0, GREEN, "[EVENT]^x01 Most mapváltás következik !!!") aktiv2 = true; server_cmd("changelevel ^"de_dust2^"") } } public hook_death() { if(!aktiv) return PLUGIN_CONTINUE; new killer = read_data(1); set_user_frags(killer, get_user_frags(killer) + 1); new frags = get_user_frags(killer) new death = get_user_deaths(killer) new team = get_user_team(killer) message_begin(MSG_ALL, get_user_msgid("ScoreInfo"), {0,0,0}, 0) write_byte(killer) write_short(frags) write_short(death) write_short(0) write_short(team) message_end() return PLUGIN_CONTINUE; } public hirdet() { if(!aktiv) { ColorChat(0, GREEN, "[EVENT]^x01 Most minden kill duplán számit!!!") } return PLUGIN_CONTINUE; }
|