AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D2] How to change damage headshot SI (https://forums.alliedmods.net/showthread.php?t=312327)

hoanganh81097 11-26-2018 20:12

[L4D2] How to change damage headshot SI
 
As a topic, how to change damage headshot SI ? :D Thank you very much

timtam95 11-27-2018 06:50

Re: [L4D2] How to change damage headshot SI
 
Quote:

Originally Posted by hoanganh81097 (Post 2625809)
As a topic, how to change damage headshot SI ? :D Thank you very much

hook infected_hurt, check for a headshot then modify damage from there. i can help you if you want.

hoanganh81097 11-27-2018 10:28

Re: [L4D2] How to change damage headshot SI
 
Quote:

Originally Posted by timtam95 (Post 2625841)
hook infected_hurt, check for a headshot then modify damage from there. i can help you if you want.

can you help me write plugin ? please :D

timtam95 11-27-2018 21:13

Re: [L4D2] How to change damage headshot SI
 
2 Attachment(s)
Quote:

Originally Posted by hoanganh81097 (Post 2625873)
can you help me write plugin ? please :D

Credits and thanks for code snippets go to alcybery and eyal282
https://forums.alliedmods.net/showthread.php?t=308401

and AtomicStryker
https://forums.alliedmods.net/showthread.php?p=1066911

Change cvar 'cv_hsdmg' to a float, e.g. 2 for 200% multiplier, .5 for 50% multiplier, etc.

This hasn't been thoroughly tested so let me know if you run into issues.

hoanganh81097 11-27-2018 22:05

Re: [L4D2] How to change damage headshot SI
 
Quote:

Originally Posted by timtam95 (Post 2625921)
Credits and thanks for code snippets go to alcybery and eyal282
https://forums.alliedmods.net/showthread.php?t=308401

and AtomicStryker
https://forums.alliedmods.net/showthread.php?p=1066911

Change cvar 'cv_hsdmg' to a float, e.g. 2 for 200% multiplier, .5 for 50% multiplier, etc.

This hasn't been thoroughly tested so let me know if you run into issues.

Thanks for your help. This work for all weapons except All Snipers Weapon. Ex : awm, sniper_military, ... Still headshot one hit SI. Damage for all snipers <100. SI health 350.

shady_vn 11-28-2018 09:56

Re: [L4D2] How to change damage headshot SI
 
2 Attachment(s)
Hi cass! cua Cass ne

Sout12 01-16-2021 05:09

Re: [L4D2] How to change damage headshot SI
 
I know this is old, but anyone know the cause for this error?

L 01/10/2021 - 03:56:52: [SM] Exception reported: Entity -1 (-1) is invalid
L 01/10/2021 - 03:56:52: [SM] Blaming: headshot_damage.smx

Marttt 01-17-2021 21:13

Re: [L4D2] How to change damage headshot SI
 
You didn't paste the full log, there are some missing lines that shows which line thrown the error. (usually above the [SM] Blaming... line)

Sout12 01-21-2021 09:14

Re: [L4D2] How to change damage headshot SI
 
Quote:

Originally Posted by Marttt (Post 2733028)
You didn't paste the full log, there are some missing lines that shows which line thrown the error. (usually above the [SM] Blaming... line)

I am sorry, I now got the full log

L 01/20/2021 - 02:19:32: [SM] Blaming: headshot_damage.smx
L 01/20/2021 - 02:19:32: [SM] Call stack trace:
L 01/20/2021 - 02:19:32: [SM] [0] GetEntPropString
L 01/20/2021 - 02:19:32: [SM] [1] Line 758, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\inclu de\entity.inc::GetEntityClassname
L 01/20/2021 - 02:19:32: [SM] [2] Line 63, C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\heads hot_damage.sp::OnTakeDamage_SI
L 01/20/2021 - 02:19:35: [SM] Exception reported: Entity -1 (-1) is invalid

Marttt 01-21-2021 10:32

Re: [L4D2] How to change damage headshot SI
 
1 Attachment(s)
Try this one attached.

Btw the code seems to have some bugs if you use it on versus.
For coop-campaign should be fine.


All times are GMT -4. The time now is 10:21.

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