plugins/include/sdktools_entoutput.inc
author David Anderson <dvander@alliedmods.net>
Sun Apr 13 06:06:27 2008 +0000 (2008-04-13)
changeset 1999 63aafc6ff212
parent 1987 0534b0a2ffda
child 2317 a7380514e63c
permissions -rw-r--r--
added amb1538 - adt_stack
pred@1958
     1
/**
pred@1958
     2
 * vim: set ts=4 :
pred@1958
     3
 * =============================================================================
pred@1958
     4
 * SourceMod (C)2004-2007 AlliedModders LLC.  All rights reserved.
pred@1958
     5
 * =============================================================================
pred@1958
     6
 *
pred@1958
     7
 * This file is part of the SourceMod/SourcePawn SDK.
pred@1958
     8
 *
pred@1958
     9
 * This program is free software; you can redistribute it and/or modify it under
pred@1958
    10
 * the terms of the GNU General Public License, version 3.0, as published by the
pred@1958
    11
 * Free Software Foundation.
pred@1958
    12
 * 
pred@1958
    13
 * This program is distributed in the hope that it will be useful, but WITHOUT
pred@1958
    14
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
pred@1958
    15
 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
pred@1958
    16
 * details.
pred@1958
    17
 *
pred@1958
    18
 * You should have received a copy of the GNU General Public License along with
pred@1958
    19
 * this program.  If not, see <http://www.gnu.org/licenses/>.
pred@1958
    20
 *
pred@1958
    21
 * As a special exception, AlliedModders LLC gives you permission to link the
pred@1958
    22
 * code of this program (as well as its derivative works) to "Half-Life 2," the
pred@1958
    23
 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
pred@1958
    24
 * by the Valve Corporation.  You must obey the GNU General Public License in
pred@1958
    25
 * all respects for all other code used.  Additionally, AlliedModders LLC grants
pred@1958
    26
 * this exception to all derivative works.  AlliedModders LLC defines further
pred@1958
    27
 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
pred@1958
    28
 * or <http://www.sourcemod.net/license.php>.
pred@1958
    29
 *
ds@1987
    30
 * Version: $Id$
pred@1958
    31
 */
pred@1958
    32
pred@1958
    33
#if defined _sdktools_entoutput_included
pred@1958
    34
  #endinput
pred@1958
    35
#endif
pred@1958
    36
#define _sdktools_entoutput_included
pred@1958
    37
pred@1958
    38
/**
pred@1958
    39
 * Called when an entity output is fired.
pred@1958
    40
 *
pred@1958
    41
 * @param output		Name of the output that fired.
pred@1958
    42
 * @param caller		Entity index of the caller.
pred@1958
    43
 * @param activator		Entity index of the activator.
pred@1958
    44
 * @param delay			Delay in seconds? before the event gets fired.
pred@1958
    45
 */
pred@1958
    46
functag EntityOutput public(const String:output[], caller, activator, Float:delay);
pred@1958
    47
pred@1958
    48
/**
pred@1958
    49
 * Add an entity output hook on a entity classname
pred@1958
    50
 *
pred@1958
    51
 * @param classname		The classname to hook.
pred@1958
    52
 * @param output		The output name to hook.
pred@1958
    53
 * @param callback		An EntityOutput function pointer.
pred@1958
    54
 * @noreturn
pred@1958
    55
 * @error				Entity Outputs disabled.
pred@1958
    56
 */
pred@1958
    57
native HookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
pred@1958
    58
pred@1958
    59
/**
pred@1958
    60
 * Remove an entity output hook.
pred@1958
    61
 * @param classname		The classname to hook.
pred@1958
    62
 * @param output		The output name to hook.
pred@1958
    63
 * @param callback		An EntityOutput function pointer.
pred@1958
    64
 * @return				True on success, false if no valid hook was found.
pred@1958
    65
 * @error				Entity Outputs disabled.
pred@1958
    66
 */
pred@1960
    67
native bool:UnhookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
pred@1958
    68
pred@1958
    69
/**
pred@1958
    70
 * Add an entity output hook on a single entity instance	
pred@1958
    71
 *
pred@1958
    72
 * @param entity		The entity on which to add a hook.
pred@1958
    73
 * @param output		The output name to hook.
pred@1958
    74
 * @param callback		An EntityOutput function pointer.
pred@1958
    75
 * @param once			Only fire this hook once and then remove itself.
pred@1958
    76
 * @noreturn			
pred@1958
    77
 * @error				Entity Outputs disabled	or Invalid Entity index.
pred@1958
    78
 */
pred@1958
    79
native HookSingleEntityOutput(entity, const String:output[], EntityOutput:callback , bool:once=false);
pred@1958
    80
pred@1958
    81
/**
pred@1958
    82
 * Remove a single entity output hook.	
pred@1958
    83
 *
pred@1958
    84
 * @param entity		The entity on which to remove the hook.
pred@1958
    85
 * @param output		The output name to hook.
pred@1958
    86
 * @param callback		An EntityOutput function pointer.
pred@1958
    87
 * @return				True on success, false if no valid hook was found.
pred@1958
    88
 * @error				Entity Outputs disabled	or Invalid Entity index.	
pred@1958
    89
 */
pred@1960
    90
native bool:UnhookSingleEntityOutput(entity, const String:output[], EntityOutput:callback);
pred@1958
    91