View Single Post
gH0sTy
SourceMod Donor
Join Date: Jul 2008
Location: DE
Old 02-09-2009 , 20:27   Re: Say Sounds (including Hybrid Edition) (3.1.0)
Reply With Quote #138

Quote:
Originally Posted by SuB-Zer0 View Post
Could you please add Support for Stargate: The Last Stand Events?

Here are the Weapons:
weapon_awp
weapon_c4
weapon_flash
weapon_g36
weapon_gac
weapon_grenade
weapon_hdevice
weapon_knife
weapon_kullblaster
weapon_p90
weapon_p90d
weapon_pistol
weapon_smoke
weapon_staff
weapon_suicide_bomb
weapon_tac
weapon_zat

Thanks!
If the weapon codes are correct it should already work, simply use them as param for the kill event.

Quote:
Originally Posted by omgiafs View Post
About events with pre-defined sounds, like teamplay_round_win.

My noobish brain talks me that need to use AmbientSHook or NormalSHook instead of HookEvent. All we need is to modify one parameter (sound file to play at this event).

And i think that we need to configurate server's pure_server_whitelist.txt, if sv_pure != 0.

/UPD
AmbientSHook or NormalSHook impossible to use, server don't send winning sound to client. I'm use SAMURAI's modified plugin to hook sounds send to client, but win/lose sound don't appear in console and chat.
PHP Code:
#include <sourcemod>
#include <sdktools>
public Plugin:myinfo = {
name "Hook sounds",
author "SAMURAI",
description "",
version "1.0",
url "oh" 


public 
OnPluginStart()
{     
    
AddNormalSoundHook(NormalSHook:HookSound_Callback); 
    
AddAmbientSoundHook(AmbientSHook:HookAmbientSound_Callback); 
}

public 
Action:HookSound_Callback(clients[64], &numClientsString:sample[PLATFORM_MAX_PATH], &entity)
{
    
PrintToChatAll("normal sound : %s",sample);
    
PrintToServer("normal sound: %s"sample);
}

public 
Action:HookAmbientSound_Callback(String:sample[PLATFORM_MAX_PATH], &entity)
{
    
PrintToChatAll("ambient sound : %s",sample);
    
PrintToServer("ambient sound: %s"sample);

It means that client's gameinfo_sounds.txt set file to event. And how to replace it - this is a problem. But solution may be to supress default sound by custom, using parameters such as volume, pitch etc.

/UPD 2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
How HWG says, "Stupid, stupid, stupid!!" I'm talk with myself. %)

Just send command PLAY file to client. But you should allow_from_disk in pure_server_whitelist.txt all your sound files, if sv_pure = 1
Round Won/Lost Sounds are done with the teamplay_broadcast_audio event, I already mentioned that here.
Anyway, I'm actually busy until the end of March so I'm not able to work on the plugin before May... just F.Y.I.

Last edited by gH0sTy; 02-09-2009 at 20:29.
gH0sTy is offline