This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[EXTENSION] Voice Management


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-11-2007 , 15:03   [EXTENSION] Voice Management
#1

This extension allow you to control who can use the voice aka mic in the server.

Install:
Upload the addons folder to your mods root directory.

Natives:
Code:
#define SPEAK_NORMAL           0 #define SPEAK_MUTED            1 #define SPEAK_ALL              2 #define SPEAK_LISTENALL        4 /**  * Set the client listening flags.  *  * @param client        Player index  * @param iSpeakFlags   The speak flag mode. Use the SPEAK_* defines  * @noreturn  */ native SetClientListeningFlags(client, iSpeakFlags); /**  * Retrieve the client current listening flags.  *  * @param client        Player index  * @return          The speak flags.  */ native GetClientListeningFlags(client); /**  * Set the receiver ability to listen to the sender.  *  * @param iReceiver     The listener index.  * @param iSender       The sender index.  * @return          True if sucessful otherwise false.  */ native bool:SetClientListening(iReceiver, iSender, bool:bListen); /**  * Retrieves of the receiver can listen to the sender.  *  * @param iReceiver     The listener index.  * @param iSender       The sender index.  * @return          True if sucessful otherwise false.  */ native bool:GetClientListening(iReceiver, iSender);

Example:
Code:
#include <sourcemod> #include <voicemanagement> public OnPluginStart() {     RegConsoleCmd("mute", CmdRun); } public Action:CmdRun(client, args) {     if(client)     {         SetClientListeningFlags(client, SPEAK_MUTED);         PrintToConsole(client, "You have muted yourself");     } else {         PrintToServer("You must be in game to use this option");     }     return Plugin_Handled; }

Credit:
  • ^BuGs^ - For helping me test it.
    AMX Mod X - base on the set/get_speak

Source Code

Click here to download
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
 



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 20:40.


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