Hani Posted February 4, 2016 Posted February 4, 2016 HI there, I am probably about to finish a soundpack for my own server but i have a problem, Do anyone of u know how to make Voicechat or Soundpack menu pop up by pressing V button when ur on spectator especially in jaymod? is there any code or something did i miss or i need to put for it? Thank u ! Quote
Shana Posted February 4, 2016 Posted February 4, 2016 Try looking into FA sound pack, ui/wm_quickmessageAlt.menu. The basic structure is there If I remember well there was some cvar for spectator vsays, not sure though cause can't find it at the moment... -> or you could just use better mods like Noquarter or silent Little refference to cg_quickmessage function. (posting this cause It was useful when I was creating vsay pack myself) Ingame bind key "mp_quickmessage" runs this code: void CG_QuickMessage_f( void ) { if ( cgs.clientinfo[ cg.clientNum ].team == TEAM_SPECTATOR ) { return; } CG_EventHandling( CGAME_EVENT_NONE, qfalse ); if ( cg_quickMessageAlt.integer ) { trap_UI_Popup( UIMENU_WM_QUICKMESSAGEALT ); } else { trap_UI_Popup( UIMENU_WM_QUICKMESSAGE ); } } Quote
Buckwild Posted February 5, 2016 Posted February 5, 2016 Each mod has different settings...I could only find 2 relevant settings in jaymod 2.2.0:match_mutespecs — enable/disable muting of spectatorsDefault: match_mutespecs 0On server(In console) You can do: /rcon match_mutespecs to see current value.For testing:g_voiceChatsAllowed sets the maximum number of voice chats allowable over a 30 second period.A value of 0 disables voice chats.Make sure ET settings are OK:Esc, Options, Controls: Quick Chat: V 1 Quote
Hani Posted February 5, 2016 Author Posted February 5, 2016 Try looking into FA sound pack, ui/wm_quickmessageAlt.menu. The basic structure is there If I remember well there was some cvar for spectator vsays, not sure though cause can't find it at the moment... -> or you could just use better mods like Noquarter or silent Little refference to cg_quickmessage function. (posting this cause It was useful when I was creating vsay pack myself) Ingame bind key "mp_quickmessage" runs this code: void CG_QuickMessage_f( void ) { if ( cgs.clientinfo[ cg.clientNum ].team == TEAM_SPECTATOR ) { return; } CG_EventHandling( CGAME_EVENT_NONE, qfalse ); if ( cg_quickMessageAlt.integer ) { trap_UI_Popup( UIMENU_WM_QUICKMESSAGEALT ); } else { trap_UI_Popup( UIMENU_WM_QUICKMESSAGE ); } } idk if pasting that script u gave me will work but ill try because almost every jaymod servers has wm_quickmessageAlt.menu starting like this:- ------------------------------------------------------ #include "ui/menudef.h" #define DEFAULT_TEXT_SCALE 0.25 #define ORIGIN_QUICKMESSAGE 10 10 #define QM_MENU_GRADIENT_START_OFFSET #define QM_MENU_START( WINDOWNAME ) \ \ menuDef { \ name WINDOWNAME \ visible 0 \ fullscreen 0 \ rect 0 100 640 380 \ onOpen { setCvar cl_bypassMouseInput "1" } \ onClose { setCvar cl_bypassMouseInput "0" } \ onEsc { closeAll } \ \ itemDef { \ name "window" \ rect 0 19 204 136 \ origin ORIGIN_QUICKMESSAGE \ style WINDOW_STYLE_FILLED \ backcolor 0 0 0 .75 \ border WINDOW_BORDER_FULL \ bordercolor .5 .5 .5 .5 \ visible 1 \ decoration \ } \ \ itemDef { \ name "windowtitle" \ rect $evalfloat((0)+2) $evalfloat((19)+2) $evalfloat((204)-4) 12 \ origin ORIGIN_QUICKMESSAGE \ text "^s- ^9Hani Soundpack ^s-" \ textfont UI_FONT_ARIBLK_16 \ textscale .19 \ textalignx 3 \ textaligny 10 \ style WINDOW_STYLE_FILLED \ backcolor .16 .2 .17 .8 \ forecolor .6 .6 .6 1 \ visible 1 \ decoration \ } #define QM_MENU_END } #define QM_MENU_ITEM( WINDOWTEXT, ACTION, KEY, POS ) \ itemDef { \ name "menuitem"##WINDOWTEXT \ rect 6 $evalfloat( 35 + ( 12 * POS )) 128 10 \ origin ORIGIN_QUICKMESSAGE \ type ITEM_TYPE_TEXT \ text WINDOWTEXT \ textfont UI_FONT_COURBD_21 \ textstyle ITEM_TEXTSTYLE_SHADOWED \ textscale .2 \ textaligny 8 \ forecolor .6 .6 .6 1 \ visible 1 \ decoration \ } \ execKey KEY { ACTION } #define QM_MENU_ITEM_TEAM( WINDOWTEXT, ACTION, KEY, POS ) \ itemDef { \ name "menuitem"##WINDOWTEXT \ rect 6 $evalfloat( 35 + ( 12 * POS )) 128 10 \ origin ORIGIN_QUICKMESSAGE \ type ITEM_TYPE_TEXT \ text WINDOWTEXT \ textfont UI_FONT_COURBD_21 \ textstyle ITEM_TEXTSTYLE_SHADOWED \ textscale .2 \ textaligny 8 \ forecolor .6 .6 .6 1 \ visible 1 \ decoration \ } \ execKey KEY { ACTION } ---------------------------------- idk if this starting part of the script has anything to do with spectator's voicechat menu because afaik it might be a script for voicechat menu decoration. ===================== @Buckwild the 2 methods u gave me were alrdy there on the server, no changes everything default but still voicechat menu for specs doesnt work :/ Quote
Shana Posted February 5, 2016 Posted February 5, 2016 I didn't say paste, its a refference. Just to understand whats happening because some people might be changing wrong .menu files. The code you posted is menu decoration so it doesn't change what you need. Nice finding Buckwild, that's what I was talking about Sorry Hani but at the moment, I can send what I know, when I have more time I'll run some tests on my offline servers. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.