Raised This Month: $12 Target: $400
 3% 

[ISSUE] ExecuteHam(Ham_TakeDamage, ...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-19-2017 , 07:22   [ISSUE] ExecuteHam(Ham_TakeDamage, ...)
Reply With Quote #1

Using ExecuteHam(Ham_TakeDamage) the value of the damage received is lower than the value specified

For example using the following script the user receives only about 33 damage when it should be 50
( The victim is not wearing any armor )

Any idea why this happens ?

PHP Code:
public plugin_init()
{
    
register_plugin("Test""1.0""Kore")

    
register_clcmd("say test""clcmdtest")
}

public 
clcmdtest(id)
{
    
ExecuteHam(Ham_TakeDamageid0id50.00)

Seems like an older problem, as seen here
https://forums.alliedmods.net/showthread.php?t=165055
__________________
Depresie is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 09-19-2017 , 07:52   Re: [ISSUE] ExecuteHam(Ham_TakeDamage, ...)
Reply With Quote #2

I think that is before armor is taken into consideration aka it's not pure damage
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
Hedgehog Fog
Senior Member
Join Date: Jun 2010
Location: Ukraine
Old 09-19-2017 , 08:27   Re: [ISSUE] ExecuteHam(Ham_TakeDamage, ...)
Reply With Quote #3

Yep, you should remove armor before damage to take pure damage.
https://forums.alliedmods.net/showthread.php?t=289362
__________________

❄️ CS Snow Wars - Mod based on snowballs fights
🧟 CS Zombie Panic - A port of HL Zombie Panic!
🎃 CS Halloween Mod - Completely new gamemode for Halloween Holidays
📦 AMXXPack - CLI and build system for amxx projects
🔧 Custom Entities API - API to register custom entities

Last edited by Hedgehog Fog; 09-19-2017 at 08:30.
Hedgehog Fog is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 09-19-2017 , 12:07   Re: [ISSUE] ExecuteHam(Ham_TakeDamage, ...)
Reply With Quote #4

Fun fact, the victim has no armor

Quote:
( The victim is not wearing any armor )
__________________
Depresie is offline
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 08:39.


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