Raised This Month: $ Target: $400
 0% 

How FM_Voice_SetClientListening work ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
W12
Member
Join Date: Sep 2013
Old 11-09-2013 , 19:21   How FM_Voice_SetClientListening work ?
Reply With Quote #1

Hi everybody.
Can somebody tell me detalied how exactly FM_Voice_SetClientListening work?

When is called, who is Receiver, who is Sender and when the third param is true and when is false ?

Thanks anticipated.
W12 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-09-2013 , 20:18   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #2

This page shows the format of arguments.

Google works wonders.
__________________
fysiks is online now
W12
Member
Join Date: Sep 2013
Old 11-09-2013 , 20:34   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #3

I want to know how this forward exactly work.
Code:
When is called, who is Receiver, who is Sender and when the third param is true and when is false ?
I know the type of arguments...
W12 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-09-2013 , 20:40   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #4

Look at existing plugins to see how you use them. To see when they are called (and the value of the parameters), hook the forward and look for yourself.
__________________
fysiks is online now
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 11-10-2013 , 00:29   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
Look at existing plugins to see how you use them. To see when they are called (and the value of the parameters), hook the forward and look for yourself.
Or he just can look at the source code of fakemeta module.

From amxmodx func wiki:
Spoiler

iReceiver is who is listening.
iSender is who is sending voice.
Listen - true if listening, false if not (like iSender don't sending voice).
__________________
simanovich is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 11-10-2013 , 00:53   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #6

iSender // is the PlayerID who is talking
iReceiver // is the PlayerID who is listening
bool Listen // should listener hear what talker is saying or no
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-10-2013 , 02:29   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #7

Every 0.3 seconds, this function is called playersNum * maxPlayers times.
3rd arguments notifies the engine if receiver can hear sender.
If receiver is not connected, function is not called, receiver status doesn't seem to be taken in account.
Return value is not used by game dll but engine returns 0 if sender or receiver is not in range (1 to maxplayer).
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 11-10-2013 at 02:29.
ConnorMcLeod is offline
W12
Member
Join Date: Sep 2013
Old 11-10-2013 , 08:31   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #8

Thank you Connor. This help me a lot.
One more question if I can:
Which is difference between FM_Voice_SetClientListening and FM_Voice_GetClientListening, also when FM_Voice_GetClientListening is called?
W12 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-10-2013 , 09:29   Re: How FM_Voice_SetClientListening work ?
Reply With Quote #9

Get returns the actual status taken in account by the engine, i don't think it is used.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 11-10-2013, 12:41
RapZzw3rR
This message has been deleted by RapZzw3rR.
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 23:14.


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