plugins/include/sdktools_entinput.inc
branchrefac-jit
changeset 2168 c24a6fa957db
child 2289 44045ead61cd
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/plugins/include/sdktools_entinput.inc	Sun Jul 06 04:49:55 2008 +0000
     1.3 @@ -0,0 +1,116 @@
     1.4 +/**
     1.5 + * vim: set ts=4 :
     1.6 + * =============================================================================
     1.7 + * SourceMod (C)2004-2008 AlliedModders LLC.  All rights reserved.
     1.8 + * =============================================================================
     1.9 + *
    1.10 + * This file is part of the SourceMod/SourcePawn SDK.
    1.11 + *
    1.12 + * This program is free software; you can redistribute it and/or modify it under
    1.13 + * the terms of the GNU General Public License, version 3.0, as published by the
    1.14 + * Free Software Foundation.
    1.15 + * 
    1.16 + * This program is distributed in the hope that it will be useful, but WITHOUT
    1.17 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    1.18 + * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
    1.19 + * details.
    1.20 + *
    1.21 + * You should have received a copy of the GNU General Public License along with
    1.22 + * this program.  If not, see <http://www.gnu.org/licenses/>.
    1.23 + *
    1.24 + * As a special exception, AlliedModders LLC gives you permission to link the
    1.25 + * code of this program (as well as its derivative works) to "Half-Life 2," the
    1.26 + * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
    1.27 + * by the Valve Corporation.  You must obey the GNU General Public License in
    1.28 + * all respects for all other code used.  Additionally, AlliedModders LLC grants
    1.29 + * this exception to all derivative works.  AlliedModders LLC defines further
    1.30 + * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
    1.31 + * or <http://www.sourcemod.net/license.php>.
    1.32 + *
    1.33 + * Version: $Id$
    1.34 + */
    1.35 +
    1.36 +#if defined _sdktools_entinput_included
    1.37 +  #endinput
    1.38 +#endif
    1.39 +#define _sdktools_entinput_included
    1.40 +
    1.41 +/**
    1.42 + * Invokes a named input method on an entity.  
    1.43 + *
    1.44 + * After completion (successful or not), the current global variant is re-initalized.
    1.45 + *
    1.46 + * @param dest		Destination entity index.
    1.47 + * @param input		Input action.
    1.48 + * @param activator	Entity index which initiated the sequence of actions (-1 for a NULL entity).
    1.49 + * @param caller	Entity index from which this event is sent (-1 for a NULL entity).
    1.50 + * @param outputid	Unknown.
    1.51 + * @return		True if successful otherwise false.
    1.52 + * @error		Invalid entity index or no mod support.
    1.53 + */
    1.54 +native bool:AcceptEntityInput(dest, const String:input[], activator=-1, caller=-1, outputid=0);
    1.55 +
    1.56 +/**
    1.57 + * Sets a bool value in the global variant object.
    1.58 + *
    1.59 + * @param val		Input value.
    1.60 + * @noreturn
    1.61 + */
    1.62 +native SetVariantBool(bool:val);
    1.63 +
    1.64 +/**
    1.65 + * Sets a string in the global variant object.
    1.66 + *
    1.67 + * @param str		Input string.
    1.68 + * @noreturn
    1.69 + */
    1.70 +native SetVariantString(const String:str[]);
    1.71 +
    1.72 +/**
    1.73 + * Sets an integer value in the global variant object.
    1.74 + *
    1.75 + * @param val		Input value.
    1.76 + * @noreturn
    1.77 + */
    1.78 +native SetVariantInt(val);
    1.79 +
    1.80 +/**
    1.81 + * Sets a floating point value in the global variant object.
    1.82 + *
    1.83 + * @param val		Input value.
    1.84 + * @noreturn
    1.85 + */
    1.86 +native SetVariantFloat(Float:val);
    1.87 +
    1.88 +/**
    1.89 + * Sets a 3D vector in the global variant object.
    1.90 + *
    1.91 + * @param vec		Input vector.
    1.92 + * @noreturn
    1.93 + */
    1.94 +native SetVariantVector3D(const Float:vec[3]);
    1.95 +
    1.96 +/**
    1.97 + * Sets a 3D position vector in the global variant object.
    1.98 + *
    1.99 + * @param vec		Input position vector.
   1.100 + * @noreturn
   1.101 + */
   1.102 +native SetVariantPosVector3D(const Float:vec[3]);
   1.103 +
   1.104 +/**
   1.105 + * Sets a color in the global variant object.
   1.106 + *
   1.107 + * @param color		Input color.
   1.108 + * @noreturn
   1.109 + */
   1.110 +native SetVariantColor(const color[4]);
   1.111 +
   1.112 +/**
   1.113 + * Sets an entity in the global variant object.
   1.114 + *
   1.115 + * @param		Entity index.
   1.116 + * @noreturn
   1.117 + * @error		Invalid entity index.
   1.118 + */
   1.119 +native SetVariantEntity(entity);