View Single Post
Author Message
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 03-29-2009 , 00:17   [DoDS] TNT (or Roadside bomb)
Reply With Quote #1

What it does
Players can plant packs of TNT on most surfaces, plants and props.
It can be regarded as either a land mine, a booby trap or an IED (improvised explosive device such as those found in Iraq). TNT packs can be made to explode via line of sight, by radio, by timer or by walking over them.
It obeys Friendly Fire.

Planting the pack
The player moves close to a surface and plants the TNT where his crosshairs point.
After five seconds, the pack self-primes. This is so that if FF is ON, the player does not explode the pack as he moves away.
The plugin can track up to 10 packs per player. (It can go up to 127, but a limit has been set for now) Number of packs are set by a cvar.

Detonating the pack
If any player touches/walks over/jumps on the TNT pack, it will explode.

If a grenade lands nearby, the pack will detonate.

If a bullet hits it, it will explode.

Alternatively, the TNT can be detonated remotely by the planter in three modes (determined by a cvar):
0: all the player's packs detonate at once
1: packs can be exploded individually by line of sight - the player points his crosshairs at the bomb and detonates the pack. This is the hardest method of detonation.
2: packs explode after a certain number of seconds - in a way similar to existing DoD TNT except the timer can be set by the server op

Defusing the pack
Any player can defuse another player's pack. They then get it added to their own inventory.

COMMANDS

sm_plant: plant the pack
sm_defuse: defuse the pack
sm_det: detonate the pack

CVARS
sm_tnt_amount 2
Amount of TNT per player at spawn

sm_tnt_damage 200
Amount of damage per pack

sm_tnt_admins 0
Whether the commands can be used by admins only

sm_tnt_enabled 1
Used to turn off for certain maps

sm_tnt_delay 5.0
Delay between spawn and being able to plant TNT - useful for spawn protection when FF is ON

sm_tnt_restrict 0

Restrict TNT by class 1=riflemen 2=assault 3=support 4=sniper 5=mg 6=rocket

sm_tnt_mode 1
TNT Mode 0=all packs detonate 1=Line of Sight 2=timer

sm_tnt_det_delay 10
When sm_tnt_mode is 2, this is the fuse length in seconds

sm_tnt_plant_delay 5
Delay between planting consecutive TNT packs - reduces spamming

Installation
Copy sm_dod_tnt.smx to your plugins folder.
Make sure you are running SourceMod 1.2+


Changelog
v1.4.100 - Release


Notes
I have a version for TF2, but keep asking myself if it is really necessary as the demoman pretty much does this! It might work in other mods but I haven't tested. If anyone wants it, let me know!
Attached Files
File Type: sp Get Plugin or Get Source (sm_dod_tnt.sp - 2820 views - 18.0 KB)
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org

Last edited by strontiumdog; 05-12-2009 at 19:46.
strontiumdog is offline