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

Solved SetHamParamFloat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wilian159
Member
Join Date: Dec 2013
Old 07-27-2022 , 12:34   SetHamParamFloat
Reply With Quote #1

I have a question about 'SetHamParamFloat'

PHP Code:
native SetHamParamFloat(whichFloat:value); 
in the 'which' parameter what I see the most is 4
there are 1, 2, 3 and 4, what is the difference between them?

I didn't find what each number is referring to, I know that the 4 is the damage, or is it something else?
__________________

Last edited by wilian159; 07-27-2022 at 13:07.
wilian159 is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 07-27-2022 , 13:03   Re: SetHamParamFloat
Reply With Quote #2

Code:
/**      * Description:     Usually called whenever an entity takes any kind of damage.      *                  Inflictor is the entity that caused the damage (such as a gun).      *                  Attacker is the entity that tirggered the damage (such as the gun's owner).      * Forward params:  function(this, idinflictor, idattacker, Float:damage, damagebits);      * Return type:     Integer.      * Execute params:  ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);      */     Ham_TakeDamage,

"which" param from SetHamParamFloat, represents the argument you want to alterate.

Ham_TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)

You want to change "damage" which is fourth parameter:
Code:
SetHamParamFloat(4, some_value)
__________________


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
wilian159
Member
Join Date: Dec 2013
Old 07-27-2022 , 13:07   Re: SetHamParamFloat
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Code:
/**      * Description:     Usually called whenever an entity takes any kind of damage.      *                  Inflictor is the entity that caused the damage (such as a gun).      *                  Attacker is the entity that tirggered the damage (such as the gun's owner).      * Forward params:  function(this, idinflictor, idattacker, Float:damage, damagebits);      * Return type:     Integer.      * Execute params:  ExecuteHam(Ham_TakeDamage, this, idinflictor, idattacker, Float:damage, damagebits);      */     Ham_TakeDamage,

"which" param from SetHamParamFloat, represents the argument you want to alterate.

Ham_TakeDamage(this, idinflictor, idattacker, Float:damage, damagebits)

You want to change "damage" which is fourth parameter:
Code:
SetHamParamFloat(4, some_value)
makes perfect sense, thanks
__________________
wilian159 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 02:22.


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