hp problem
hi
I have no idea how to make for one player with variable damage reduced by 40%. Can u tell me how? I want do this work when player switch weapon to knife (for css) PHP Code:
|
Re: Reduced Damage
If I understand correctly, you are saying you want the 40% reduction on knife only? Your code was close to what is needed. I assume it was copied from another plugin, given the admin abuser variable. Here you go:
PHP Code:
|
Re: Reduced Damage
hi ..
Yes, you know exactly what I mean compile error = i added : PHP Code:
Can't use this? PHP Code:
i removed bool and fix this line But it didn't work again : PHP Code:
but when t attack to ct: ct die without hp reduction 40% |
Re: Reduced Damage
hi again
when i change this code and add inflictor to this : PHP Code:
PHP Code:
Someone can help? this plugin very important for me |
Re: Reduced Damage
Recompile my updated post. The compile error you mention was a single word that needed changing. It should work just fine.
Side note: I apparently made a plugin that does similar to this and a bit more in the past: https://forums.alliedmods.net/showthread.php?t=317685 Figure out what the 40% reduction is and set the following 4 variables accordingly: HTML Code:
togknifedmg_reg_left [left click knife] |
Re: Reduced Damage
Brother, I think you don't understand me
I don't want to do less damage to the enemy when I get the knife I want it when the knife is in my hand. The enemy will do me less damage by 40% i searched of the forums before created this topic.. but I didn't find anything |
Re: Reduced Damage
Well you could hook OnTakeDamage in OnWeaponSwitch and if it's not a knife you unhook OnTakeDamage
Maybe is not 100% safe but try it. PHP Code:
|
Re: Reduced Damage
really thanks brother
its working |
Re: Reduced Damage
Quote:
|
Re: hp problem
Of course is not the best way to do it, as I said
Quote:
If you want to help, guide the user to a better way to do it instead of just blaming the code, which is not helpful. |
All times are GMT -4. The time now is 05:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.