#include <amxmodx>
new const Sound[] = {"RoundSound/RoundSound.wav"}
public plugin_precache() precache_sound(Sound)
public plugin_init()
{
register_plugin("Round Start Sound", "1.0", "")
register_logevent("round_start", 2, "0=World triggered", "1=Round_Start")
}
public round_start() {
set_task(get_cvar_num("mp_freezetime") + 0.1, "FreezeTeam")
}
public FreezeTeam(id)
{
client_cmd(id, "spk %s", Sound)
}
#include <amxmodx>
#include <reapi>
// Sound mp3 or wav
new const SOUND[] = "OnRoundFreezeEnd.wav";
#define IsMp3Format(%1) bool:(equali(%1[strlen(%1) - 4], ".mp3"))
public plugin_init() {
register_plugin("Sound Freeze End", "0.0.1", "dev-cs");
RegisterHookChain(RG_CSGameRules_OnRoundFreezeEnd, "Hook_OnRoundFreezeEnd");
}
public plugin_precache() {
if(IsMp3Format(SOUND)) {
precache_generic(fmt("sound/%s", SOUND));
} else {
precache_sound(SOUND);
}
}
public Hook_OnRoundFreezeEnd() {
if(IsMp3Format(SOUND)) {
client_cmd(0, "mp3 play %s", fmt("sound/%s", SOUND));
} else {
rg_send_audio(0, SOUND);
}
}
#include <amxmodx>
#include <reapi>
// Sound mp3 or wav
new const SOUND[][] = {"sound/OnRoundFreezeEnd.wav", "sound/OnRoundFreezeEnd2.wav", "sound/OnRoundFreezeEnd3.wav"};
#define IsMp3Format(%1) bool:(%1[strlen(%1) - 1] == '3')
public plugin_init() {
register_plugin("Sound Freeze End", "0.0.3", "dev-cs");
RegisterHookChain(RG_CSGameRules_OnRoundFreezeEnd, "Hook_OnRoundFreezeEnd");
}
public plugin_precache() {
for(new i; i < sizeof(SOUND); i++)
{
precache_generic(SOUND[i]);
}
}
public Hook_OnRoundFreezeEnd() {
new iRandomSound = random(sizeof(SOUND));
if(IsMp3Format(SOUND[iRandomSound])) {
client_cmd(0, "mp3 play ^"%s^"", SOUND[iRandomSound]);
} else {
rg_send_audio(0, SOUND[iRandomSound][6]);
}
}
все разобрался xD забыл инклуды реапи обновитьCSBishop, Скомпилировал плагин успешно, поставил на сервер , пишет так - [ 73] unknown unknown unknown round_sound.amx error