Raised This Month: $32 Target: $400
 8% 

[L4D2] Custom Sound Help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bman87
Senior Member
Join Date: Dec 2008
Location: Michigan
Old 03-12-2010 , 16:16   [L4D2] Custom Sound Help!
Reply With Quote #1

Please help! I cannot get this plugin to work.

The file downloads correctly, I can join the server and it transfers the file. But when I type the sm_haha command I do not hear the file play.

When I check my sound folder it created the tchalo directory and transfered the .wav file successfully. I am able to play the .wav in a media player.

Typing: 'play tchalo/haha3.wav' in the console does not work. Failed to load file...

Any ideas?

PHP Code:
#include <sourcemod>
#include <sdktools>

#define VERSION "1.1"

#define HAHASOUND "tchalo/haha3.wav"

public Plugin:myinfo =
{
    
name "L4D2 Sound Loader Test",
    
author "B-man",
    
description "TCHalo Servers",
    
version VERSION,
    
url "http://www.tchalo.com"
}

public 
OnPluginStart()
{
    
RegAdminCmd("sm_haha"playerLaughADMFLAG_GENERIC"Nelsons' Ha-ha!");
}

public 
OnMapStart()
{
    
AddFileToDownloadsTable("sound\\tchalo\\haha3.wav");
    
CallCacheSounds();
}

public 
Action:playerLaugh(clientargs)
{
    
EmitSoundToAll(HAHASOUND);
    
PrintToChat(client"Hah-ha!");
}

public 
CallCacheSounds()
{
    
PrecacheSound(HAHASOUNDfalse); 

bman87 is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode