Raised This Month: $51 Target: $400
 12% 

Print a message when player starts using +voicerecord


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Adomaz1
Senior Member
Join Date: Feb 2014
Old 07-23-2019 , 14:26   Print a message when player starts using +voicerecord
Reply With Quote #1

Is it possible to print a message to a player when he starts using +voicerecord? I tried to do this with FM_Voice_SetClientListening, but it didn't work, just started spamming the chat.

Code, if needed:
Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
	register_dictionary("voice.txt");
	register_forward(FM_Voice_SetClientListening, "FwdVoiceSetClientListening");
}

public FwdVoiceSetClientListening(iReceiver, iSender, bool: bListen)
{
	if(iReceiver == iSender)
		return FMRES_SUPERCEDE;

	client_print_color(iSender, iSender, "%L", iSender, "VOICE_WARN");
    
	return FMRES_IGNORED;
}
Thank you.

Last edited by Adomaz1; 07-23-2019 at 14:28.
Adomaz1 is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-23-2019 , 15:52   Re: Print a message when player starts using +voicerecord
Reply With Quote #2

https://www.amxmodx.org/api/amxmodx/client_print_color
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-23-2019 , 17:34   Re: Print a message when player starts using +voicerecord
Reply With Quote #3

Use hudmessage instead with delay
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-24-2019 , 02:27   Re: Print a message when player starts using +voicerecord
Reply With Quote #4

Or simply, bool with get_gametime ?
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 07-24-2019 , 05:55   Re: Print a message when player starts using +voicerecord
Reply With Quote #5

You can not achieve this in this way.
Try with opheu.
Look here
https://forums.alliedmods.net/showthread.php?t=138497
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
Adomaz1
Senior Member
Join Date: Feb 2014
Old 07-24-2019 , 06:09   Re: Print a message when player starts using +voicerecord
Reply With Quote #6

Thank you everyone. Will try to do it with orpheu.
Adomaz1 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-24-2019 , 11:14   Re: Print a message when player starts using +voicerecord
Reply With Quote #7

Quote:
Originally Posted by Krtola View Post
You can not achieve this in this way.
Try with opheu.
Look here
https://forums.alliedmods.net/showthread.php?t=138497

Yes , he can.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 07-24-2019 , 11:49   Re: Print a message when player starts using +voicerecord
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Yes , he can.

Then show us how.
Im sure this can be done only with orpheu.
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4

Last edited by Krtola; 07-24-2019 at 11:50.
Krtola is offline
Send a message via Skype™ to Krtola
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 07-24-2019 , 18:43   Re: Print a message when player starts using +voicerecord
Reply With Quote #9

The forward you are using is called every 0.3 seconds + (playersNum * maxPlayers), you need to add a delay with get_systime or get_gametime.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 07-25-2019 , 03:49   Re: Print a message when player starts using +voicerecord
Reply With Quote #10

First test,then post something.
He need plugin which will send msg only when player press button for voice( default K ) .
This forward here send msg all the time, no matter if u have push "K" or not.
That's why I say first test then try to "help".
__________________
Check my original plugins for cs 1.6 and subscribe on channel
Look at the video bellow to see zombie frost grenade

https://youtu.be/j0zspNfN-AM?si=_1IiGPETN-GQY9Ua

Look at the video below to see Zombie blind grenade

https://youtu.be/ORC7ZmoaipQ?si=QC8Bul96QGitUwX4
Krtola is offline
Send a message via Skype™ to Krtola
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 16:40.


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