Jump to content

Recommended Posts

Posted

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 !

Posted

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 :D

 

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 );
	}
}
Posted

Each mod has different settings...I could only find 2 relevant settings in jaymod 2.2.0:

match_mutespecs — enable/disable muting of spectators

Default: match_mutespecs 0

On server(In console) You can do: /rcon match_mutespecs  to see current value.

Oiw4jTE.jpg

For testing:

g_voiceChatsAllowed sets the maximum number of voice chats allowable over a 30 second period.
A value of 0 disables voice chats.

HjWrZCa.jpg

Make sure ET settings are OK:

Esc, Options, Controls: Quick Chat: V

  • Like 1
Posted

 

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 :D

 

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 :/
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.