Raised This Month: $ Target: $400
 0% 

Help with sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-20-2011 , 18:23   Help with sound
Reply With Quote #1

HI. I need help with sound.
I want to play sound on open menu.
Here is my function for open menu:
PHP Code:
public mymenu(id){
    
menu_display(idgMyMenu,0);
    
ColorChat(idGREEN"Pouzivaj tlacitko ^3P^4, pro zobrazeni menu")
    
client_print(idprint_center"Pouzivaj tlacitko P, pro zobrazeni menu")
    return 
PLUGIN_HANDLED;

__________________

Last edited by extreem; 04-20-2011 at 18:58.
extreem is offline
Send a message via Skype™ to extreem
Rirre
Veteran Member
Join Date: Nov 2006
Old 04-20-2011 , 18:40   Re: Help with sound
Reply With Quote #2

PHP Code:
public mymenu(id){
    
menu_display(idgMyMenu,0);
    
ColorChat(idGREEN"Pouzivaj tlacitko ^3P^4, pro zobrazeni menu")
    
client_print(idprint_center"Pouzivaj tlacitko P, pro zobrazeni menu")
    
client_cmd(id"spk mymenu"// Play "sound/mymenu.wav"
    
return PLUGIN_HANDLED;
}

public 
plugin_precache()
    
precache_sound("mymenu.wav"
Rirre is offline
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-20-2011 , 18:56   Re: Help with sound
Reply With Quote #3

Don't work
__________________
extreem is offline
Send a message via Skype™ to extreem
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-20-2011 , 19:35   Re: Help with sound
Reply With Quote #4

Quote:
Originally Posted by extreem View Post
Don't work
What did you try? And, where did you put the sound file?
__________________
fysiks is offline
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-21-2011 , 07:18   Re: Help with sound
Reply With Quote #5

plugin was compiled, in CS I was download that file, but when I open my menu I dont have sound
__________________
extreem is offline
Send a message via Skype™ to extreem
Rirre
Veteran Member
Join Date: Nov 2006
Old 04-21-2011 , 09:33   Re: Help with sound
Reply With Quote #6

if its a mp3 file, you have to change
PHP Code:
client_cmd(id"spk mymenu"
to:
PHP Code:
client_cmd(id"mp3 play sound/mymenu"
Check if the .mp3 file is "mono" and not "stereo".
Otherwise you have to convert it to mono.
Rirre is offline
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-21-2011 , 09:58   Re: Help with sound
Reply With Quote #7

Look please. Full code
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "sound"
#define VERSION "1.0"
#define AUTHOR "Extreem"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /audio""audio")
}
public 
audio(id){
    
client_cmd(id"spk sound")  
    
client_print(idprint_chat"Plugin is work")
}
public 
plugin_precache()
    
precache_sound("sound.wav"
Some screens:
Attached Thumbnails
Click image for larger version

Name:	21.4.jpg
Views:	134
Size:	71.7 KB
ID:	85058   Click image for larger version

Name:	21.41.png
Views:	145
Size:	52.5 KB
ID:	85059  
__________________
extreem is offline
Send a message via Skype™ to extreem
extreem
Member
Join Date: Apr 2011
Location: Czech Republick
Old 04-21-2011 , 10:01   Re: Help with sound
Reply With Quote #8

And screen in game
Attached Thumbnails
Click image for larger version

Name:	21.42.jpg
Views:	139
Size:	57.2 KB
ID:	85060  
__________________
extreem is offline
Send a message via Skype™ to extreem
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 19:51.


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