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