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

[L4D2] Spitter Extra Projectiles [v1.0.2 | 28-July-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7538
Plugin Version:
1.0.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
3 
Plugin Description:
Allow spitters to spit more than a single projectile at once
Old 03-05-2021 , 12:47   [L4D2] Spitter Extra Projectiles [v1.0.2 | 28-July-2021]
Reply With Quote #1

L4D2 ONLY

Description

Allow spitters to spit more than a single projectile at once.

Features
  • Allow configuring the minimum spitter projectiles that a spitter should spit.
  • Allow configuring the maximum spitter projectiles and its chance that a spitter could spit.
  • Allow configuring the min/max new angles for the new spitter projectiles.
  • Allow configuring to drop a spit pool and its chance on spitter death.
  • Allow configuring which type of clients (human/bot) should be affected.

Cvars

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

PHP Code:
// Chance to create extra spit projectile with a value between "l4d2_spitter_extra_proj_min_count" and "l4d2_spitter_extra_proj_max_count" cvar value.
// 0 = OFF.
// -
// Default: "25"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d2_spitter_extra_proj_chance "25"

// Which type of client (human/bot) should be able to create additional projectiles.
// 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for Humans and Bots.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_spitter_extra_proj_client_type "3"

// Chance to create a projectile inside the spitter when it dies.
// 0 = OFF.
// -
// Default: "25"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d2_spitter_extra_proj_death_chance "25"

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

// Players with these flags can create extra projectiles.
// Empty = no restriction.
// Known values at "\addons\sourcemod\configs\admin_levels.cfg".
// Example: "az", will enable extra projectiles to players with "a" (reservation) or "z" (root) flag.
// -
// Default: ""
l4d2_spitter_extra_proj_flags ""

// Maximum angles that should be added to the extra spit projectile.
// -
// Default: "60.0"
l4d2_spitter_extra_proj_max_ang "60.0"

// Maximum extra spit projectiles that could be created when a Spitter spits.
// -
// Default: "2"
// Minimum: "0.000000"
l4d2_spitter_extra_proj_max_count "2"

// Minimum angles that should be added to the extra spit projectile.
// -
// Default: "-60.0"
l4d2_spitter_extra_proj_min_ang "-60.0"

// Minimum extra spit projectiles that should be created when a Spitter spits.
// Note: It will always create this amount with a 100% chance.
// -
// Default: "1"
// Minimum: "0.000000"
l4d2_spitter_extra_proj_min_count "1" 
Related Game Cvars
  • z_spit_velocity => Spit velocity. (default: 900)

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

Change Log

Spoiler


Notes
  • I use OnEntityCreated to detect spitter_projectile instead ability_use event, cause ability_use occurs before the projectile being created, which also returns an incorrect position for new projectiles.

Thank you!

Related Plugins

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

Requirements

Installation
  • Put the "l4d2_spitter_extra_proj.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_spitter_extra_proj.sp - 609 views - 17.6 KB)
__________________

Last edited by Marttt; 01-15-2023 at 12:19.
Marttt is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 03-05-2021 , 13:19   Re: [L4D2] Spitter Extra Projectiles [v1.0.0 | 05-March-2021]
Reply With Quote #2

Is this designed for human players only or can AI also take advantage of this?
__________________
Mr. Man is offline
VladimirTk
Senior Member
Join Date: Apr 2021
Location: Perú - Latino América
Old 07-26-2021 , 17:15   Re: [L4D2] Spitter Extra Projectiles [v1.0.1 | 05-March-2021]
Reply With Quote #3

It is possible to add a cvar to indicate that users are allowed to launch more than 1 projectile ?, for example, how to restrict the complement to only vips

Something quite ambitious for those who want to rise in rank thanks to more damage caused
VladimirTk is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-28-2021 , 17:28   Re: [L4D2] Spitter Extra Projectiles [v1.0.2 | 28-July-2021]
Reply With Quote #4

@VladimirTk, added.

Plugin updated. (1.0.2)

Code:
1.0.2 (28-July-2021)
- Added cvar to allow extra projectiles based on player flag. (thanks "VladimirTk" for requesting)
__________________
Marttt is offline
KadabraZz
Senior Member
Join Date: May 2020
Old 09-27-2022 , 06:07   Re: [L4D2] Spitter Extra Projectiles [v1.0.2 | 28-July-2021]
Reply With Quote #5

Simply amazing
KadabraZz 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 03:22.


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