#include <amxmodx> #include <amxmisc> #include <engine> new ctfrags = 0 new tfrags = 0 new g_round = 0 new hud_rgb new hud_x new hud_y new hud_efct new g_Count new g_HudText new g_maxplayers public hud(){ new ctime[64], cdate[64], map[33], nextmap[32] new red, green, blue, id new a = get_timeleft() get_cvar_string("amx_nextmap", nextmap, 31) get_hud_color(red, green, blue) get_mapname(map,32) get_time("%H:%M:%S", ctime, 63) get_time("%Y.%m.%d", cdate, 63) set_hudmessage(red,green,blue,get_pcvar_float(hud_x),get_pcvar_float(hud_y), get_pcvar_num(hud_efct), 1.0, 1.0) ShowSyncHudMsg(id, g_HudText, "Ido: %s | Datum: %s^nCT Fragek: %d | T Fragek: %d^nJelenlegi Map: %s | Kov. Map: %s^nMapbol Vissz. Ido: %d:%02d^nKor: %i | Jatekosok: %i/%d", ctime, cdate, ctfrags, tfrags, map, nextmap, (a / 60), (a % 60), g_round, g_Count, g_maxplayers) return PLUGIN_CONTINUE } public plugin_init() { register_plugin("Szerver Info v2","2.0","[*CS1.6-T3AM*]") g_maxplayers = get_maxplayers() g_HudText = CreateHudSyncObj() register_event("DeathMsg", "halal", "a") register_logevent("round_first", 2, "0=World triggered", "1&Restart_Round_") register_logevent("round_first", 2, "0=World triggered", "1=Game_Commencing") register_event("HLTV", "event_newround", "a", "1=0", "2=0") set_task(1.0, "hud",0,"",0,"b") hud_rgb = register_cvar("hud_rgb", "0 255 0") hud_x = register_cvar("hud_x", "0.01") hud_y = register_cvar("hud_y", "0.18") hud_efct = register_cvar("hud_efct", "0") return PLUGIN_CONTINUE } public round_first() ctfrags = 0, tfrags = 0 public halal() { static killer killer = read_data(1); if(get_user_team(killer) == 2) ctfrags++ if(get_user_team(killer) == 1) tfrags++ return PLUGIN_CONTINUE } public event_newround() { g_round++ } public client_putinserver(id) { g_Count++ } public client_disconnect(id) { g_Count-- } get_hud_color(&r, &g, &b) { new color[20] static red[5], green[5], blue[5] get_pcvar_string(hud_rgb, color, charsmax(color)) parse(color, red, charsmax(red), green, charsmax(green), blue, charsmax(blue)) r = str_to_num(red) g = str_to_num(green) b = str_to_num(blue) }