plugins/include/sdktools_voice.inc
author Erik Minekus <erik@minekus.com>
Thu Aug 01 09:26:34 2013 -0400 (2013-08-01)
changeset 3967 ceafb87d38a7
parent 2796 cd0bf02b99cf
permissions -rw-r--r--
Numerous code documentation fixups (bug 5720, r=psychonic).
     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  * @param bListen		True if the receiver can listen to the sender, false otherwise.
    82  * @return			True if successful otherwise false.
    83  */
    84 #pragma deprecated Use SetListenOverride() instead
    85 native bool:SetClientListening(iReceiver, iSender, bool:bListen);
    86 
    87 /**
    88  * Retrieves if the receiver can listen to the sender.
    89  *
    90  * @param iReceiver		The listener index.
    91  * @param iSender		The sender index.
    92  * @return			True if successful otherwise false.
    93  */
    94 #pragma deprecated GetListenOverride() instead
    95 native bool:GetClientListening(iReceiver, iSender);
    96 
    97 /**
    98  * Override the receiver's ability to listen to the sender.
    99  *
   100  * @param iReceiver		The listener index.
   101  * @param iSender		The sender index.
   102  * @param override		The override of the receiver's ability to listen to the sender.
   103  * @return			True if successful otherwise false.
   104  */
   105 native bool:SetListenOverride(iReceiver, iSender, ListenOverride:override);
   106 
   107 /**
   108  * Retrieves the override of the receiver's ability to listen to the sender.
   109  *
   110  * @param iReceiver		The listener index.
   111  * @param iSender		The sender index.
   112  * @return			The override value.
   113  */
   114 native ListenOverride:GetListenOverride(iReceiver, iSender);
   115 
   116 /**
   117  * Retrieves if the muter has muted the mutee.
   118  *
   119  * @param iMuter		The muter index.
   120  * @param iMutee		The mutee index.
   121  * @return			True if muter has muted mutee, false otherwise.
   122  */
   123 native bool:IsClientMuted(iMuter, iMutee);
   124