plugins/include/sdktools_entoutput.inc
author Scott Ehlert <ds@alliedmods.net>
Sun Dec 07 01:26:03 2008 -0500 (2008-12-07)
changeset 2453 68e1cde18695
parent 2317 a7380514e63c
permissions -rw-r--r--
Triggering yet another build.
     1 /**
     2  * vim: set ts=4 :
     3  * =============================================================================
     4  * SourceMod (C)2004-2007 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 _sdktools_entoutput_included
    34   #endinput
    35 #endif
    36 #define _sdktools_entoutput_included
    37 
    38 /**
    39  * Called when an entity output is fired.
    40  *
    41  * @param output		Name of the output that fired.
    42  * @param caller		Entity index of the caller.
    43  * @param activator		Entity index of the activator.
    44  * @param delay			Delay in seconds? before the event gets fired.
    45  */
    46 functag public EntityOutput(const String:output[], caller, activator, Float:delay);
    47 
    48 /**
    49  * Add an entity output hook on a entity classname
    50  *
    51  * @param classname		The classname to hook.
    52  * @param output		The output name to hook.
    53  * @param callback		An EntityOutput function pointer.
    54  * @noreturn
    55  * @error				Entity Outputs disabled.
    56  */
    57 native HookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
    58 
    59 /**
    60  * Remove an entity output hook.
    61  * @param classname		The classname to hook.
    62  * @param output		The output name to hook.
    63  * @param callback		An EntityOutput function pointer.
    64  * @return				True on success, false if no valid hook was found.
    65  * @error				Entity Outputs disabled.
    66  */
    67 native bool:UnhookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
    68 
    69 /**
    70  * Add an entity output hook on a single entity instance	
    71  *
    72  * @param entity		The entity on which to add a hook.
    73  * @param output		The output name to hook.
    74  * @param callback		An EntityOutput function pointer.
    75  * @param once			Only fire this hook once and then remove itself.
    76  * @noreturn			
    77  * @error				Entity Outputs disabled	or Invalid Entity index.
    78  */
    79 native HookSingleEntityOutput(entity, const String:output[], EntityOutput:callback , bool:once=false);
    80 
    81 /**
    82  * Remove a single entity output hook.	
    83  *
    84  * @param entity		The entity on which to remove the hook.
    85  * @param output		The output name to hook.
    86  * @param callback		An EntityOutput function pointer.
    87  * @return				True on success, false if no valid hook was found.
    88  * @error				Entity Outputs disabled	or Invalid Entity index.	
    89  */
    90 native bool:UnhookSingleEntityOutput(entity, const String:output[], EntityOutput:callback);
    91