plugins/include/basecomm.inc
changeset 3340 7eb2b72e42d8
child 3645 80c9ae186971
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/plugins/include/basecomm.inc	Wed Jul 06 22:34:21 2011 -0400
     1.3 @@ -0,0 +1,93 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * =============================================================================
     1.7 + * SourceMod (C)2004-2011 AlliedModders LLC.  All rights reserved.
     1.8 + * =============================================================================
     1.9 + *
    1.10 + * This file is part of the SourceMod/SourcePawn SDK.
    1.11 + *
    1.12 + * This program is free software; you can redistribute it and/or modify it under
    1.13 + * the terms of the GNU General Public License, version 3.0, as published by the
    1.14 + * Free Software Foundation.
    1.15 + * 
    1.16 + * This program is distributed in the hope that it will be useful, but WITHOUT
    1.17 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.18 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    1.19 + * details.
    1.20 + *
    1.21 + * You should have received a copy of the GNU General Public License along with
    1.22 + * this program.  If not, see <http://www.gnu.org/licenses/>.
    1.23 + *
    1.24 + * As a special exception, AlliedModders LLC gives you permission to link the
    1.25 + * code of this program (as well as its derivative works) to "Half-Life 2," the
    1.26 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    1.27 + * by the Valve Corporation.  You must obey the GNU General Public License in
    1.28 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
    1.29 + * this exception to all derivative works.  AlliedModders LLC defines further
    1.30 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    1.31 + * or <http://www.sourcemod.net/license.php>.
    1.32 + *
    1.33 + * Version: $Id$
    1.34 + */
    1.35 + 
    1.36 +#if defined _basecomm_included
    1.37 + #endinput
    1.38 +#endif
    1.39 +#define _basecomm_included
    1.40 +
    1.41 +/**
    1.42 + * Returns whether or not a client is gagged
    1.43 + *
    1.44 + * @param client		Client index.
    1.45 + * @return				True if client is gagged, false otherwise.
    1.46 + */
    1.47 +native bool:BaseComm_IsClientGagged(client);
    1.48 +
    1.49 +/**
    1.50 + * Returns whether or not a client is muted
    1.51 + *
    1.52 + * @param client		Client index.
    1.53 + * @return				True if client is muted, false otherwise.
    1.54 + */
    1.55 +native bool:BaseComm_IsClientMuted(client);
    1.56 +
    1.57 +/**
    1.58 + * Sets a client's gag state
    1.59 + *
    1.60 + * @param client		Client index.
    1.61 + * @param gagState		True to gag client, false to ungag.
    1.62 + * @return				True if this caused a change in gag state, false otherwise.
    1.63 + */
    1.64 +native bool:BaseComm_SetClientGag(client, bool:gagState);
    1.65 +
    1.66 +/**
    1.67 + * Sets a client's mute state
    1.68 + *
    1.69 + * @param client		Client index.
    1.70 + * @param muteState		True to mute client, false to unmute.
    1.71 + * @return				True if this caused a change in mute state, false otherwise.
    1.72 + */
    1.73 +native bool:BaseComm_SetClientMute(client, bool:muteState);
    1.74 +
    1.75 +/* DO NOT EDIT BELOW THIS LINE */
    1.76 +
    1.77 +public SharedPlugin:__pl_basecomm = 
    1.78 +{
    1.79 +	name = "basecomm",
    1.80 +	file = "basecomm.smx",
    1.81 +#if defined REQUIRE_PLUGIN
    1.82 +	required = 1,
    1.83 +#else
    1.84 +	required = 0,
    1.85 +#endif
    1.86 +};
    1.87 +
    1.88 +#if !defined REQUIRE_PLUGIN
    1.89 +public __pl_basecomm_SetNTVOptional()
    1.90 +{
    1.91 +	MarkNativeAsOptional("BaseComm_IsClientGagged");
    1.92 +	MarkNativeAsOptional("BaseComm_IsClientMuted");
    1.93 +	MarkNativeAsOptional("BaseComm_SetClientGag");
    1.94 +	MarkNativeAsOptional("BaseComm_SetClientMute");
    1.95 +}
    1.96 +#endif