Raised This Month: $119 Target: $400
 29% 

[ISSUE] ExecuteHam(Ham_TakeDamage, ...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Depresie
AlliedModders Donor
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
Hedgehog95
Senior Member
Join Date: Jun 2010
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] Halloween Mod 2.2.1 - This is a completely new gamemode for Halloween Holidays.

[CS] Custom Entities API - API to register custom entities. It's provides some new and more comfortable architecture for complex projects.


Last edited by Hedgehog95; 09-19-2017 at 08:30.
Hedgehog95 is online now
Depresie
AlliedModders Donor
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 16:36.


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