RSSy MYGO.pl Opublikowano Styczeń 14, 2021 o 06:52 RSSy Udostępnij Opublikowano Styczeń 14, 2021 o 06:52 Please help, installed on biohazard VERSION "2.00 Beta 3. AMX MOD X 1.8.2 does not add kill. HTML Code: #include <amxmodx> #include <fun> #define PLUGIN_VERSION "1.1" #define TASK_MESSAGE 455223 new g_iObject, g_pStart, g_pEnd, g_iStart, g_iEnd, g_szName[33][32], bool:g_blActive public plugin_init() { register_plugin("Happy Frag Hour", PLUGIN_VERSION, "iPlay.bg (OciXCrom)") register_logevent("OnRoundStart", 2, "0=World triggered", "1=Round_Start") register_event("DeathMsg", "OnPlayerKilled", "a") g_pStart = register_cvar("happyhour_start", "20") g_pEnd = register_cvar("happyhour_end", "22") g_iObject = CreateHudSyncObj() OnRoundStart() } public client_putinserver(id) { get_user_name(id, g_szName[id], charsmax(g_szName[])) set_task(1.0, "displayMessage", id + TASK_MESSAGE, .flags = "b") } public displayMessage(id) { id -= TASK_MESSAGE set_hudmessage(random(256), random(256), random(256), 0.02, 0.2, 0, 0.1, 1.0, 0.1, 0.1, -1) ShowSyncHudMsg(id, g_iObject, "Good luck and have fun! %s^nNow Happy frag hour (%s)^nHappy Hour (Start in %i:00 | End in %i:00)", g_szName[id], g_blActive ? "On" : "Off", g_iStart, g_iEnd) } public client_infochanged(id) { new szNewName[32], szOldName[32] get_user_info(id, "name", szNewName, charsmax(szNewName)) get_user_name(id, szOldName, charsmax(szOldName)) if(!equal(szNewName, szOldName)) copy(g_szName[id], charsmax(g_szName[]), szNewName) } public OnRoundStart() { GetCvars() new szHour[3] get_time("%H", szHour, charsmax(szHour)) new iHour = str_to_num(szHour) g_blActive = (iHour >= g_iStart && iHour <= g_iEnd) ? true : false } public OnPlayerKilled() { if(!g_blActive) return new iAttacker = read_data(1), iVictim = read_data(2) if(!is_user_connected(iAttacker) || !is_user_connected(iVictim) || iAttacker == iVictim) return set_user_frags(iAttacker, get_user_frags(iAttacker) + 1) } GetCvars() { g_iStart = get_pcvar_num(g_pStart) g_iEnd = get_pcvar_num(g_pEnd) } Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi