Код
#include <sourcemod>
#include <sdktools>
public OnPluginStart()
{
AddNormalSoundHook(NormalSHook:sound_hook);
AddAmbientSoundHook(AmbientSHook:ambient_hook)
}
public Action:ambient_hook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
PrintToChatAll("Ambient Sound: %s", sample);
return Plugin_Continue
}
public Action:sound_hook(clients[64], &numClients, String:sample[PLATFORM_MAX_PATH], &entity, &channel, &Float:volume, &level, &pitch, &flags)
{
PrintToChatAll("Normal Sound: %s", sample);
return Plugin_Continue
}
Почему то звук оружия ни как не ловится. Пробовал его останавливать и через StopSound в хуке weapon_fire...