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

Set Damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 07-04-2019 , 05:26   Set Damage
Reply With Quote #1

How can I set the damage we receive (other than SetHamParamFloat)
PawNod is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-04-2019 , 05:31   Re: Set Damage
Reply With Quote #2

SetHamParamFloat it's the only good way via Ham module, there's no reason to not use it.
thEsp is offline
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 07-04-2019 , 05:35   Re: Set Damage
Reply With Quote #3

@theEsp Can you send your public? I guess my public places wrong
PawNod is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-04-2019 , 07:21   Re: Set Damage
Reply With Quote #4

Then send yours and we'll tell you what's wrong. You're the one requesting for help.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 07-04-2019 , 07:51   Re: Set Damage
Reply With Quote #5

I guess victim attacker and infilictor is wrong
PHP Code:
public Hasarpn(victiminflictorattackerFloat:damagedamage_bits) {
if(
g_hasar[attacker][hs_t_el] ) {
                    
SetHamParamFloat(4get_pcvar_float(h_yumruk))
                    if(
get_pdata_int(victim75) == HIT_HEAD){
                        
SetHamParamFloat(4get_pcvar_float(h_yumruk)+15.0)
                    }
                } 
Because when I take damage I dead immediatly but when I fire I don't killer it immediatly

Last edited by PawNod; 07-04-2019 at 07:52.
PawNod is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-04-2019 , 08:12   Re: Set Damage
Reply With Quote #6

SetHamParamFloat is what you should use. Are you testing with bots? If yes, you also need to register the ham for bots https://forums.alliedmods.net/showthread.php?t=294861 or https://forums.alliedmods.net/showpo...5&postcount=20.

Otherwise post whole plugin code, we can't guess what these variables mean.
__________________








CrazY. is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-04-2019 , 08:24   Re: Set Damage
Reply With Quote #7

Quote:
Originally Posted by CrazY. View Post
Are you testing with bots? If yes, you also need to register the ham for bots https://forums.alliedmods.net/showthread.php?t=294861 or https://forums.alliedmods.net/showpo...5&postcount=20
IDK if this isn't present in < 1.9 or it didn't exist when you made that tutorial, but you can simply append "true" to Ham registers to support bots.

https://www.amxmodx.org/api/hamsandwich/RegisterHam
Code:
native HamHook:RegisterHam(Ham:function, const EntityClass[], const Callback[], Post=0, bool:specialbot = false);
thEsp is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-04-2019 , 09:10   Re: Set Damage
Reply With Quote #8

Older versions of amxmodx doesn't have the specialbot parameter.
__________________








CrazY. is offline
PawNod
Member
Join Date: Jun 2019
Location: Turkey
Old 07-04-2019 , 09:48   Re: Set Damage
Reply With Quote #9

@CrazY. Oh I understand I guess . Topic solved
PawNod is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-04-2019 , 11:10   Re: Set Damage
Reply With Quote #10

Keep in mind that increasing the damage doesn't result in that exact loss in HP to the victim. Damage is offsetted by armor that the victim may have.

E.g. Inflicting 10.5 extra in damage will not always result in additional -10.5 hp loss.
__________________
Bugsy 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 11:43.


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