---------- ADMIN.SMA register_cvar("amx_vote_time", "10") ---------- ADMINCHAT.SMA ---------- ADMINCMD.SMA ---------- ADMINHELP.SMA if (get_cvar_float("mp_timelimit")) new timeleft = get_timeleft() if (timeleft > 0) client_print(id, print_chat, "%L", id, "TIME_INFO_1", timeleft / 60, timeleft % 60, nextmap) client_print(id, print_chat, "%L", id, "TIME_INFO_2", nextmap) ---------- ADMINSLOTS.SMA ---------- ADMINVOTE.SMA set_cvar_float("amx_last_voting", get_gametime()) if (voting > get_gametime()) if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) show_menu(0, keys, menu_msg, floatround(vote_time), (g_validMaps > 1) ? "Choose map: " : "Change map to ") set_task(vote_time, "checkVotes", 99889988) if (voting > get_gametime()) if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) show_menu(0, keys, menu_msg, floatround(vote_time), "Vote: ") set_task(vote_time, "checkVotes", 99889988) if (voting > get_gametime()) if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0 set_cvar_float("amx_last_voting", get_gametime() + vote_time) show_menu(0, keys, menu_msg, floatround(vote_time), voteban ? "Ban " : "Kick ") set_task(vote_time, "checkVotes", 99889988) ---------- ADMIN_AUTO_BHOP.SMA ---------- ADMIN_SPEC_ESP.SMA register_cvar("esp_timer","0.3") // start esp_timer for the first time set_task(1.0,"esp_timer") public esp_timer(){ set_task(1.0,"esp_timer") // check for reactivation in 1 sec intervals set_hudmessage(255, 255, 0, floatabs(xp), floatabs(yp), 0, 0.0, get_cvar_float("esp_timer"), 0.0, 0.0, 2) set_task(get_cvar_float("esp_timer"),"esp_timer") // keep it going // all messages are sent with MSG_ONE_UNRELIABLE flag to avoid overflow in case of very low esp_timer setting and much targets write_byte(floatround(get_cvar_float("esp_timer")*10)) // life in 0.1's write_byte(floatround(get_cvar_float("esp_timer")*10)) ---------- AFKKICKER11.SMA #define MIN_AFK_TIME 30 // I use this incase stupid admins accidentally set mp_afktime to something silly. #define WARNING_TIME 15 // Start warning the user this many seconds before they are about to be kicked. new g_afktime[33] register_cvar("mp_afktime", "300") // Kick people AFK longer than this time g_afktime[i] += CHECK_FREQ check_afktime(i) g_afktime[i] = 0 g_afktime[i] += CHECK_FREQ check_afktime(i) check_afktime(id) new maxafktime = get_cvar_num("mp_afktime") if (maxafktime < MIN_AFK_TIME) log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME) maxafktime = MIN_AFK_TIME set_cvar_num("mp_afktime", MIN_AFK_TIME) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be kicked for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was kicked for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was kicked for being AFK longer than %i seconds", name, maxafktime) server_cmd("kick #%d ^"You were kicked for being AFK longer than %i seconds^"", get_user_userid(id), maxafktime) g_afktime[id] = 0 g_afktime[id] = 0 ---------- AFKKICKER12.SMA #define MIN_AFK_TIME 30 // I use this incase stupid admins accidentally set mp_afktime to something silly. #define WARNING_TIME 15 // Start warning the user this many seconds before they are about to be kicked. new g_afktime[33] register_cvar("mp_afktime", "300") // Kick people AFK longer than this time g_afktime[i] += CHECK_FREQ check_afktime(i) g_afktime[i] = 0 g_afktime[i] += CHECK_FREQ check_afktime(i) check_afktime(id) new maxafktime = get_cvar_num("mp_afktime") if (maxafktime < MIN_AFK_TIME) log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME) maxafktime = MIN_AFK_TIME set_cvar_num("mp_afktime", MIN_AFK_TIME) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be kicked for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was kicked for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was kicked for being AFK longer than %i seconds", name, maxafktime) server_cmd("kick #%d ^"You were kicked for being AFK longer than %i seconds^"", get_user_userid(id), maxafktime) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be moved to spectators for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) g_afktime[id] = 0 g_afktime[id] = 0 ---------- AFKKICKER13.SMA #define MIN_AFK_TIME 30 // I use this incase stupid admins accidentally set mp_afktime to something silly. #define WARNING_TIME 15 // Start warning the user this many seconds before they are about to be kicked. new g_afktime[33] register_cvar("mp_afktime", "300") // Kick people AFK longer than this time g_afktime[i] += CHECK_FREQ check_afktime(i) g_afktime[i] = 0 g_afktime[i] += CHECK_FREQ check_afktime(i) check_afktime(id) new maxafktime = get_cvar_num("mp_afktime") if (maxafktime < MIN_AFK_TIME) log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME) maxafktime = MIN_AFK_TIME set_cvar_num("mp_afktime", MIN_AFK_TIME) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be kicked for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was kicked for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was kicked for being AFK longer than %i seconds", name, maxafktime) server_cmd("kick #%d ^"You were kicked for being AFK longer than %i seconds^"", get_user_userid(id), maxafktime) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be moved to spectators for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) g_afktime[id] = 0 g_afktime[id] = 0 ---------- AFKKICKER_NO_ADMINS.SMA * mp_afktime 90 Time a player is allowed to be AFK in seconds before they are kicked. (minimum 30 sec) * They time is only accumulated while they are alive. #define MIN_AFK_TIME 30 // I use this incase stupid admins accidentally set mp_afktime to something silly. #define WARNING_TIME 15 // Start warning the user this many seconds before they are about to be kicked. new g_afktime[33] register_cvar("mp_afktime", "300") // Kick people AFK longer than this time g_afktime[i] += CHECK_FREQ check_afktime(i) g_afktime[i] = 0 check_afktime(id) { new maxafktime = get_cvar_num("mp_afktime") if (maxafktime < MIN_AFK_TIME) { log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME) maxafktime = MIN_AFK_TIME set_cvar_num("mp_afktime", MIN_AFK_TIME) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) { new timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be kicked for being AFK", timeleft) } else if (g_afktime[id] > maxafktime) { client_print(0, print_chat, "[AFK Kicker] %s was kicked for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was kicked for being AFK longer than %i seconds", name, maxafktime) server_cmd("kick #%d ^"You were kicked for being AFK longer than %i seconds^"", get_user_userid(id), maxafktime) g_afktime[id] = 0 g_afktime[id] = 0 set_task(0.75, "delayedSpawn",_, sid, 1) // Give the player time to drop to the floor when spawning ---------- AFK_KICKER.SMA #define MIN_AFK_TIME 30 // I use this incase stupid admins accidentally set mp_afktime to something silly. #define WARNING_TIME 15 // Start warning the user this many seconds before they are about to be kicked. new g_afktime[33] register_cvar("mp_afktime", "300") // Kick people AFK longer than this time g_afktime[i] += CHECK_FREQ check_afktime(i) g_afktime[i] = 0 g_afktime[i] += CHECK_FREQ check_afktime(i) check_afktime(id) static maxafktime, minfreeslots, numplayers, timeleft, name[32] maxafktime = get_cvar_num("mp_afktime") if (maxafktime < MIN_AFK_TIME) log_amx("cvar mp_afktime %i is too low. Minimum value is %i.", maxafktime, MIN_AFK_TIME) maxafktime = MIN_AFK_TIME set_cvar_num("mp_afktime", MIN_AFK_TIME) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be kicked for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was kicked for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was kicked for being AFK longer than %i seconds", name, maxafktime) server_cmd("kick #%d ^"You were kicked for being AFK longer than %i seconds^"", get_user_userid(id), maxafktime) if ( maxafktime-WARNING_TIME <= g_afktime[id] < maxafktime) timeleft = maxafktime - g_afktime[id] client_print(id, print_chat, "[AFK Kicker] You have %i seconds to move or you will be moved to spectators for being AFK", timeleft) else if (g_afktime[id] > maxafktime) client_print(0, print_chat, "[AFK Kicker] %s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) log_amx("%s was moved to spectators for being AFK longer than %i seconds", name, maxafktime) g_afktime[id] = 0 g_afktime[id] = 0 ---------- ALLTEAMALLY.SMA ---------- ALLYSPY_BETA.SMA ---------- AMX_EJL_SEARCHMAPS2.SMA * from there, or it can read from a file. This can be set as a compile time * where it was reading each map multiples times into the maps array. ---------- AMX_GAG.SMA GAG_TIME, enum _:TimeUnit TIMEUNIT_SECONDS = 0, TIMEUNIT_MINUTES, TIMEUNIT_HOURS, TIMEUNIT_DAYS, TIMEUNIT_WEEKS new const g_szTimeUnitName[ TimeUnit ][ 2 ][ ] = new const g_iTimeUnitMult[ TimeUnit ] = new const DATETIME_FORMAT[ ] = "%Y-%m-%d %H:%M:%S"; new Array:g_aGagTimes; new Trie:g_tTimeUnitWords; new g_iTotalGagTimes; new g_pCvarDefaultTime; new g_pCvarTimeUnit; new g_pCvarMaxTime; register_concmd( "amx_gag", "CmdGagPlayer", ADMIN_KICK, "