Raised This Month: $ Target: $400
 0% 

Show damage armor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Heisen
New Member
Join Date: Dec 2021
Old 12-28-2021 , 09:11   Show damage armor
Reply With Quote #1

Hello, I have a question, can do show the damage to the armor?

PHP Code:
public event_showdamage(id) {
    new 
attacker get_user_attacker(id)
    if(
is_user_connected(id) && is_user_connected(attacker)) {
        new 
damage read_data(2)
        
set_hudmessage(127255127, -1.00.5500.01.10.00.0); 
        
show_hudmessage(attacker"%i"damage)
    } 


I want to do a display like in a fortnite, blue is armor white is health

Last edited by Heisen; 12-28-2021 at 09:12.
Heisen is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-28-2021 , 10:21   Re: Show damage armor
Reply With Quote #2

Quote:
Originally Posted by Heisen View Post
Hello, I have a question, can do show the damage to the armor?

PHP Code:
public event_showdamage(id) {
    new 
attacker get_user_attacker(id)
    if(
is_user_connected(id) && is_user_connected(attacker)) {
        new 
damage read_data(2)
        
set_hudmessage(127255127, -1.00.5500.01.10.00.0); 
        
show_hudmessage(attacker"%i"damage)
    } 


I want to do a display like in a fortnite, blue is armor white is health
read_data(2)
->
read_data(1)
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 12-29-2021 at 02:38.
Supremache is offline
Heisen
New Member
Join Date: Dec 2021
Old 12-28-2021 , 12:31   Re: Show damage armor
Reply With Quote #3

Thank you
Heisen is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 12-28-2021 , 13:46   Re: Show damage armor
Reply With Quote #4

Quote:
Originally Posted by Supremache View Post
read_data(2)
->
get_user_armor
That is absolutely wrong.

read_data(2) is for damage taken.
read_data(1) is for damage saved by armor.

https://wiki.alliedmods.net/Half-lif..._events#Damage
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Old 12-28-2021, 15:34
Supremache
This message has been deleted by Supremache. Reason: Nvm
bigdaddy424
Senior Member
Join Date: Oct 2021
Location: Jupiter
Old 12-28-2021 , 19:30   Re: Show damage armor
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
No problem he just gonna use it in hud not on an important thing
You're giving bad advice.
bigdaddy424 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 12-29-2021 , 02:38   Re: Show damage armor
Reply With Quote #7

Quote:
Originally Posted by bigdaddy424 View Post
You're giving bad advice.
The post was edited
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-29-2021 , 08:37   Re: Show damage armor
Reply With Quote #8

If you want to modifie the damage you need to hook the player takedamage pre forward and change the damage from within the forward.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

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 11:41.


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