unnamed Work but !! how can I make several sounds !
i modify but sounds come Random !
Код:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Agmini Test"
#define AUTHOR "LetiLetiLepestok"
#define VERSION "0.1"
#define MSG_POS_X 2457 // exclusive position of HUD message with countdown (AG mini. arena, lts, lms etc)
#define MSG_POS_Y 4096 //
new const szSoundsCount[][] = {
"barney/ba_bring.wav",
"fvox/one.wav",
"fvox/two.wav",
"fvox/three.wav"
}
new g_CountDown
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_message(SVC_TEMPENTITY, "hud_text_msg")
g_CountDown = 3
}
public plugin_precache()
{
for(new i = 0; i < sizeof szSoundsCount; i++)
precache_sound(szSoundsCount[i])
}
public hud_text_msg(id)
{
--g_CountDown
new szConvert[32]
if (get_msg_arg_int(1) == TE_TEXTMESSAGE && get_msg_arg_int(3) == MSG_POS_X && get_msg_arg_int(4) == MSG_POS_Y)
num_to_word(g_CountDown, szConvert, charsmax(szConvert))
client_cmd(0, "spk ^"fvox/%s^"", szConvert)
return
// client_cmd(0, "spk fvox/beep")
}