pred@1958: /**
pred@1958: * vim: set ts=4 :
pred@1958: * =============================================================================
pred@1958: * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
pred@1958: * =============================================================================
pred@1958: *
pred@1958: * This file is part of the SourceMod/SourcePawn SDK.
pred@1958: *
pred@1958: * This program is free software; you can redistribute it and/or modify it under
pred@1958: * the terms of the GNU General Public License, version 3.0, as published by the
pred@1958: * Free Software Foundation.
pred@1958: *
pred@1958: * This program is distributed in the hope that it will be useful, but WITHOUT
pred@1958: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
pred@1958: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
pred@1958: * details.
pred@1958: *
pred@1958: * You should have received a copy of the GNU General Public License along with
pred@1958: * this program. If not, see .
pred@1958: *
pred@1958: * As a special exception, AlliedModders LLC gives you permission to link the
pred@1958: * code of this program (as well as its derivative works) to "Half-Life 2," the
pred@1958: * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
pred@1958: * by the Valve Corporation. You must obey the GNU General Public License in
pred@1958: * all respects for all other code used. Additionally, AlliedModders LLC grants
pred@1958: * this exception to all derivative works. AlliedModders LLC defines further
pred@1958: * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
pred@1958: * or .
pred@1958: *
ds@1987: * Version: $Id$
pred@1958: */
pred@1958:
pred@1958: #if defined _sdktools_entoutput_included
pred@1958: #endinput
pred@1958: #endif
pred@1958: #define _sdktools_entoutput_included
pred@1958:
pred@1958: /**
pred@1958: * Called when an entity output is fired.
pred@1958: *
pred@1958: * @param output Name of the output that fired.
pred@1958: * @param caller Entity index of the caller.
pred@1958: * @param activator Entity index of the activator.
pred@1958: * @param delay Delay in seconds? before the event gets fired.
pred@1958: */
dvander@2317: functag public EntityOutput(const String:output[], caller, activator, Float:delay);
pred@1958:
pred@1958: /**
pred@1958: * Add an entity output hook on a entity classname
pred@1958: *
pred@1958: * @param classname The classname to hook.
pred@1958: * @param output The output name to hook.
pred@1958: * @param callback An EntityOutput function pointer.
pred@1958: * @noreturn
pred@1958: * @error Entity Outputs disabled.
pred@1958: */
pred@1958: native HookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
pred@1958:
pred@1958: /**
pred@1958: * Remove an entity output hook.
pred@1958: * @param classname The classname to hook.
pred@1958: * @param output The output name to hook.
pred@1958: * @param callback An EntityOutput function pointer.
pred@1958: * @return True on success, false if no valid hook was found.
pred@1958: * @error Entity Outputs disabled.
pred@1958: */
pred@1960: native bool:UnhookEntityOutput(const String:classname[], const String:output[], EntityOutput:callback);
pred@1958:
pred@1958: /**
pred@1958: * Add an entity output hook on a single entity instance
pred@1958: *
pred@1958: * @param entity The entity on which to add a hook.
pred@1958: * @param output The output name to hook.
pred@1958: * @param callback An EntityOutput function pointer.
pred@1958: * @param once Only fire this hook once and then remove itself.
pred@1958: * @noreturn
pred@1958: * @error Entity Outputs disabled or Invalid Entity index.
pred@1958: */
pred@1958: native HookSingleEntityOutput(entity, const String:output[], EntityOutput:callback , bool:once=false);
pred@1958:
pred@1958: /**
pred@1958: * Remove a single entity output hook.
pred@1958: *
pred@1958: * @param entity The entity on which to remove the hook.
pred@1958: * @param output The output name to hook.
pred@1958: * @param callback An EntityOutput function pointer.
pred@1958: * @return True on success, false if no valid hook was found.
pred@1958: * @error Entity Outputs disabled or Invalid Entity index.
pred@1958: */
pred@1960: native bool:UnhookSingleEntityOutput(entity, const String:output[], EntityOutput:callback);
pred@1958: