plugins/basecomm/forwards.sp
author Drifter <drifter01620@gmail.com>
Mon Sep 03 20:45:11 2012 +0100 (2012-09-03)
changeset 3645 80c9ae186971
permissions -rw-r--r--
Added forwards to basecomm plugin (bug 5466, r=asherkin).
drifter01620@3645
     1
/**
drifter01620@3645
     2
 * vim: set ts=4 :
drifter01620@3645
     3
 * =============================================================================
drifter01620@3645
     4
 * SourceMod Basecomm
drifter01620@3645
     5
 * Part of Basecomm plugin, menu and other functionality.
drifter01620@3645
     6
 *
drifter01620@3645
     7
 * SourceMod (C)2004-2011 AlliedModders LLC.  All rights reserved.
drifter01620@3645
     8
 * =============================================================================
drifter01620@3645
     9
 *
drifter01620@3645
    10
 * This program is free software; you can redistribute it and/or modify it under
drifter01620@3645
    11
 * the terms of the GNU General Public License, version 3.0, as published by the
drifter01620@3645
    12
 * Free Software Foundation.
drifter01620@3645
    13
 * 
drifter01620@3645
    14
 * This program is distributed in the hope that it will be useful, but WITHOUT
drifter01620@3645
    15
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
drifter01620@3645
    16
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
drifter01620@3645
    17
 * details.
drifter01620@3645
    18
 *
drifter01620@3645
    19
 * You should have received a copy of the GNU General Public License along with
drifter01620@3645
    20
 * this program.  If not, see <http://www.gnu.org/licenses/>.
drifter01620@3645
    21
 *
drifter01620@3645
    22
 * As a special exception, AlliedModders LLC gives you permission to link the
drifter01620@3645
    23
 * code of this program (as well as its derivative works) to "Half-Life 2," the
drifter01620@3645
    24
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
drifter01620@3645
    25
 * by the Valve Corporation.  You must obey the GNU General Public License in
drifter01620@3645
    26
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
drifter01620@3645
    27
 * this exception to all derivative works.  AlliedModders LLC defines further
drifter01620@3645
    28
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
drifter01620@3645
    29
 * or <http://www.sourcemod.net/license.php>.
drifter01620@3645
    30
 *
drifter01620@3645
    31
 * Version: $Id$
drifter01620@3645
    32
 */
drifter01620@3645
    33
 
drifter01620@3645
    34
 FireOnClientMute(client, bool:muteState)
drifter01620@3645
    35
 {
drifter01620@3645
    36
 	static Handle:hForward;
drifter01620@3645
    37
	
drifter01620@3645
    38
	if(hForward == INVALID_HANDLE)
drifter01620@3645
    39
	{
drifter01620@3645
    40
		hForward = CreateGlobalForward("BaseComm_OnClientMute", ET_Ignore, Param_Cell, Param_Cell);
drifter01620@3645
    41
	}
drifter01620@3645
    42
	
drifter01620@3645
    43
	Call_StartForward(hForward);
drifter01620@3645
    44
	Call_PushCell(client);
drifter01620@3645
    45
	Call_PushCell(muteState);
drifter01620@3645
    46
	Call_Finish();
drifter01620@3645
    47
 }
drifter01620@3645
    48
 
drifter01620@3645
    49
 FireOnClientGag(client, bool:gagState)
drifter01620@3645
    50
 {
drifter01620@3645
    51
 	static Handle:hForward;
drifter01620@3645
    52
	
drifter01620@3645
    53
	if(hForward == INVALID_HANDLE)
drifter01620@3645
    54
	{
drifter01620@3645
    55
		hForward = CreateGlobalForward("BaseComm_OnClientGag", ET_Ignore, Param_Cell, Param_Cell);
drifter01620@3645
    56
	}
drifter01620@3645
    57
	
drifter01620@3645
    58
	Call_StartForward(hForward);
drifter01620@3645
    59
	Call_PushCell(client);
drifter01620@3645
    60
	Call_PushCell(gagState);
drifter01620@3645
    61
	Call_Finish();
drifter01620@3645
    62
 }