Raised This Month: $ Target: $400
 0% 

Sound problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr Dzx
Junior Member
Join Date: Feb 2010
Old 11-08-2011 , 16:29   Sound problem
Reply With Quote #1

I've got a problem regarding sounds.
I've edited plugin called 'Map-end sounds' quite abit to suit my likings but when I was near finished and tested it, it didn't work. So I made few other changes and still it doesn't work, any advice?

Code:
#include <amxmodx>
#include <amxmisc>
#include < cstrike.inc >
#define MAX_PLAYERS 33

new PLUGIN[]="Mapend Sounds"
new AUTHOR[]="ntfs"
new VERSION[]="1.33"

public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_cvar("mapend_sounds", VERSION, FCVAR_SERVER)
    set_task(1.0, "exec_sound", 0, "", 1, "d", 1)
    register_cvar("amx_mapend_sounds_advert", "1")
}

public plugin_precache() {
    precache_sound("drunkenninja.wav");
}

public exec_sound()
{
    client_cmd(0, "spk drunkenninja.wav");
}
Mr Dzx is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-08-2011 , 18:30   Re: Sound problem
Reply With Quote #2

I think you don't need to set the .wav in the client_cmd( ) native.

What do you want to do ?
Devil259 is offline
Mr Dzx
Junior Member
Join Date: Feb 2010
Old 11-08-2011 , 23:49   Re: Sound problem
Reply With Quote #3

Quote:
Originally Posted by Devil259 View Post
I think you don't need to set the .wav in the client_cmd( ) native.

What do you want to do ?
I want it to play the drunkenninja.wav file.
Mr Dzx is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-09-2011 , 06:59   Re: Sound problem
Reply With Quote #4

When do you want to play it ?
Devil259 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-10-2011 , 06:44   Re: Sound problem
Reply With Quote #5

PHP Code:
public plugin_precache() {
        
precache_sound("FOLDER/SOUND.wav")
}

public 
exec_sound(id) {
        
client_cmd(0"spk FOLDER/SOUND.wav")

Example: client_cmd(0, "spk misc/mysound.wav")
__________________

Last edited by Napoleon_be; 11-10-2011 at 06:44.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-10-2011 , 11:23   Re: Sound problem
Reply With Quote #6

If drunkenninja.wav is in sound/ folder it's ok.
Sound has to be MONO.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Mix97
Junior Member
Join Date: Aug 2011
Old 11-11-2011 , 07:40   Re: Sound problem
Reply With Quote #7

Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define MAX_PLAYERS 33

#define SOUND = "misc/drunkenninja.wav"

new PLUGIN[]="Mapend Sounds"
new AUTHOR[]="ntfs"
new VERSION[]="1.33"

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("mapend_sounds", VERSION, FCVAR_SERVER)
set_task(1.0, "exec_sound", 0, "", 1, "d", 1)
register_cvar("amx_mapend_sounds_advert", "1")
}

public plugin_precache() {
precache_sound(SOUND);
}

public exec_sound()
{
client_cmd(0, "spk SOUND");
}
Not Tested.
Mix97 is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 11-11-2011 , 10:55   Re: Sound problem
Reply With Quote #8

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

new const iSound[] = "misc/drunkenninja.wav"

new PLUGIN[]="Mapend Sounds"
new AUTHOR[]="ntfs"
new VERSION[]="1.33"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("mapend_sounds"VERSIONFCVAR_SERVER)
    
set_task(1.0"exec_sound"0""1"d"1)
    
register_cvar("amx_mapend_sounds_advert""1")
}

public 
plugin_precache() {
    for(new 
0sizeof(iSound); i++) {
        
precache_sound(iSound[i])
    }
}

public 
exec_sound()
{
    
client_cmd(0"spk misc/drunkenninja.wav");

Didn't test this yet, but this should work.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 14:18.


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