plugins/include/sdktools_voice.inc
author Fyren <fyrenmoo@gmail.com>
Mon Apr 13 16:39:53 2009 -0700 (2009-04-13)
changeset 2696 32a50b96b644
parent 2289 44045ead61cd
child 2796 cd0bf02b99cf
permissions -rw-r--r--
Fix OnClientConnect rejectmsg handling, improve doc (bug 3690, r=dvander)
     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 /**
    53  * Set the client listening flags.
    54  *
    55  * @param client		The client index
    56  * @param flags		The voice flags
    57  * @noreturn
    58  */
    59 native SetClientListeningFlags(client, flags);
    60 
    61 /**
    62  * Retrieve the client current listening flags.
    63  *
    64  * @param client		The client index
    65  * @return			The current voice flags
    66  */
    67 native GetClientListeningFlags(client);
    68 
    69 /**
    70  * Set the receiver ability to listen to the sender.
    71  *
    72  * @param iReceiver		The listener index.
    73  * @param iSender		The sender index.
    74  * @return			True if successful otherwise false.
    75  */
    76 native bool:SetClientListening(iReceiver, iSender, bool:bListen);
    77 
    78 /**
    79  * Retrieves if the receiver can listen to the sender.
    80  *
    81  * @param iReceiver		The listener index.
    82  * @param iSender		The sender index.
    83  * @return			True if successful otherwise false.
    84  */
    85 native bool:GetClientListening(iReceiver, iSender);