[SOLVED][HOW]to adding sound
hello all
i find this script by bugsy..i have try to adding the sound (20seconds remain) but it failed..
here i attach the original script by bugsy
PHP Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta>
#define PLUGIN "Round End Explode" #define VERSION "1.0" #define AUTHOR "bugsy"
new g_SyncHud; new g_RoundEnded;
//round-time new Float:g_newround_time new Float:g_roundstart_time new Float:g_bombplanted_time new Float:g_freezetime new Float:g_roundtime new Float:g_c4timer new g_playtime = 1 new pcvar_roundtime new pcvar_freezetime new pcvar_c4timer
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_logevent("evRoundEnd", 2, "1=Round_End") register_logevent("evRoundStart", 2, "1=Round_Start") //round-time register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w") register_event("HLTV", "eNewRound", "a", "1=0", "2=0") register_event("SendAudio","eSendAudio","a","2=%!MRAD_BOMBPL") pcvar_roundtime = get_cvar_pointer("mp_roundtime") pcvar_freezetime = get_cvar_pointer("mp_freezetime") pcvar_c4timer = get_cvar_pointer("mp_c4timer") set_task( 0.9 , "CountDown" , _ , _,_,"b"); g_SyncHud = CreateHudSyncObj(); }
public CountDown() { static iTimeLeft; iTimeLeft = get_remaining_seconds(); if( (iTimeLeft > 25) || (iTimeLeft < 0) ) return PLUGIN_HANDLED; set_hudmessage(255,255,255, -1.0, -1.0, 1, 6.0, 5.0 , 0.5 , 0.5); if( 19 <= iTimeLeft <= 21) ShowSyncHudMsg(0, g_SyncHud, "20 seconds left in round!") else if( (iTimeLeft <= 10) && !g_RoundEnded ) ShowSyncHudMsg(0, g_SyncHud, "%d seconds left in round!", iTimeLeft ) return PLUGIN_HANDLED; }
public get_remaining_seconds() { switch(g_playtime) { case 0: return 0 case 1: return floatround( ( get_gametime() - g_newround_time ) - g_freezetime , floatround_ceil ) case 2: return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil ) case 3: return floatround( g_c4timer - ( get_gametime() - g_bombplanted_time ) , floatround_ceil ) } return 0 }
public eRestart() { g_playtime = 0; }
public eNewRound() { g_playtime = 1
new Float:freezetime = get_pcvar_float(pcvar_freezetime) if(freezetime) { g_newround_time = get_gametime() g_freezetime = freezetime } g_c4timer = get_pcvar_float(pcvar_c4timer) g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0 }
public evRoundStart() { g_RoundEnded = 0; g_playtime = 2
g_roundstart_time = get_gametime() }
public eSendAudio() { g_playtime = 3
g_bombplanted_time = get_gametime() }
public evRoundEnd() { new iPlayers[32]; new iPlayersNum; get_players( iPlayers, iPlayersNum, "a"); g_playtime = 0; g_RoundEnded = 1; }
hope someone can help me
|