PDA

View Full Version : [TF2] damage modifier


L. Duke
10-03-2008, 15:22
Damage Modifer for TF2
multiplies all damage by a convar (reduce or increase damage done)


Requirements:
Requires the Dukehacks extension (http://forums.alliedmods.net/showthread.php?t=69658) version 0.0.1.3 or greater.

Convars:

sm_dmg_mult 0.5

Sets the multiplication factor to apply to damage. Set to 0.0 for server-wide god mode. Set to 2.0 to double all damage, set to 0.5 to halve all damage, etc.


Notes:
This plugin was created as a quick example of how to use the dukehacks extension. If anyone wants to expand on it (add multipler for each class, individual multiplers based on XP, turn server-wide godmode on at round end so losing team is not slaughtered, etc.) please feel free to improve/modify and release your version.

Download:
Requires the Dukehacks extension (http://forums.alliedmods.net/showthread.php?t=69658) version 0.0.1.3 or greater.

Starman2098
10-05-2008, 07:23
It seems that any plugin that requires the dukehacks extention will not compile on the website, is this because the site doesnt support it? Am i going to have to compile this with the compiler built in with sourcemod? This is what happens when i try, im pretty new to all this. Any help would be greatly appreciated.

C:\Users\Sean\Desktop\sourcemod2\scripting>compile.exe c:\users\sean\desktop\dht
raceattack.sp
//SourceMod Batch Compiler
// by the SourceMod Dev Team


//// dhtraceattack.sp
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\functions.inc(355) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\logging.inc(137) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\dbi.inc(584) : error 093:
expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\sorting.inc(101) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\sorting.inc(166) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(111) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(131) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(152) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(165) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(173) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\textparse.inc(194) : error
093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\console.inc(314) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\console.inc(338) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\console.inc(442) : error 0
93: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\usermessages.inc(127) : er
ror 093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\usermessages.inc(134) : er
ror 093: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\menus.inc(152) : error 093
: expected tag name identifier
// C:\Users\Sean\Desktop\sourcemod2\scripting\in clude\menus.inc(516) : error 093
: expected tag name identifier
//
// 18 Errors.
//
// Compilation Time: 0.16 sec
// ----------------------------------------

Press enter to exit ...

Lebson506th
10-05-2008, 08:43
Because Dukehacks is a 3rd party extension, its include is not built in to the web compiler.

So you'll either have to wait for LDuke to post a compiled version or do it yourself.


To do it yourself, download the latest package of SourceMod and extract the scripting folder.

Then download Dukehacks.

Put the dukehacks.inc in the Includes folder inside the Scripting folder.

put .sp from the first post in the scripting folder.

Then just drag the .sp onto compile.exe and it will do it for you.

The .smx will be in the compiled folder after it finishes.

L. Duke
10-05-2008, 10:23
I added the smx file to the first post. (Sorry I forgot the first time.)

teddyruxpin
10-10-2008, 10:41
LDuke,

This plugin kicks ass. I found a very nice little hidden feature if you use this plugin a different way that leads to hilarity on the servers. For the first time ever lets say I had a health of 9,000,000,000 during a match.

I will explain more on IRC ;).

-Teddy

ratty
10-15-2008, 22:33
If anyone else compiles this with a too old version of SM 1.1 (I had 1.1.0-r2271 build.), with dukehacks 0.0.1.7, you'll get the error:

dhtraceattack.sp(25) : error 017: undefined symbol "HK_TraceAttack"

I didn't get the compile error with dukehacks 0.0.1.5 though.

I was going to delete this post, then figured I should leave it as a warning to anyone else that had the same problem, just upgrade SM.

ratty
10-15-2008, 23:42
LDuke,

This plugin kicks ass. I found a very nice little hidden feature if you use this plugin a different way that leads to hilarity on the servers. For the first time ever lets say I had a health of 9,000,000,000 during a match.

I will explain more on IRC ;).

-Teddy

I think I can guess, negative damage??? :) That sounds like a fun thing to set up during setup time or something, friendlyfire on, and negative damage, then run out of the gates fully pumped!

ratty
10-18-2008, 07:41
BTW I got this working with Dukehacks 0.0.1.5, this is a real help on my achievement box.

Antithasys
10-18-2008, 14:39
If anyone else compiles this with a too old version of SM 1.1 (I had 1.1.0-r2271 build.), with dukehacks 0.0.1.7, you'll get the error:

dhtraceattack.sp(25) : error 017: undefined symbol "HK_TraceAttack"

I didn't get the compile error with dukehacks 0.0.1.5 though.

I was going to delete this post, then figured I should leave it as a warning to anyone else that had the same problem, just upgrade SM.

Yes he changed the name of the callback from 0.0.1.5 to 0.0.1.7. The new name is CHK_TraceAttack and it's now depreicated. The better and newer callback is CHK_OnTakeDamage.

hl2mukkel
12-23-2008, 09:48
Does that work with Sourcemod 1.2?
because the Dukehacks extension (http://forums.alliedmods.net/showthread.php?t=69658) is currently only compatible with sourcemod 1.1 or 1.0.4

huck529
05-21-2009, 23:53
May 21 update is crashing my windows server when i run this and try to connect

Skyrider
10-05-2010, 16:06
Doubtful this plugin works.. no longer does for me.