Raised This Month: $51 Target: $400
 12% 

[REQ] Play sound on Next/Back/Exit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-10-2014 , 12:01   [REQ] Play sound on Next/Back/Exit
Reply With Quote #1

I need help.
Is it possible to play a sound:
PHP Code:
client_cmd (id"spk menu/menu2.wav"
When someone clicks one of those:
PHP Code:
menu_setprop(menuMPROP_BACKNAME"Back");
menu_setprop(menuMPROP_NEXTNAME"Next");
menu_setprop(menuMPROP_EXITNAME"Exit"); 
?
Syturi0 is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 10-10-2014 , 12:08   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #2

IIRC, it can't be done with new menus. You can try with old style menus
__________________
Hey ^_^
NikKOo31 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-10-2014 , 12:09   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #3

Quote:
Originally Posted by NikKOo31 View Post
IIRC, it can't be done with new menus. You can try with old style menus
Ah, ty.
Nvm then.
Syturi0 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 10-10-2014 , 13:18   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #4

Quote:
Originally Posted by NikKOo31 View Post
IIRC, it can't be done with new menus. You can try with old style menus
Why not? You can handle menu normally and play sound into it.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-10-2014 , 13:26   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #5

Quote:
Originally Posted by ^SmileY View Post
Why not? You can handle menu normally and play sound into it.
Teach me
Syturi0 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-10-2014 , 13:27   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #6

I found this:
PHP Code:
    if ( item == MENU_EXIT )
    {
        
client_cmd (id"spk menu/menu1.wav");
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    } 
But doesnt work for NEXT/BACK :/
Syturi0 is offline
NikKOo31
Senior Member
Join Date: May 2013
Location: Home
Old 10-10-2014 , 16:37   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #7

Quote:
Originally Posted by ^SmileY View Post
Why not? You can handle menu normally and play sound into it.
You should test if the handler is called when press next/back aidonzinksou


@Syturi0
You can remove next/back/exit button (mprop_perpage 0) and create them yourself, then just check the item and you'll be able to add sounds, but would be kinda same that using old menus
__________________
Hey ^_^
NikKOo31 is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-10-2014 , 16:40   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #8

Quote:
Originally Posted by NikKOo31 View Post
You should test if the handler is called when press next/back aidonzinksou


@Syturi0
You can remove next/back/exit button (mprop_perpage 0) and create them yourself, then just check the item and you'll be able to add sounds, but would be kinda same that using old menus
I dont think my plugin would work with that way.
So, its really imposible to add sounds with this code?
Syturi0 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 10-12-2014 , 13:29   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #9

just wondering, where did the idea come from?
.Dare Devil. is offline
Syturi0
Veteran Member
Join Date: Aug 2014
Location: Your mom house -Portugal
Old 10-12-2014 , 13:42   Re: [REQ] Play sound on Next/Back/Exit
Reply With Quote #10

Quote:
Originally Posted by .Dare Devil. View Post
just wondering, where did the idea come from?
?
Syturi0 is offline
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 05:10.


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