plugins/include/sdktools_entinput.inc
author David Anderson <dvander@alliedmods.net>
Fri Dec 14 05:54:36 2007 +0000 (2007-12-14)
changeset 1791 38e83ea09a24
parent 1498 e7eb59f70ff6
child 1947 e73a1e51833b
permissions -rw-r--r--
fixed amb1282 - elev1.wav is cstrike only
     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_entinput_included
    34   #endinput
    35 #endif
    36 #define _sdktools_entinput_included
    37 
    38 /**
    39  * Invokes a named input method on an entity.  
    40  *
    41  * After completion (successful or not), the current global variant is re-initalized.
    42  *
    43  * @param dest		Destination entity index.
    44  * @param input		Input action.
    45  * @param activator	Entity index which initiated the sequence of actions (-1 for a NULL entity).
    46  * @param caller	Entity index from which this event is sent (-1 for a NULL entity).
    47  * @param outputid	Unknown.
    48  * @return		True if successful otherwise false.
    49  * @error		Invalid entity index or no mod support.
    50  */
    51 native bool:AcceptEntityInput(dest, const String:input[], activator=-1, caller=-1, outputid=0);
    52 
    53 /**
    54  * Sets a bool value in the global variant object.
    55  *
    56  * @param val		Input value.
    57  * @noreturn
    58  */
    59 native SetVariantBool(bool:val);
    60 
    61 /**
    62  * Sets a string in the global variant object.
    63  *
    64  * @param str		Input string.
    65  * @noreturn
    66  */
    67 native SetVariantString(const String:str[]);
    68 
    69 /**
    70  * Sets an integer value in the global variant object.
    71  *
    72  * @param val		Input value.
    73  * @noreturn
    74  */
    75 native SetVariantInt(val);
    76 
    77 /**
    78  * Sets a floating point value in the global variant object.
    79  *
    80  * @param val		Input value.
    81  * @noreturn
    82  */
    83 native SetVariantFloat(Float:val);
    84 
    85 /**
    86  * Sets a 3D vector in the global variant object.
    87  *
    88  * @param vec		Input vector.
    89  * @noreturn
    90  */
    91 native SetVariantVector3D(const Float:vec[3]);
    92 
    93 /**
    94  * Sets a 3D position vector in the global variant object.
    95  *
    96  * @param vec		Input position vector.
    97  * @noreturn
    98  */
    99 native SetVariantPosVector3D(const Float:vec[3]);
   100 
   101 /**
   102  * Sets a color in the global variant object.
   103  *
   104  * @param color		Input color.
   105  * @noreturn
   106  */
   107 native SetVariantColor(const color[4]);
   108 
   109 /**
   110  * Sets an entity in the global variant object.
   111  *
   112  * @param		Entity index.
   113  * @noreturn
   114  * @error		Invalid entity index.
   115  */
   116 native SetVariantEntity(entity);