I had the same problem with detecting shield hits with my Realistic Bullet Physics plugin. The first realization was that there's no entity detection alone but another body part of the player, we can call it
HIT_SHIELD, defined as 8 inside the amxconst.inc file.
This may help you, I guess.
Quote:
Originally Posted by StanGilbertlandria
I'm trying to detect if a player is holding up a shield, either in the main hand or offhand, for a stamina system. When they drop the shield, the stamina should start regenerating. Any suggestions?
I've tried using armour stands and villagers, but neither really work. With armour stands, I can't use the offhand. With villagers, it won't detect when I've stopped holding it up (also it means I can't interact with other blocks while the shield is in the offhand
|
PHP Code:
#define OFFSET_HASSHIELD 2043
get_pdata_bool(iPlayer, OFFSET_HASSHIELD)
Not sure if this is what you asked, but detects whether the user has the shield.
__________________