plugins/include/sdktools_voice.inc
author David Anderson <dvander@alliedmods.net>
Sun Oct 28 08:24:47 2007 +0000 (2007-10-28)
changeset 1649 37373aea4dfe
parent 1468 b90faced4648
child 1947 e73a1e51833b
permissions -rw-r--r--
fixed macro bug in the sdk
teame06@1235
     1
/**
teame06@1235
     2
 * vim: set ts=4 :
ds@1330
     3
 * =============================================================================
teame06@1235
     4
 * SourceMod (C)2004-2007 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
teame06@1235
    52
/**
teame06@1235
    53
 * Set the client listening flags.
teame06@1235
    54
 *
teame06@1235
    55
 * @param client		The client index
teame06@1235
    56
 * @param flags		The voice flags
teame06@1235
    57
 * @noreturn
teame06@1235
    58
 */
teame06@1235
    59
native SetClientListeningFlags(client, flags);
teame06@1235
    60
teame06@1235
    61
/**
teame06@1235
    62
 * Retrieve the client current listening flags.
teame06@1235
    63
 *
teame06@1235
    64
 * @param client		The client index
teame06@1235
    65
 * @return			The current voice flags
teame06@1235
    66
 */
teame06@1235
    67
native GetClientListeningFlags(client);
teame06@1235
    68
teame06@1235
    69
/**
teame06@1235
    70
 * Set the receiver ability to listen to the sender.
teame06@1235
    71
 *
teame06@1235
    72
 * @param iReceiver		The listener index.
teame06@1235
    73
 * @param iSender		The sender index.
teame06@1235
    74
 * @return			True if successful otherwise false.
teame06@1235
    75
 */
teame06@1235
    76
native bool:SetClientListening(iReceiver, iSender, bool:bListen);
teame06@1235
    77
teame06@1235
    78
/**
teame06@1235
    79
 * Retrieves if the receiver can listen to the sender.
teame06@1235
    80
 *
teame06@1235
    81
 * @param iReceiver		The listener index.
teame06@1235
    82
 * @param iSender		The sender index.
teame06@1235
    83
 * @return			True if successful otherwise false.
teame06@1235
    84
 */
teame06@1235
    85
native bool:GetClientListening(iReceiver, iSender);