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

[L4D] Boatstyle cars (v1.0.6, 2022-04-22)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
finishlast
Senior Member
Join Date: Nov 2018
Location: In Reno with the vitamin
Plugin ID:
7871
Plugin Version:
1.0.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 11-30-2021 , 12:10   [L4D] Boatstyle cars (v1.0.6, 2022-04-22)
    Reply With Quote #1

    Description

    This plugin changes the behavior of tank punchable cars.
    Tank punch will have a default chance of 5% to completely smash the car.
    Literally the car will get smashed like boats on Sacrafice, car pieces shouldn't hurt players at least not on intention.

    Features
    Crumbles cars like a cookie

    Cvars

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

    PHP Code:
    // This file was auto-generated by SourceMod (v1.10.0.6435)
    // ConVars for plugin "l4d_boatstyle_cars.smx"


    // Percent chance a tank punch can detroy a car. 1-100
    // -
    // Default: "10"
    l4d_boatstyle_cars_DestroyChance "5"

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

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

    // Emit a random breaking glass sound on car hit (only once).
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d_boatstyle_cars_glass_sound "1" 
    Public Commands
    none

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

    Change Log:
    1.0.6 (02-August-2022)
    extra check for models/props_vehicles/generator (in hospital map after elevator)
    1.0.5 (22-April-2022)
    set rendercolor to 0 0 0 for the purple parts in l4d2 as workaround
    1.0.4 (09-January-2022)
    extra check for models/props_vehicles/train // custom maps as physics override
    1.0.3 (10-December-2021)
    extra check for models/props_vehicles/airport_baggage_cart2.mdl
    1.0.2 (1-December-2021)
    auto cleanup of entity mess
    1.0.1 (20-November-2021)
    cvar chance added
    vertical movement added
    1.0.0 (16-November-2021)
    - Initial release.


    Notes
    Reports that L4D2 has purple parts on car crumble. So I guess it is not compatible...
    I changed the rendercolor to black as a workaround, so at least they don't look too bad in l4d2 now...

    To Do
    I hope Silvers does not find out that I used & StrContains(modelname, "boat", false) == -1, he might get angry and beats me with a stick.
    I really hope the plugin will slip through his sight, I am in fear what he will say about the repeating program parts.
    Maybe make plugin for dumpsters, forklifter too!?
    Maybe find extra models in l4d2 to show instead of l4d1 purple models but atm I can't be arsed rly.

    Thank you!
    Marttt - for suggestions on the original post and the whole programming contruction I stole from your tank car smash plugin. https://forums.alliedmods.net/showthread.php?t=335105
    Silvers - for everything in the original post and that you dont beat me with a stick.

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

    p.s. I see someone already downloaded the source and I see Silvers online. I really live in fear now.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_boatstyle_cars.sp - 160 views - 47.9 KB)
    __________________

    Last edited by finishlast; 10-07-2022 at 05:59.
    finishlast is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 11-30-2021 , 13:45   Re: [L4D] Boatstyle cars (v1.0.1, 2021-11-30)
    Reply With Quote #2

    hahah!

    You didn't indent the "PrecacheModel" lines

    You can always search with "/" for paths. Are there several boat models to check for?

    The repeated parts would be easy to reduce by creating a global int array for all the parts, then looping over them. Makes it easier to maintain/modify.

    You can add me on Steam or Discord if you'd like to go through any plugins. PM if you like.
    __________________
    Silvers is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 11-30-2021 , 15:17   Re: [L4D] Boatstyle cars (v1.0.1, 2021-11-30)
    Reply With Quote #3

    Nice plugin,

    As a suggestion for future improvements, you can add a timer to delete the entities.
    You can easily make it by using a SetVariantString.

    Spoiler
    __________________

    Last edited by Marttt; 11-30-2021 at 15:17.
    Marttt is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 12-01-2021 , 12:50   Re: [L4D] Boatstyle cars (v1.0.2, 2021-12-01)
    Reply With Quote #4

    Oh thx Silvers, I only need more freetime, job is keeping me busy but I will contact you.

    Thank you Marttt, self cleaning entities! Very clever, I put it into the script. Works like a charm!
    __________________
    finishlast is offline
    sxtszx
    Junior Member
    Join Date: Sep 2020
    Old 01-24-2022 , 15:02   Re: [L4D] Boatstyle cars (v1.0.4, 2022-01-09)
    Reply With Quote #5

    Hi,

    I've tested this plugin on my linux server for l4d2. After tank smashes the car, the flying pieces have missing texture (purple texture). I have a feeling this may not be a plugin issue but I'm not sure how to fix it (for me and my clients).
    sxtszx is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 01-28-2022 , 10:17   Re: [L4D] Boatstyle cars (v1.0.4, 2022-01-09)
    Reply With Quote #6

    Is this visible for all players and all car parts? I thought the models should be the same as in l4d after valve ported the l4d1 maps.

    Anyone else see purple stuff in l4d2 or only you?
    __________________
    finishlast is offline
    sxtszx
    Junior Member
    Join Date: Sep 2020
    Old 02-04-2022 , 03:25   Re: [L4D] Boatstyle cars (v1.0.4, 2022-01-09)
    Reply With Quote #7

    Quote:
    Originally Posted by finishlast View Post
    Is this visible for all players and all car parts? I thought the models should be the same as in l4d after valve ported the l4d1 maps.

    Anyone else see purple stuff in l4d2 or only you?
    I have not tested it with public games, but another friend of mine also saw black and purple pieces. I recall at least most of the pieces, if not all, are purple.

    Last edited by sxtszx; 02-04-2022 at 03:26.
    sxtszx is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 04-22-2022 , 12:22   Re: [L4D] Boatstyle cars (v1.0.4, 2022-01-09)
    Reply With Quote #8

    I can confirm that the parts are purple in l4d2.
    Only the tires have their textures.

    I have assumed that the texture materials for the l4d1 models should be in l4d2 too since they ported the original maps.

    Looking at the authoring tools they are purple and black there too.

    Not happening in l4d1 though.

    As a hackish workaround I changed the rendecolor to black for the purple parts in l4d2, doesn't look too bad since they vanish after some seconds anyways.

    Updated the plugin in the first post, if you wanna try it in l4d2.
    __________________

    Last edited by finishlast; 04-22-2022 at 13:47.
    finishlast is offline
    Reply


    Thread Tools
    Display Modes

    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 09:15.


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