AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Explosive Cars v1.0.4 (https://forums.alliedmods.net/showthread.php?t=138644)

honorcode23 09-20-2010 15:33

[L4D2] Explosive Cars v1.0.4
 
29 Attachment(s)
[L4D2] Explosive Cars

New gamedata March 12th, 2011

Note: Delete the old .cfg file if you decide to update from 1.0.3 to 1.0.4+!
Re-download the gamedata file if you want to update from 1.0.2 to 1.0.3+ :)

NOTE: Version 1.0.4 will only work with the LATEST version of SDKHooks. If you do not wish to update, grab the version 1.0.3 (l4d2_explosive_cars_old)

Compatibility:
-l4d2_explosive_cars (1.0.4) is compatible with SDKHooks 1.3.0-REDUCKS
-l4d2_explosive_cars_old (1.0.3) is compatible with SDKHooks 1.3.0

Description:
When i first started playing left 4 dead, i always wondered why didn't cars explode as in GTA for example, so i decided to make this for myself. I think it would be cool to share it anyway :P.

This plugin will make all cars explode after they receive enough damage. The cars get damage from anything, even shoving them will damage them (Of course, the damage will be minor).

Video Demostration

Installation
-Copy l4d2_explosive_cars.smx in the sourcemod/plugins folder.
-Copy l4d2explosivecars.txt in the sourcemod/gamedata folder.

Dependencies:
-This plugin requires SDK Hooks Extension to work.

ConVars:

A config file will be generated at cfg/sourcemod -> Check for ConVars in there

Known Bugs:
-Client side crashes on c5m3_park for low performance computers (Solutions: Higher car health - Lower particle time - Disable the plugin on that map) - Unable to find permanent solution, stick with the other ways the plugin offer.

Thanks to:
-AtomicStryker for his help and interest on the plugin.
-blackalegator for the video.

SCRIPTING:
-This plugin provides one forward that will be fired every time a car explodes. You can code some plugins wiht it, like for example, call a message or punish someone.

To add the forward just move the explosivecars_dev.inc file into your scripting/include folder. Then include it adding this line in your plugin.

PHP Code:

#include <explosivecars_dev> 

and call it using this format

PHP Code:

public OnCarExploded(attackercar)
{
        
//Stuff here


Note that the attacker param will not always return a client index, so put some filters on it. The car is the car index that exploded.

Changelog:
Code:

1.0.4
-Modified to match latest SDKHooks modifications
-Added 2 new convars to control damage done to the car (l4d2_explosive_cars_fire_multiplier and l4d2_explosive_cars_explosion_multiplier).
-Fixed glitch were cars could get hooked twice.

1.0.3
-Changed the "l4d2_explosive_cars_panic_chance" to obey a % logic.
-Added original molotov fire as fire trace
-Added the "l4d2_explosive_cars_inferno_count" to control the amount of fire
-Fixed a few code glitches

1.0.2
-Added a convar to control if the engine fire of the damage can trigger an explosion.
-Added a forward that fires everytime a car explodes.
-Fixed a fire trace radius trigger.

1.0.1f
-Added two new convars to control how fast is the car launched.

1.0.1e
-Remove sound that was possibly producing crashes.
-Precached a sprite that comes with the explosion.

1.0.1d
-Added a cvar for the damage made by the explosion.
-Added a cvar to enable or disable damage from the explosion to other cars.
-Added a cvar for a chance of the panic event.
-Added a cvar to configure the 'Fire Trace' Damage interval.
-Added a cvar to disable the plugin in specific maps.
-Exploded cars will now have the wrecked model and will be black (More realistic).

1.0.1c
-Added a cvar to control the tank's damage.
-Fixed a bug where players would get pushed away by the exploded car.

1.0.1b
-Added a 'protection' for map starts.
-Fixed l4d2_explosive_cars_infected Cvar.

1.0.1a
-Fixed the cars not exploding for the second team on versus.

1.0.1
-Added the code improvements from AtomicStryker. Thanks alot!
-Added a Cvar to allow infected from doing damage to the car.
-Added a Cvar to remove (or not) the burning particle of the car.
-Added a fire sound.

1.0
-Initial Release


blitzzz 09-20-2010 17:15

Re: [L4D2] Explosive Cars
 
plugin failed to compile

McFlurry 09-20-2010 17:27

Re: [L4D2] Explosive Cars
 
It requires SDK Hooks. You really didn't take the time to read the post did you. :bacon:

blitzzz 09-20-2010 17:49

Re: [L4D2] Explosive Cars
 
Oh wells, i downloaded the sp file and compiled. Plugin is working nicely.

Cthulhu 09-20-2010 20:49

Re: [L4D2] Explosive Cars
 
If a tank hit a car, the car receive damage?

Suggestion: remove shoving damage or add a cvar ;)

honorcode23 09-20-2010 21:00

Re: [L4D2] Explosive Cars
 
Quote:

Originally Posted by Cthulhu (Post 1304690)
If a tank hit a car, the car receive damage?

Suggestion: remove shoving damage or add a cvar ;)

I calculated how long would it explode by shoving. Took 5 mins to do so, i dont think survivors will be 5 mins shoving lol. Yes, tanks will explode cars so they gotta be carefull. (Anyway, if the car explodes near survivors, they are completely wiped :P).

dirka_dirka 09-21-2010 00:08

Re: [L4D2] Explosive Cars
 
a cvar on infected setting off the explosion would be nice..

deimos38170 09-21-2010 01:25

Re: [L4D2] Explosive Cars
 
Man! u make so nice plugins!! i love it :mrgreen:

corsi 09-21-2010 03:14

Re: [L4D2] Explosive Cars
 
well its not working!!! i changed the car health to 100 and nothing happened!!! anyway its a good idea but its not working!!! i shot that car and shoved and surprise NO EXPLOSION!!!

blitzzz 09-21-2010 05:18

Re: [L4D2] Explosive Cars
 
Quote:

Originally Posted by corsi (Post 1304813)
well its not working!!! i changed the car health to 100 and nothing happened!!! anyway its a good idea but its not working!!! i shot that car and shoved and surprise NO EXPLOSION!!!

I think you need to shoot those cars that are movable (can be hit by tanks). Its working for me.


All times are GMT -4. The time now is 01:00.

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