Quote:
Originally Posted by Lycode
For various things. Like drawing a line to where the player is aiming using a TE_BEAMENTPOINT message.
|
All information regarding your goal is relevant, in particular cases like this where very specific details are the key to making it work.
Relating back to your post using flashbangs, you could do something like this to detect such events:
Code:
#include <amxmodx>
#include <hamsandwich>
#define FLASHBANG_PULLPIN 1
#define FLASHBANG_THROW 2
public plugin_init()
{
RegisterHam( Ham_CS_Weapon_SendWeaponAnim, "weapon_flashbang", "CFlashbang_SendWeaponAnim" );
}
public CFlashbang_SendWeaponAnim( iEnt, iAnim )
{
switch( iAnim )
{
case FLASHBANG_PULLPIN:
{
//Attack button pressed by weapon owner
}
case FLASHBANG_THROW:
{
//Attack button released by weapon owner
}
}
}
Of course you would need to also account for weapon holster aswell.
__________________