teame06@1235: /**
teame06@1235: * vim: set ts=4 :
ds@1330: * =============================================================================
ds@1947: * SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
ds@1330: * =============================================================================
ds@1330: *
ds@1330: * This file is part of the SourceMod/SourcePawn SDK.
teame06@1235: *
ds@1330: * This program is free software; you can redistribute it and/or modify it under
ds@1330: * the terms of the GNU General Public License, version 3.0, as published by the
ds@1330: * Free Software Foundation.
ds@1330: *
ds@1330: * This program is distributed in the hope that it will be useful, but WITHOUT
ds@1330: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
ds@1330: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
ds@1330: * details.
ds@1330: *
ds@1330: * You should have received a copy of the GNU General Public License along with
ds@1330: * this program. If not, see .
ds@1330: *
ds@1330: * As a special exception, AlliedModders LLC gives you permission to link the
ds@1330: * code of this program (as well as its derivative works) to "Half-Life 2," the
ds@1330: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
ds@1330: * by the Valve Corporation. You must obey the GNU General Public License in
ds@1330: * all respects for all other code used. Additionally, AlliedModders LLC grants
ds@1330: * this exception to all derivative works. AlliedModders LLC defines further
ds@1330: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
ds@1330: * or .
teame06@1235: *
faluco@1247: * Version: $Id$
teame06@1235: */
teame06@1235:
teame06@1235: #if defined _sdktools_voice_included
teame06@1235: #endinput
teame06@1235: #endif
teame06@1235: #define _sdktools_voice_included
teame06@1235:
teame06@1235: /**
teame06@1235: * @section voice flags.
teame06@1235: */
teame06@1235: #define VOICE_NORMAL 0 /**< Allow the client to listen and speak normally. */
ferret99gt@1468: #define VOICE_MUTED 1 /**< Mutes the client from speaking to everyone. */
teame06@1235: #define VOICE_SPEAKALL 2 /**< Allow the client to speak to everyone. */
teame06@1235: #define VOICE_LISTENALL 4 /**< Allow the client to listen to everyone. */
ferret99gt@1468: #define VOICE_TEAM 8 /**< Allow the client to always speak to team, even when dead. */
ferret99gt@1468: #define VOICE_LISTENTEAM 16 /**< Allow the client to always hear teammates, including dead ones. */
teame06@1235:
teame06@1235: /**
teame06@1235: * @endsection
teame06@1235: */
teame06@1235:
fyrenmoo@2796: enum ListenOverride
fyrenmoo@2796: {
fyrenmoo@2796: Listen_Default = 0, /**< Leave it up to the game */
fyrenmoo@2796: Listen_No, /**< Can't hear */
fyrenmoo@2796: Listen_Yes, /**< Can hear */
fyrenmoo@2796: };
fyrenmoo@2796:
teame06@1235: /**
teame06@1235: * Set the client listening flags.
teame06@1235: *
teame06@1235: * @param client The client index
teame06@1235: * @param flags The voice flags
teame06@1235: * @noreturn
teame06@1235: */
teame06@1235: native SetClientListeningFlags(client, flags);
teame06@1235:
teame06@1235: /**
teame06@1235: * Retrieve the client current listening flags.
teame06@1235: *
teame06@1235: * @param client The client index
teame06@1235: * @return The current voice flags
teame06@1235: */
teame06@1235: native GetClientListeningFlags(client);
teame06@1235:
teame06@1235: /**
teame06@1235: * Set the receiver ability to listen to the sender.
teame06@1235: *
teame06@1235: * @param iReceiver The listener index.
teame06@1235: * @param iSender The sender index.
teame06@1235: * @return True if successful otherwise false.
teame06@1235: */
fyrenmoo@2796: #pragma deprecated Use SetListenOverride() instead
teame06@1235: native bool:SetClientListening(iReceiver, iSender, bool:bListen);
teame06@1235:
teame06@1235: /**
teame06@1235: * Retrieves if the receiver can listen to the sender.
teame06@1235: *
teame06@1235: * @param iReceiver The listener index.
teame06@1235: * @param iSender The sender index.
teame06@1235: * @return True if successful otherwise false.
teame06@1235: */
fyrenmoo@2796: #pragma deprecated GetListenOverride() instead
fyrenmoo@2796: native bool:GetClientListening(iReceiver, iSender);
fyrenmoo@2796:
fyrenmoo@2796: /**
fyrenmoo@2796: * Override the receiver's ability to listen to the sender.
fyrenmoo@2796: *
fyrenmoo@2796: * @param iReceiver The listener index.
fyrenmoo@2796: * @param iSender The sender index.
fyrenmoo@2796: * @param override
fyrenmoo@2796: * @return True if successful otherwise false.
fyrenmoo@2796: */
fyrenmoo@2796: native bool:SetListenOverride(iReceiver, iSender, ListenOverride:override);
fyrenmoo@2796:
fyrenmoo@2796: /**
fyrenmoo@2796: * Retrieves the override of the receiver's ability to listen to the sender.
fyrenmoo@2796: *
fyrenmoo@2796: * @param iReceiver The listener index.
fyrenmoo@2796: * @param iSender The sender index.
fyrenmoo@2796: * @return The override value.
fyrenmoo@2796: */
fyrenmoo@2796: native ListenOverride:GetListenOverride(iReceiver, iSender);
fyrenmoo@2796:
fyrenmoo@2796: /**
fyrenmoo@2796: * Retrieves if the muter has muted the mutee.
fyrenmoo@2796: *
fyrenmoo@2796: * @param iMuter The muter index.
fyrenmoo@2796: * @param iMutee The mutee index.
fyrenmoo@2796: * @return True if muter has muted mutee, false otherwise.
fyrenmoo@2796: */
fyrenmoo@2796: native bool:IsClientMuted(iMuter, iMutee);
fyrenmoo@2796: