Raised This Month: $32 Target: $400
 8% 

[L4D1 & L4D2] Transparent Cars (with color)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Plugin ID:
7407
Plugin Version:
1.0
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Replaces some car properties
    Old 12-05-2020 , 15:25   [L4D1 & L4D2] Transparent Cars (with color)
    Reply With Quote #1

    Description:
    Replace color and make transparency (all adjustable) of all cars.

    Notice: Not all car models are designed in a way allowing to change its color !!!

    I didn't test this plugin. It was a part of a large plugin for my Halloween server. Tell me if it is work.
    Plugin is published to show specific hook, asked in this topic.
    Settings (ConVars):
    see: cfg/sourcemod/l4d_transparent_cars.cfg:

    l4d_transparent_cars_enabled - def.: 1 - Enable plugin (1 - On / 0 - Off)
    l4d_transparent_cars_red - def.: 255 - Color level of RED
    l4d_transparent_cars_green - def.: 0 - Color level of GREEN
    l4d_transparent_cars_blue - def.: 0 - Color level of BLUE
    l4d_transparent_cars_alpha - def.: 75 - Level of Alpha (transparency), 0 - invisible, 255 - fully visible
    l4d_transparent_cars_random_color - def.: 0 - 0 - use color pre-defined by convars. 1 - generate random colors
    l4d_transparent_cars_random_alpha - def.: 0 - 0 - use alpha pre-defined by convar. 1 - generate random transparency
    Installation
    Put smx in to addons/sourcemod/plugins
    Donate
    Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
    - Patreon (Paypal)
    - BitCoin
    - Ю.Money
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_transparent_cars.sp - 461 views - 4.7 KB)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 04-15-2021 at 08:56.
    Dragokas is offline
    finishlast
    Senior Member
    Join Date: Nov 2018
    Location: In Reno with the vitamin
    Old 12-06-2020 , 04:43   Re: [L4D] Transparent Cars (with color)
    Reply With Quote #2

    I thought about using props_vehicles too but there are more models than only cars. Some render ugly with colors like some trucks, so I changed it in mine to directly ask for specific cars and trucks.

    When I tried FindEntityByClassname(ent, "*")) instead of FindEntityByClassname(ent, "propy_dynamic")) etc. in my script, it didn't work anymore.

    Is the asterisk working as wildcard? It does when used like this "FindEntityByClassname(ent, "prop*"))"
    but not alone.

    I put up your script too but no car changed (but my server is very modded so don't take this as an example).

    The hook is the right approach though like I stated in the scripting forum.

    Even though it only worked on first round, I replaced player_first_spawn with player_spawn now and made a bool after use that seems to do the trick now.

    Thanks again!
    __________________

    Last edited by finishlast; 12-07-2020 at 02:42.
    finishlast is offline
    replay_84
    Senior Member
    Join Date: Jun 2021
    Old 11-18-2023 , 14:11   Re: [L4D1 & L4D2] Transparent Cars (with color)
    Reply With Quote #3

    L 11/18/2023 - 20:10:52: [SM] Exception reported: Invalid game event handle 0 (error 4)
    L 11/18/2023 - 20:10:52: [SM] Blaming: l4d_transparent_cars.smx
    replay_84 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 15:08.


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