Code: Select all
#include <amxmodx>#include <hamsandwich>#include <engine> #define PLUGIN "Plugin"#define VERSION "1.0"#define AUTHOR "aaarnas" #define FFADE_OUT 0x0001#define FFADE_STAYOUT 0x0004 new screen[33]new msg_screenfadenew hud_syncnew countnew time_s new sound[][] = { "GameLanD/five.wav", "GameLanD/four.wav", "GameLanD/three.wav", "GameLanD/two.wav", "GameLanD/one.wav", ""} public plugin_precache() { for(new i=0; i<5; i++) precache_sound(sound[i])} public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_event("HLTV", "event_round_start", "a", "1=0", "2=0") RegisterHam(Ham_Spawn, "player", "player_spawn", 1) msg_screenfade = get_user_msgid("ScreenFade") hud_sync = CreateHudSyncObj() register_dictionary("screen_fade.txt")} public event_round_start() { count = 0; time_s = 5; arrayset(screen, 0, 33); new players[32], num get_players(players, num, "ae", "TERRORIST") for(new i = 0; i < num; i++) { set_hudmessage(0, 255, 0, -1.0, 0.40, 0, 6.0, 1.0) ShowSyncHudMsg(players[i], hud_sync, "%L", LANG_SERVER, "WAITING", time_s) } set_task(1.0, "task_out", 0, _, _, "a", 5); } public player_spawn(id) { if(!screen[id] && get_user_team(id) == 1) { message_begin(MSG_ONE, msg_screenfade, _, id) write_short(5) // duration write_short(6) // hold time write_short(FFADE_STAYOUT) // fade type write_byte(0) // red write_byte(0) // green write_byte(0) // blue write_byte(255) // alpha message_end() client_cmd(id, "spk /sound/%s", sound[0]) entity_set_int(id, EV_INT_flags, entity_get_int(id, EV_INT_flags) | FL_FROZEN) } screen[id] = true} public task_out() { static i count++ time_s-- new players[32], num get_players(players, num, "ech", "TERRORIST") for(i=0; i<num; i++) { if(is_user_connected(i)) { client_cmd(players[i], "spk /sound/%s", sound[count]) set_hudmessage(0, 255, 0, -1.0, 0.40, 0, 6.0, 1.0) ShowSyncHudMsg(players[i], hud_sync, "%L", LANG_SERVER, "WAITING", time_s) } } if(count == 5) { for(i=0; i<num; i++) { message_begin(MSG_ONE, msg_screenfade, _, players[i]) write_short((1<<12)) // duration write_short(0) // hold time write_short(FFADE_OUT) // fade type write_byte(0) // red write_byte(0) // green write_byte(0) // blue write_byte(255) // alpha message_end() entity_set_int(players[i], EV_INT_flags, entity_get_int(players[i], EV_INT_flags) & ~FL_FROZEN) } }}/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1063\\ f0\\ fs16 \n\\ par }*/