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

SM Damage


Post New Thread Reply   
 
Thread Tools Display Modes
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 11-05-2009 , 07:08   Re: SM Damage
Reply With Quote #171

Since i like this plugin so much i ported it over to sdkhooks. This has some major advantages..


All damage settings can now STACK. You can define a global damage multiplier, a player inflicted damage multiplier, a gun specific multiplier, and a gun specific additional damage, and it WILL WORK!!

Both on Players and Entities (L4D Zombies, Witch).
The new global damage multiplier also affects every single damage you or any entity take from any source, not just guns or players!


You can also use multipliers below 1.0 to DECREASE a guns damage and use gun specific damage amounts below 0 to make a gun heal instead of hurting.

Also, since its using 'native' commands, event damage calculations and -reports remain fine.



Should work with any mod sdkhooks supports - obviously you need SDKHooks by DJ Tsunami for it to work



Cvars:

sm_damage_enabled (default 1) the on/off switch

sm_damage_defaultanydamagemultiplier (default 1.0) the default damage multiplier from anything to anything!

sm_damage_defaultplayerweaponmultiplier (default 1.0) the default multiplier for damage a player inflicts onto something


Ingame or server.cfg settings:

sm_damage_playermulti (default equals the global multiplier) - "sm_damage_playermulti <player> <multiplier>" - sets player specific damage multipliers

sm_damage_weaponmulti (default 1.0) - "sm_damage_weaponmulti <weapon> <multiplier>" - sets gun specific damage multipliers

sm_damage_weaponamount (default 1.0) - "sm_damage_weaponamount <weapon> <amount>" - sets gun specific damage amounts

(Note illegal multiplier values (below zero) are changed to zero)


sm_damage_clear - clears the temp settings cache



EDIT:
Added a compiled version, for convenience

EDIT #2:
Hopefully fixed some errors

EDIT #3:
Removed it for now, for having no effect ingame.

Last edited by AtomicStryker; 11-13-2009 at 16:34.
AtomicStryker is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 11-05-2009 , 15:16   Re: SM Damage
Reply With Quote #172

I looked briefly at the code.
Looks fine.
I have added it to my first post.

Good Job, thanks for the version.
I welcome your work because I have no time at the moment.

EDIT:
Maybe a compiled version would be easier for the community?
__________________

Last edited by SWAT_88; 11-05-2009 at 16:09.
SWAT_88 is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 11-05-2009 , 19:20   Re: SM Damage
Reply With Quote #173

Doesn't seem to be working... I set the damage multiplier for weapon_pistol to 9999.0 to test, and it still does 8 damage

Not an instant kill like it should be, and how it used to be with the old plugin....

I get console spam with this:

Code:
L 11/06/2009 - 00:20:58: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:58: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:58: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:58: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:58: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:58: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:59: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:59: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:59: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:59: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:59: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:59: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:59: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:59: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:20:59: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:20:59: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:20:59: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:21:00: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:21:00: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:21:00: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
L 11/06/2009 - 00:21:00: [SM] Plugin encountered error 15: Array index is out of bounds
L 11/06/2009 - 00:21:00: [SM] Displaying call stack trace for plugin "sm_damage_sdkhooks.smx":
L 11/06/2009 - 00:21:00: [SM]   [0]  Line 74, C:\Users\Atomic\Desktop\SourcePawn\sm_damage_sdkhooks.sp::OnTakeDamage()
StrikerMan780 is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 11-09-2009 , 14:19   Re: SM Damage
Reply With Quote #174

Quote:
Originally Posted by StrikerMan780 View Post
Doesn't seem to be working... I set the damage multiplier for weapon_pistol to 9999.0 to test, and it still does 8 damage

Not an instant kill like it should be, and how it used to be with the old plugin....

I get console spam with this:
Updated
Thx to AtomicStryker.
__________________
SWAT_88 is offline
ballz
Member
Join Date: Dec 2008
Old 11-20-2009 , 20:52   Re: SM Damage
Reply With Quote #175

Is this able to lower damage for specific weapons not people? I trying to get a simple plugin for the people who play scout and pyro (FAN and Flamethrower). To lower the damage those dod to make a little more fun gameplay. Or maybe direct me to a plugin that does this if your does not.? Thanks in advance.
__________________
ballz is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 11-21-2009 , 01:34   Re: SM Damage
Reply With Quote #176

Quote:
Originally Posted by ballz View Post
Is this able to lower damage for specific weapons not people? I trying to get a simple plugin for the people who play scout and pyro (FAN and Flamethrower). To lower the damage those dod to make a little more fun gameplay. Or maybe direct me to a plugin that does this if your does not.? Thanks in advance.
If I find some time, I'm going to add a working multiplayer version for every mod, with damage settings below 1.
__________________
SWAT_88 is offline
ballz
Member
Join Date: Dec 2008
Old 11-21-2009 , 11:52   Re: SM Damage
Reply With Quote #177

Great! I will surely keep up with this thread then sir... Nice work.
__________________
ballz is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-08-2010 , 23:12   Re: SM Damage
Reply With Quote #178

Just going thru my error logs and I noticed that this plugin is spamming them quite a lot. Snippet:
Code:
L 01/08/2010 - 05:43:26: [SM] Native "GetClientWeapon" reported: Client index 0 is invalid
L 01/08/2010 - 05:43:26: [SM] Displaying call stack trace for plugin "sm_damageMultiMod.smx":
L 01/08/2010 - 05:43:26: [SM]   [0]  Line 146, /home/groups/alliedmodders/forums/files/3/4/5/3/2/44096.attach::PlayerHurt()
L 01/08/2010 - 05:48:33: [SM] Native "GetClientWeapon" reported: Client index 0 is invalid
L 01/08/2010 - 05:48:33: [SM] Displaying call stack trace for plugin "sm_damageMultiMod.smx":
L 01/08/2010 - 05:48:33: [SM]   [0]  Line 146, /home/groups/alliedmodders/forums/files/3/4/5/3/2/44096.attach::PlayerHurt()
The plugin otherwise works normally.
SM 1.2.5/MM 1.8 / Windows Server

Just thought I'd report it.
__________________
DarthNinja is offline
SWAT_88
SourceMod Donor
Join Date: Jan 2008
Location: Austria
Old 01-09-2010 , 06:40   Re: SM Damage
Reply With Quote #179

Quote:
Originally Posted by DarthNinja View Post
Just going thru my error logs and I noticed that this plugin is spamming them quite a lot. Snippet:
Code:
L 01/08/2010 - 05:43:26: [SM] Native "GetClientWeapon" reported: Client index 0 is invalid
L 01/08/2010 - 05:43:26: [SM] Displaying call stack trace for plugin "sm_damageMultiMod.smx":
L 01/08/2010 - 05:43:26: [SM]   [0]  Line 146, /home/groups/alliedmodders/forums/files/3/4/5/3/2/44096.attach::PlayerHurt()
L 01/08/2010 - 05:48:33: [SM] Native "GetClientWeapon" reported: Client index 0 is invalid
L 01/08/2010 - 05:48:33: [SM] Displaying call stack trace for plugin "sm_damageMultiMod.smx":
L 01/08/2010 - 05:48:33: [SM]   [0]  Line 146, /home/groups/alliedmodders/forums/files/3/4/5/3/2/44096.attach::PlayerHurt()
The plugin otherwise works normally.
SM 1.2.5/MM 1.8 / Windows Server

Just thought I'd report it.
Thx, this is maybe caused by falldamage, I will fix this bug in my next version.

But at the moment I have no time.
__________________
SWAT_88 is offline
Ugleh
Member
Join Date: Oct 2009
Old 01-09-2010 , 10:48   Re: SM Damage
Reply With Quote #180

Question
can i use sm_damage_weapon for multiple weapons?

and if I can, is it global, so when new players come in it will work?

Reason I ask is because im hosting a survival mode, and smokers just have to lash their tongue at you and your dead. Any fix so only players can have the damage Multiplier.
Ugleh 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 23:12.


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