AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D1 & L4D2] Tank Car Smash [v1.0.2 | 16-November-2021] (https://forums.alliedmods.net/showthread.php?t=335105)

Marttt 11-08-2021 20:18

[L4D1 & L4D2] Tank Car Smash [v1.0.2 | 16-November-2021]
 
23 Attachment(s)
Description

This plugin changes the car model for a smashed one on tank hit.

Supported models
  • models/props_vehicles/cara_82hatchback.mdl => models/props_vehicles/cara_82hatchback_wrecked.mdl
  • models/props_vehicles/cara_95sedan.mdl => models/props_vehicles/cara_95sedan_wrecked.mdl

Cvars

A configuration file named "l4d_tank_car_smash.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

PHP Code:

// Delete attached entities (child) from the car.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_car_smash_delete_childs "1"

// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_car_smash_enable "1"

// Emit a random breaking glass sound on car smash.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_car_smash_glass_sound "1"

// Chance (%) to smash the car.
// 0 = OFF.
// -
// Default: "100"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_tank_car_smash_tank_chance "100"

// Allow smashing the car with tank claw.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_car_smash_tank_claw "1"

// Allow smashing the car with tank rock.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_tank_car_smash_tank_rock "1" 

Admin Commands
  • sm_print_cvars_l4d_tank_car_smash => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


To Do
  • Remove attached entities from other car models.

Thank you!

Related Plugins

Post Reply
  • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

Installation
  • Put the "l4d_tank_car_smash.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.

finishlast 11-09-2021 11:00

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.0 | 08-November-2021]
 
ahahaha, good one! Works as expected.

!FUN!

you can test both cars on

!map l4d_vs_hospital02_subway


Well done :D

If only there where car parts that would be fun. Then you could add a random chance to blew it apart like the boats.

fun fun fun

Marttt 11-09-2021 18:57

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.0 | 08-November-2021]
 
Quote:

Originally Posted by finishlast (Post 2762969)
If only there where car parts that would be fun. Then you could add a random chance to blew it apart like the boats.

I think there is a lot of car parts models but it would increase the precached models, which could lead to the "ED_Alloc: no free edicts" crash.

finishlast 11-10-2021 11:07

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
Would be really cool and unexpected for players.

Like when they hit car it has a random chance to explode into pieces.

I went through hammer, there are only 4 real car parts, mb that custom map has own models?

Anyway, faking a car needs 4 chairs, the fake motor, lots of metal scrap and glass pieces, then mb the small explosion of the gas station (not the big one) and let the stuff fly around. With an explosion there is no need for the scrap to look like the former car parts, well bc its an explosion... just put some parts in it like tires chairs muffler.

chairs are there from the helicopters etc.

It should be possible to fake a car with these here:

models/props_vehicles/carparts_muffler01a.mdl
models/props_vehicles/carparts_muffler02.mdl
models/props_vehicles/tire001c_car.mdl
models/props_vehicles/carparts_wheel01a.mdl

;metal scrap
models/props_unique/subwaycarexterior01_enddoor01_damaged01.mdl
models/props_unique/subwaycarexterior01_enddoor01_damaged02.mdl
models/props_unique/subwaycarexterior01_enddoor01_damaged03.mdl
models/props_unique/subwaycarexterior01_enddoor01_damaged04.mdl
models/props_unique/subwaycarexterior01_enddoor01_damaged05.mdl
models/props_unique/subwaycarexterior01_sidedoor01_damaged_01.mdl
models/props_unique/subwaycarexterior01_sidedoor01_damaged_02.mdl
models/props_unique/subwaycarexterior01_sidedoor01_damaged_03.mdl
models/props_unique/subwaycarexterior01_sidedoor01_damaged_04.mdl
models/props_vehicles/helicopter_crashed_chunk04.mdl
models/props_vehicles/helicopter_crashed_chunk07.mdl
models/props_doors/doorglassmain01_small_dm03_b.mdl
models/props_doors/doorglassmain01_small_dm03_c.mdl
models/props_doors/doorglassmain01_small_dm03_d.mdl
models/props_doors/doorglassmain01_small_dm03_e.mdl
models/props_doors/doorglassmain01_small_dm03_f.mdl
models/props_doors/doorglassmain01_small_dm03_g.mdl
models/props_doors/doorglassmain01_small_dm03_h.mdl
models/props_doors/doorglassmain01_small_dm03_i.mdl
models/props_doors/doorglassmain01_small_dm03_a.mdl
models/props_doors/doorglassmain01_small_dm03_b.mdl
models/props_doors/doorglassmain01_small_dm03_c.mdl
models/props_doors/doorglassmain01_small_dm03_d.mdl
models/props_doors/doorglassmain01_small_dm03_e.mdl
models/props_doors/doorglassmain01_small_dm03_f.mdl
models/props_doors/doorglassmain01_small_dm03_g.mdl
models/props_doors/doorglassmain01_small_dm03_h.mdl
models/props_doors/doorglassmain01_small_dm03_i.mdl
models/props_vents/ventbreakable01_dm01_part01.mdl
models/props_vents/ventbreakable01_dm01_part02.mdl
models/props_vents/ventbreakable01_dm01_part04.mdl
models/props_vents/ventbreakable01_dm01_part05.mdl
models/props_vents/ventbreakable01_dm01_part06.mdl
models/props_vents/ventbreakable01_dm01_part07.mdl
models/props_vents/ventbreakable01_dm01_part08.mdl
models/props_vents/ventbreakable01_dm01_part09.mdl
models/props_vents/ventbreakable01_dm01_part10.mdl

;bigger parts
;motor
models/props_vehicles/boat_smash_gib07.mdl

;chair
models/props_vehicles/helicopter_crashed_chunk08.mdl
models/props_vehicles/helicopter_news_crashed_chunk08.mdl

;glass
models/props_windows/window_urban_apt_break03.mdl
models/props_windows/window_urban_apt_break05.mdl
models/props_windows/window_urban_apt_break07.mdl
models/props_windows/window_urban_apt_break09.mdl
models/props_windows/window_urban_apt_break11.mdl
models/props_windows/window_urban_apt_break13.mdl
models/props_windows/window_urban_apt_break15.mdl
models/props_windows/window_urban_apt_break17.mdl
models/props_windows/window_urban_apt_break19.mdl
models/props_windows/window_urban_apt_break21.mdl
models/props_windows/window_farmhouse_small_break03.mdl
models/props_windows/window_farmhouse_small_break07.mdl
models/props_windows/window_farmhouse_small_break09.mdl
models/props_windows/window_farmhouse_small_break17.mdl
models/props_windows/window_farmhouse_small_break21.mdl

Just imagine punching a car and it crumbles to pieces ahahaha

Maku 11-10-2021 12:58

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
Is it compatible with honorcode23's [L4D2] Explosive Cars v1.0.4?

The plugin seems kinda interesting, but I don't know if it will work with the Explosive Cars.

Marttt 11-10-2021 12:59

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
Probably will, it only changes the entity model on tank hit. (also does extra stuff but may still be compatible)

Maku 11-10-2021 13:12

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
I'll test it out and see how it goes.

Maku 11-10-2021 15:46

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
I have tested the plugin and it is compatible with Explosive Cars. :)

King_OXO 11-13-2021 15:11

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.1 | 09-November-2021]
 
nice :twisted:

Marttt 11-16-2021 19:37

Re: [L4D1 & L4D2] Tank Car Smash [v1.0.2 | 16-November-2021]
 
Plugin updated (1.0.2)

Code:

1.0.2 (16-November-2021)
    - Added cvar to allow smashing with tank claw.
    - Added cvar to allow smashing with tank rock.



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

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