Участник
Пользователь
- Сообщения
- 289
- Реакции
- 251
- Помог
- 7 раз(а)
C++:
PlayMusic(const sound[]) {
new players[MAX_PLAYERS], count;
get_players_ex(players, count, GetPlayers_ExcludeBots|GetPlayers_ExcludeHLTV);
for(new i, id; i < count; i++) {
id = players[i];
if(g_iPlayMusic[id] == MUSIC_ENABLED) {
#if defined DANCE
if(is_user_alive(id)) {
set_entvar(id, var_viewmodel, g_szModels);
}
#endif
+ client_cmd(id, "stopsound; mp3 stop");
if(IsMp3Format(sound)) {
client_cmd(id, "mp3 play %s", sound);
} else {
rg_send_audio(id, sound);
}
}
}
}
6 Ноя 2023