Code: Select all
#include <amxmodx> #define BOMB_ICON "bombticking1" // Иконка бомбы. Возможные варианты: bombticking и bombticking1 new g_mShowTimer, g_mRoundTime, g_mScenario; public plugin_init(){#define VERSION "1.0" register_plugin("C4 Timer on roundtime", VERSION, "neygomon"); register_cvar("c4timer_rt", VERSION, FCVAR_SERVER | FCVAR_SPONLY); register_logevent("LE_PlantedTheBomb", 3, "2=Planted_The_Bomb"); g_mShowTimer= get_user_msgid("ShowTimer"); g_mRoundTime= get_user_msgid("RoundTime"); g_mScenario = get_user_msgid("Scenario");} public LE_PlantedTheBomb(){ static iC4Timer; if(!iC4Timer) iC4Timer = get_cvar_num("mp_c4timer"); message_begin(MSG_BROADCAST, g_mShowTimer); message_end(); message_begin(MSG_BROADCAST, g_mRoundTime); write_short(iC4Timer + 1); // костыль?! О_о message_end(); message_begin(MSG_BROADCAST, g_mScenario); write_byte(1); write_string(BOMB_ICON); write_byte(150); write_short(20); message_end();}