plugins/include/entity_prop_stocks.inc
changeset 1826 a9f05d8aedf2
parent 1820 8e1bbd65f7c2
child 1828 0df571678652
     1.1 --- a/plugins/include/entity_prop_stocks.inc	Mon Dec 24 20:41:33 2007 +0000
     1.2 +++ b/plugins/include/entity_prop_stocks.inc	Fri Dec 28 07:10:09 2007 +0000
     1.3 @@ -51,6 +51,32 @@
     1.4  	MOVETYPE_CUSTOM,			/** Allows the entity to describe its own physics */
     1.5  };
     1.6  
     1.7 +#define IN_ATTACK		(1 << 0)
     1.8 +#define IN_JUMP			(1 << 1)
     1.9 +#define IN_DUCK			(1 << 2)
    1.10 +#define IN_FORWARD		(1 << 3)
    1.11 +#define IN_BACK			(1 << 4)
    1.12 +#define IN_USE			(1 << 5)
    1.13 +#define IN_CANCEL		(1 << 6)
    1.14 +#define IN_LEFT			(1 << 7)
    1.15 +#define IN_RIGHT		(1 << 8)
    1.16 +#define IN_MOVELEFT		(1 << 9)
    1.17 +#define IN_MOVERIGHT	(1 << 10)
    1.18 +#define IN_ATTACK2		(1 << 11)
    1.19 +#define IN_RUN			(1 << 12)
    1.20 +#define IN_RELOAD		(1 << 13)
    1.21 +#define IN_ALT1			(1 << 14)
    1.22 +#define IN_ALT2			(1 << 15)
    1.23 +#define IN_SCORE		(1 << 16)   // Used by client.dll for when scoreboard is held down
    1.24 +#define IN_SPEED		(1 << 17)	// Player is holding the speed key
    1.25 +#define IN_WALK			(1 << 18)	// Player holding walk key
    1.26 +#define IN_ZOOM			(1 << 19)	// Zoom key for HUD zoom
    1.27 +#define IN_WEAPON1		(1 << 20)	// weapon defines these bits
    1.28 +#define IN_WEAPON2		(1 << 21)	// weapon defines these bits
    1.29 +#define IN_BULLRUSH		(1 << 22)
    1.30 +#define IN_GRENADE1		(1 << 23)	// grenade 1
    1.31 +#define IN_GRENADE2		(1 << 24)	// grenade 2
    1.32 +
    1.33  /**
    1.34   * Gets an entity's movetype.
    1.35   *
    1.36 @@ -131,4 +157,16 @@
    1.37  {
    1.38  	SetEntProp(client, Prop_Send, "m_iHealth", health, 1)
    1.39  	SetEntProp(client, Prop_Data, "m_iHealth", health, 1)
    1.40 +}
    1.41 +
    1.42 +/**
    1.43 + * Get's a users current pressed buttons
    1.44 + *
    1.45 + * @param client	Client index
    1.46 + * @return			Bitsum of buttons
    1.47 + */
    1.48 +stock GetClientButtons(client)
    1.49 +{
    1.50 +	new offset = FindDataMapOffs(client, "m_nButtons");
    1.51 +	return GetEntData(client, offset, 4);
    1.52  }
    1.53 \ No newline at end of file