Raised This Month: $ Target: $400
 0% 

Solved Shield entitiy detection doesn't work while player is using it?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-25-2022 , 21:31   Re: Shield entitiy detection doesn't work while player is using it?
Reply With Quote #1

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 View Post
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(iPlayerOFFSET_HASSHIELD
Not sure if this is what you asked, but detects whether the user has the shield.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-25-2022 at 21:34.
EFFx is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode