AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get percent of hit (https://forums.alliedmods.net/showthread.php?t=159495)

EclipseCP 06-18-2011 02:23

get percent of hit
 
hello.

I get the percentage of damage you take (so the hit)

The percentage would be over 100%, but can not find a formula as
get hit damage

Greetings :D

DjOptimuS 06-18-2011 02:43

Re: get percent of hit
 
I don't understand anything, try to explain again.

EclipseCP 06-18-2011 04:37

Re: get percent of hit
 
Quote:

Originally Posted by DjOptimuS (Post 1490540)
I don't understand anything, try to explain again.

sorry

What i do is that by attacking a player, get a hud that shows the percentage of hit taken

For example, someone would remove 46 of life, I know as i pulled percentage

this percentage may exceed 100%

DjOptimuS 06-18-2011 04:39

Re: get percent of hit
 
of course it can exceed 100%, when you hit someone in the head with AWP you will get something over 440%. What do you need ? Be more specific.

EclipseCP 06-18-2011 04:45

Re: get percent of hit
 
Quote:

Originally Posted by DjOptimuS (Post 1490571)
of course it can exceed 100%, when you hit someone in the head with AWP you will get something over 440%. What do you need ? Be more specific.

Actually, I'm doing this for the Zombie Plague.

When the zombies hit humans (knife), I need to know the formula for the percentage of damage taken, with float (%2.1f) and how to get

What happens, is like getting hit damage?

I hope I have expressed it, Greetings

lucas_7_94 06-18-2011 05:41

Re: get percent of hit
 
( dmg * 100 ) / totalhealth.


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

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