plugins/include/basecomm.inc
author Nicholas Hastings <skamonkey@gmail.com>
Wed Jan 23 18:28:06 2013 -0500 (2013-01-23)
changeset 3756 114d52909940
parent 3645 80c9ae186971
permissions -rw-r--r--
Marked some missed Pb natives as optional (bug 5579).
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2011 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 _basecomm_included
    34  #endinput
    35 #endif
    36 #define _basecomm_included
    37 
    38 /**
    39  * Called when a client is muted or unmuted
    40  * 
    41  * @param	client		Client index
    42  * @param	muteState	True if client was muted, false otherwise
    43  */
    44  forward BaseComm_OnClientMute(client, bool:muteState);
    45  
    46  /**
    47  * Called when a client is gagged or ungagged
    48  * 
    49  * @param	client		Client index
    50  * @param	gagState	True if client was gaged, false otherwise
    51  */
    52  forward BaseComm_OnClientGag(client, bool:gagState);
    53  
    54 /**
    55  * Returns whether or not a client is gagged
    56  *
    57  * @param client		Client index.
    58  * @return				True if client is gagged, false otherwise.
    59  */
    60 native bool:BaseComm_IsClientGagged(client);
    61 
    62 /**
    63  * Returns whether or not a client is muted
    64  *
    65  * @param client		Client index.
    66  * @return				True if client is muted, false otherwise.
    67  */
    68 native bool:BaseComm_IsClientMuted(client);
    69 
    70 /**
    71  * Sets a client's gag state
    72  *
    73  * @param client		Client index.
    74  * @param gagState		True to gag client, false to ungag.
    75  * @return				True if this caused a change in gag state, false otherwise.
    76  */
    77 native bool:BaseComm_SetClientGag(client, bool:gagState);
    78 
    79 /**
    80  * Sets a client's mute state
    81  *
    82  * @param client		Client index.
    83  * @param muteState		True to mute client, false to unmute.
    84  * @return				True if this caused a change in mute state, false otherwise.
    85  */
    86 native bool:BaseComm_SetClientMute(client, bool:muteState);
    87 
    88 /* DO NOT EDIT BELOW THIS LINE */
    89 
    90 public SharedPlugin:__pl_basecomm = 
    91 {
    92 	name = "basecomm",
    93 	file = "basecomm.smx",
    94 #if defined REQUIRE_PLUGIN
    95 	required = 1,
    96 #else
    97 	required = 0,
    98 #endif
    99 };
   100 
   101 #if !defined REQUIRE_PLUGIN
   102 public __pl_basecomm_SetNTVOptional()
   103 {
   104 	MarkNativeAsOptional("BaseComm_IsClientGagged");
   105 	MarkNativeAsOptional("BaseComm_IsClientMuted");
   106 	MarkNativeAsOptional("BaseComm_SetClientGag");
   107 	MarkNativeAsOptional("BaseComm_SetClientMute");
   108 }
   109 #endif