RSSy MYGO.pl Opublikowano Luty 11, 2021 o 17:41 RSSy Udostępnij Opublikowano Luty 11, 2021 o 17:41 Description This plugin shows a laser beam at the client's head that from green to red based on its HP. It's similar to my [L4D1 & L4D2] Tank HP Sprite plugin. FeaturesAutomatically sets the laser beam color (from green to red) in a gradient way. Allow setting the Z axis based on the client position. Allow setting the visibility by team. Allow setting the survivor visibility based on sight. Allow setting the laser beam model/alpha/fade/size. Allow setting a different laser beam width for Survivor and Infected. Allow setting which SI should have a laser beam (except Witch). Allow setting a laser beam that fills the bar. Allow setting an outline to the laser beam. Show laser beam for incapacitated survivors. Preview Cvars A configuration file named "l4d_hp_laser.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder. PHP Code: // Alpha of the laser beam HP. // 0 = Invisible, 255 = Fully Visible // - // Default: "240" // Minimum: "0.000000" // Maximum: "255.000000" l4d_hp_laser_alpha "240" // Enable/Disable the plugin. // 0 = Disable, 1 = Enable. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_hp_laser_enable "1" // Minimum distance that a client must be from another client to see the laser beam HP. // 0 = Always visible. // - // Default: "0" // Minimum: "0.000000" l4d_hp_laser_fade_distance "0" // Display a laser beam HP to fill the bar. // Note: Disable this if you intend to show a lot of laser beams HP. The game limits the number of beams rendered at the same time when limit exceeds it may not draw then all. // 0 = OFF, 1 = ON. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_hp_laser_fill "1" // Alpha of the laser beam HP that fills the bar. // 0 = Invisible, 255 = Fully Visible // - // Default: "75" // Minimum: "0.000000" // Maximum: "255.000000" l4d_hp_laser_fill_alpha "75" // Height of the laser beam HP. // - // Default: "1.0" // Minimum: "0.000000" l4d_hp_laser_height "1.0" // Width of the infected laser beam HP. // - // Default: "30.0" // Minimum: "0.000000" l4d_hp_laser_infected_width "30.0" // Model of the laser beam HP. // - // Default: "materials/vgui/white_additive.vmt" l4d_hp_laser_model "materials/vgui/white_additive.vmt" // Show an outline (add 4 lasers) around the laser beam HP. // Note: Disable this if you intend to show a lot of laser beams HP. The game limits the number of beams rendered at the same time when limit exceeds it may not draw then all. // 0 = OFF, 1 = ON. // - // Default: "0" // Minimum: "0.000000" // Maximum: "1.000000" l4d_hp_laser_outline "0" // Outline height of the laser beam. // - // Default: "0.1" // Minimum: "0.000000" l4d_hp_laser_outline_height "0.1" // Which Specials should have an laser beam HP. // 1=SMOKER, 2 = BOOMER, 4 = HUNTER, 8 = SPITTER, 16 = JOCKEY, 32 = CHARGER, 64 = TANK. // Add numbers greater than 0 for multiple options. // Example: "127", enables laser beam HP for all SI. // - // Default: "64" // Minimum: "0.000000" // Maximum: "127.000000" l4d_hp_laser_si "64" // Show a laser beam HP to the survivor only if the infected is on sight. // 0 = OFF, 1 = ON. // - // Default: "1" // Minimum: "0.000000" // Maximum: "1.000000" l4d_hp_laser_sight "1" // Width of the survivor laser beam HP. // - // Default: "15.0" // Minimum: "0.000000" l4d_hp_laser_survivor_width "15.0" // Which teams should have a laser beam HP sprite. // 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 4 = SPECTATOR, 8 = HOLDOUT. // Add numbers greater than 0 for multiple options. // Example: "3", enables for SURVIVOR and INFECTED. // - // Default: "3" // Minimum: "0.000000" // Maximum: "15.000000" l4d_hp_laser_team "3" // Additional Z distance based on client position. // - // Default: "85" // Minimum: "0.000000" l4d_hp_laser_z_axis "85" Admin Commands sm_print_cvars_l4d_hp_laser => Print the plugin related cvars and their respective values to the console. (z flag required) Change Log Spoiler 1.0.0 (11-February-2021) - Initial release. Notes The laser beam may have a blinking effect. Probably there is nothing that can be done. I use a TraceRay/TraceHull to determine the sprite visibility on sight. This may not work in all cases (e.g. transparent windows). Every laser beam is drawn using TE_SetupBeamPoints. Due to game engine limitations (nothing I can do), the amount of laser beams that can be drawn at same time is limited, so in case you have many clients some beams may not appear. To reduce this issue you can set some cvars (l4d_hp_laser_fill / l4d_hp_laser_outline) to "0". To Do Change color when survivor is black and white. Add laser beam for Witch. Enable visibility through transparent glasses. Thank you! https://forums.alliedmods.net/showthread.php?t=330447 lugui - for helping me and his [Any] Simple HealthBars plugin. GsiX - for helping me with some code snippets. Related Plugins [L4D1 & L4D2] Tank HP Sprite by Marttt [Any] Simple HealthBars by lugui Post Reply Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome. Installation Put the "l4d_hp_laser.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder. Attached Files Get Plugin or Get Source (l4d_hp_laser.sp - 31.8 KB) Wyświetl pełny artykuł Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi