plugins/include/sdktools_voice.inc
author Asher Baker <asherkin@limetech.org>
Sat Apr 14 01:12:24 2012 +0100 (2012-04-14)
changeset 3477 8762e8fcbc50
parent 2796 cd0bf02b99cf
child 3967 ceafb87d38a7
permissions -rw-r--r--
Backed out changeset: 387b27fb575b (bug 5227)
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
     5  * =============================================================================
     6  *
     7  * This file is part of the SourceMod/SourcePawn SDK.
     8  *
     9  * This program is free software; you can redistribute it and/or modify it under
    10  * the terms of the GNU General Public License, version 3.0, as published by the
    11  * Free Software Foundation.
    12  * 
    13  * This program is distributed in the hope that it will be useful, but WITHOUT
    14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    15  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    16  * details.
    17  *
    18  * You should have received a copy of the GNU General Public License along with
    19  * this program.  If not, see <http://www.gnu.org/licenses/>.
    20  *
    21  * As a special exception, AlliedModders LLC gives you permission to link the
    22  * code of this program (as well as its derivative works) to "Half-Life 2," the
    23  * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    24  * by the Valve Corporation.  You must obey the GNU General Public License in
    25  * all respects for all other code used.  Additionally, AlliedModders LLC grants
    26  * this exception to all derivative works.  AlliedModders LLC defines further
    27  * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    28  * or <http://www.sourcemod.net/license.php>.
    29  *
    30  * Version: $Id$
    31  */
    32 
    33 #if defined _sdktools_voice_included
    34   #endinput
    35 #endif
    36 #define _sdktools_voice_included
    37 
    38 /**
    39  * @section voice flags.
    40  */
    41 #define VOICE_NORMAL		0	/**< Allow the client to listen and speak normally. */
    42 #define VOICE_MUTED		1	/**< Mutes the client from speaking to everyone. */
    43 #define VOICE_SPEAKALL		2	/**< Allow the client to speak to everyone. */
    44 #define VOICE_LISTENALL		4	/**< Allow the client to listen to everyone. */
    45 #define VOICE_TEAM		8	/**< Allow the client to always speak to team, even when dead. */
    46 #define VOICE_LISTENTEAM	16	/**< Allow the client to always hear teammates, including dead ones. */
    47  
    48 /**
    49  * @endsection
    50  */
    51 
    52 enum ListenOverride
    53 {
    54 	Listen_Default = 0,	/**< Leave it up to the game */
    55 	Listen_No,			/**< Can't hear */
    56 	Listen_Yes,			/**< Can hear */
    57 };
    58 
    59 /**
    60  * Set the client listening flags.
    61  *
    62  * @param client		The client index
    63  * @param flags		The voice flags
    64  * @noreturn
    65  */
    66 native SetClientListeningFlags(client, flags);
    67 
    68 /**
    69  * Retrieve the client current listening flags.
    70  *
    71  * @param client		The client index
    72  * @return			The current voice flags
    73  */
    74 native GetClientListeningFlags(client);
    75 
    76 /**
    77  * Set the receiver ability to listen to the sender.
    78  *
    79  * @param iReceiver		The listener index.
    80  * @param iSender		The sender index.
    81  * @return			True if successful otherwise false.
    82  */
    83 #pragma deprecated Use SetListenOverride() instead
    84 native bool:SetClientListening(iReceiver, iSender, bool:bListen);
    85 
    86 /**
    87  * Retrieves if the receiver can listen to the sender.
    88  *
    89  * @param iReceiver		The listener index.
    90  * @param iSender		The sender index.
    91  * @return			True if successful otherwise false.
    92  */
    93 #pragma deprecated GetListenOverride() instead
    94 native bool:GetClientListening(iReceiver, iSender);
    95 
    96 /**
    97  * Override the receiver's ability to listen to the sender.
    98  *
    99  * @param iReceiver		The listener index.
   100  * @param iSender		The sender index.
   101  * @param override		
   102  * @return			True if successful otherwise false.
   103  */
   104 native bool:SetListenOverride(iReceiver, iSender, ListenOverride:override);
   105 
   106 /**
   107  * Retrieves the override of the receiver's ability to listen to the sender.
   108  *
   109  * @param iReceiver		The listener index.
   110  * @param iSender		The sender index.
   111  * @return			The override value.
   112  */
   113 native ListenOverride:GetListenOverride(iReceiver, iSender);
   114 
   115 /**
   116  * Retrieves if the muter has muted the mutee.
   117  *
   118  * @param iMuter		The muter index.
   119  * @param iMutee		The mutee index.
   120  * @return			True if muter has muted mutee, false otherwise.
   121  */
   122 native bool:IsClientMuted(iMuter, iMutee);
   123