SRCDS Steam group


Making a Sound Menu?
#1
Question 
I have downloaded a bunch of sound packs and what not and I was wondering, is it possible to make a sound menu like the mani admin menu? Could I use this layout to make it?

"Sounds_main"
{
"config"
{
"display" "Sound Menu"
}
"1"
{
"display" "Sound folder"
"command" "es_cexec event_var(userid) say skill"
"submenu" "0"
}
"2"
{
"display" "Sound folder 2"
"command" "es_cexec event_var(userid) say votemap"
"submenu" "0"
Reply
#2
you'd have to write a plugin to make menu's like mani's

not sure what you want to do with the code above...
Join the Source Dedicated Server Support Group on Steam Community!
Source Dedicated Server (SRCDS)
Free to join, Live support! (When available)

http://forums.srcds.com/viewtopic/5114
Reply
#3
Yes this will work, you can mail my coder: alien@onlydutch.com

One of his projects: http://www.onlydutch.nl/functions/nieuws.php?nid=111&pag=74
[Image: banner.gif]

Reply
#4
Actually, I have found a way with EventScripts using popup. Here is what the code looks like:

block load
{
popup addline Page1 "Sounds:"
popup addline Page1 "->1. Family Guy"
popup addline Page1 "->2. Black Hawk Down"
popup addline Page1 "->3. Quake"
popup addline Page1 "4. I am ***"
popup addline Page1 "5. Next page."
popup addline Page1 "6. Exit."
popup create Page2
popup addline Page2 "1. Three Days Grace - Pain.mp3"
popup addline Page2 "2. Boob"
popup addline Page2 "3. Pizzzzzza!!!!!"
popup addline Page2 "4. BOOYA!!!"
popup addline Page2 "5. Previous Page."
popup addline Page2 "6. Exit."

popup prepuser Page1 popupt/prep1
popup menuselect Page1 popupt/soundspage1
popup menuselect Page2 popupt/soundspage2
popup submenu Page1 5 Page2
popup submenu Page2 5 Page1
popup select Page1 6 popupt/exit
popup select Page2 6 popupt/exit
popup timeout Page1 send 10
popup timeout Page1 view 10
popup timeout Page2 view 20
}

block unload
{
popup unsendname Page1 #all
popup unsendname Page2 #all
popup delete Page1
popup delete Page2
}

event player_spawn
{
es_delayed 10 es_xtell event_var(userid) #multio #defeault Welcome to test popup. Say#red sound#defeault for popup test.
}

event play_say
{
if ("sounds" in event_var(text)) do
{
es popup send Page1 event_var(userid)
}
}

block prep1
{
//Make the menu to show the player's name
es_createplayerlist _ptemp server_var(_popup_userid)
es_xsetinfo playername 0
es_keygetvalue playername _ptemp server_var(_popup_userid) name
es_format playername "->4. I am %1" server_var(playername)
es popup modline Page2 4 server_var(playername)
}

block soundspage1
{
if (server_var(_popup_choice) < 8) do
{
es_tell server_var(_popup_userid) You chose sound number server_var(_popup_choice)
}
}

block soundspage2
{
es es_xsetinfo page2choice server_var(_popup_choice)
es_xmath page2choice + 7
if (server_var(_popup_choice) < 15) do
{
es_tell server_car(_popup_userid) You chose sound number server_var(page2choice)
}
}

block exit
{
es_te;; server_var(_popup_userid) "You chose to exit after all."
}

I put es_load popup in autoexec.cfg, start the server, but nothing happens. Am I missing something?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)