• Страница 1 из 1
  • 1
Добавить проигрывание музыки в плагин
Дата: Понедельник, 25.03.2019, 13:15 | Сообщение # 1
Любитель
Offline
  • smike001
  • Репутация: -12
  • Сообщений:2
  • Пользователь
Как добавить суда 2 звука которые будет проигрываться в конце раунда в зависимости кто победил. надеюсь на вашу помощь.

Код:

#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>

#define PLUGIN "win_team"
#define VERSION "1.0"
#define AUTHOR "Zone"

public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)

register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")

register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")

register_event("SendAudio", "draw", "a", "2&%!MRAD_rounddraw")
}

public ct_win(){
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, -1.0, 0, 5.0, 8.0, 1.0, 1.5)
show_dhudmessage(0, "Контр-Террористы Победили")
ChatColor(0,"!y[!gСервер!y] Контер Террористы !tПобедили!")
}

public t_win(){
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, -1.0, 0, 5.0, 8.0, 1.0, 1.5)
show_dhudmessage(0, "Террористы Победили")
ChatColor(0,"!y[!gСервер!y] Террористы !tПобедили!")
}

public draw(){
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, -1.0, 0, 5.0, 8.0, 1.0, 1.5)
show_dhudmessage(0, "Ничья")
ChatColor(0,"!y[!gСервер!y] !tНичья!")
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
  • Страница 1 из 1
  • 1
Поиск:
(threadpage)