AlliedModders
XFactor Servers

Questions on voice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NcB_Sav
Veteran Member
Karma: Neutral
Old 11-01-2009 , 18:22   Questions on voice
Reply With Quote #1

PHP Code:
#define VOICE_NORMAL        0    /**< Allow the client to listen and speak normally. */
#define VOICE_MUTED        1    /**< Mutes the client from speaking to everyone. */
#define VOICE_SPEAKALL        2    /**< Allow the client to speak to everyone. */
#define VOICE_LISTENALL        4    /**< Allow the client to listen to everyone. */
#define VOICE_TEAM        8    /**< Allow the client to always speak to team, even when dead. */
#define VOICE_LISTENTEAM    16    /**< Allow the client to always hear teammates, including dead ones. */ 
I have the above info from the sdktools_voice.inc

I was wondering if there is a way to detect if a user presses the button talk with

PHP Code:
public ongameframe()
{
     if(
buttons IN_VOICE)
          {
              
//Is pressing the talk button
          
}

__________________
NcB_Sav is offline
berni
SourceMod Plugin Approver
Karma: Neutral
Location: Austria
Old 11-02-2009 , 05:18   Re: Questions on voice
Reply With Quote #2

no
__________________
When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"
berni is offline
Send a message via MSN to berni
NcB_Sav
Veteran Member
Karma: Neutral
Old 11-02-2009 , 19:08   Re: Questions on voice
Reply With Quote #3

Quote:
Originally Posted by berni View Post
no

There is absolutly no way to catch voice?

or over ride if admin speakS?
__________________
NcB_Sav is offline
Wazz
SourceMod Donor
Karma: Neutral
Old 11-02-2009 , 19:33   Re: Questions on voice
Reply With Quote #4

Perhaps in OnClientCommand, otherwise an extension is needed to forward something like CTFGameRules::VoiceCommand(CBaseMultiplayerPl ayer *, int, int)
Wazz is offline
CrimsonGT
SourceMod Moderator
Karma: Good
Location: Gainesville, FL
Old 11-02-2009 , 21:42   Re: Questions on voice
Reply With Quote #5

VoiceCommand is the radio, has nothing to do with the voice of the player.
CrimsonGT is offline
NcB_Sav
Veteran Member
Karma: Neutral
Old 11-03-2009 , 01:24   Re: Questions on voice
Reply With Quote #6

Quote:
Originally Posted by CrimsonGT View Post
VoiceCommand is the radio, has nothing to do with the voice of the player.

Hmm that sucks.. i wanted to catch the push to talk key that sucks...


LOL wanted to make something like voice management in cz.
__________________
NcB_Sav is offline
berni
SourceMod Plugin Approver
Karma: Neutral
Location: Austria
Old 11-03-2009 , 02:30   Re: Questions on voice
Reply With Quote #7

The voice system is built pretty simple and the srcds just acts as a packet forwarder. The udp packets are just picked out from the udp stream and forwarded to all the clients (but the voice client listening filter flags are checked).
I don't remember anymore which class handles the voice stuff (maybe CBase... ?), but it's something deep inside the engine and it isn't that easy to hook that. Best way would be with a function signature I guess.

And no, it can't be done within a plugin, so don't ask.
__________________
When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"
berni is offline
Send a message via MSN to berni
NcB_Sav
Veteran Member
Karma: Neutral
Old 11-03-2009 , 18:47   Re: Questions on voice
Reply With Quote #8

Quote:
Originally Posted by berni View Post
The voice system is built pretty simple and the srcds just acts as a packet forwarder. The udp packets are just picked out from the udp stream and forwarded to all the clients (but the voice client listening filter flags are checked).
I don't remember anymore which class handles the voice stuff (maybe CBase... ?), but it's something deep inside the engine and it isn't that easy to hook that. Best way would be with a function signature I guess.

And no, it can't be done within a plugin, so don't ask.
well smart ass.. that was my question at the top.... so when you say it cant be done you dont have to be an ass with it...
__________________
NcB_Sav is offline
Damizean
SourceMod Donor
Karma: Neutral
Old 11-03-2009 , 18:51   Re: Questions on voice
Reply With Quote #9

There is a debug cvar on the server side (I don't remember the name), wich logs whenever the voice packets for a player are sent. You could use that and hook the log messages to check whenever a packet is being sent, but it's a very, very dirty method.

Edit: The cvar is voice_debugfeedbackfrom. It produces something similar to this in the log:
Code:
Sending voice from: [Rs!] Damizean - playerslot: 1
Sending voice from: [Rs!] Damizean - playerslot: 1
Sending voice from: [Rs!] Damizean - playerslot: 1
__________________

Last edited by Damizean; 11-03-2009 at 19:02..
Damizean is offline
Send a message via AIM to Damizean Send a message via MSN to Damizean
berni
SourceMod Plugin Approver
Karma: Neutral
Location: Austria
Old 11-03-2009 , 18:55   Re: Questions on voice
Reply With Quote #10

Quote:
Originally Posted by NcB_Sav View Post
well smart ass.. that was my question at the top.... so when you say it cant be done you dont have to be an ass with it...
Huh ? I explained it for anyone who maybe wants to play around with hooking it, and the last thing I just said because I was sure someone would could come up with the question how to do that in a plugin. No need to become agressive, next time I don't answer you anymore.
__________________
When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter then "Yes"
berni is offline
Send a message via MSN to berni
Reply


Thread Tools
Display Modes

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:30.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Theme made by Freecode Sponsored by Layered Technologies