View Single Post
Author Message
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-15-2012 , 01:11   [L4D2] Pour Gas (1.15) [11-Dec-2022]
Reply With Quote #1



About:
  • Players can press/hold RELOAD or ZOOM keys to pour gascans onto the ground.
  • The oil left on the ground can be ignited by bullets, explosions and fires.
  • The oil puddles can be set to stay forever or a limited time with the l4d2_pourgas_delete cvar.
  • Number of pours can be limited, forcing the gascan to be dropped after pouring.
  • The dropped gascan will explode when damaged. See the l4d2_pourgas_limit_* cvars.
  • You can set how long the fires burn for with the l4d2_pourgas_burn cvar.
  • The fire particles disappear after 15 seconds but extra fire particles are created and stay for the amount of time you set.


Thanks:
  • Don't Fear The Reaper - Lots of help with the idea, suggestions and testing.
  • disawar1 - Helped testing, translation idea and Russian translation.
  • Herbie - Asked for infinite fire/puddles and lots of help testing 1.7.
  • worminater - Helped test 1.7.


Cvars:

Saved to l4d2_pourgas.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d2_pourgas_allow "1"

// 0=Forever? How long do the fires burn once ignited. The oil will fade out after ignition regardless of how long this is.
l4d2_pourgas_burn "15"

// Chain reaction time. When a puddle is hurt by fire, create it's own fire after this many seconds.
l4d2_pourgas_chain "0.5"

// How much a player is hurt in the fire. Happens multiple times per second.
l4d2_pourgas_damage "0.1"

// 0=Infinite, stays forever. Remove puddles after this many seconds.
l4d2_pourgas_delete "360"

// Display hint when picking up gascans? 0=Off, 1=Chat text, 2=Hint box.
l4d2_pourgas_hint "2"

// How many times to display hints, count is reset each map/chapter.
l4d2_pourgas_hints "2"

// 0=No, 1=Yes. Should players hold down the RELOAD|ZOOM key to pour?
l4d2_pourgas_hold "0"

// 0=Infinite. Drop the gascan after this number of pours.
l4d2_pourgas_limit "4"

// 0=Explosion Off. The dropped gascan explosion distance to hurt players.
l4d2_pourgas_limit_dist "200"

// 0=Explosion Off. When using the l4d2_pourgas_limit cvar, the dropped gascan will explode causing this much damage at the center.
l4d2_pourgas_limit_hurt "50"

// 0=Off, The range to stumble players from dropped gascan explosions.
l4d2_pourgas_limit_stum "1"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d2_pourgas_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = off).
l4d2_pourgas_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d2_pourgas_modes_tog "0"

// Prevent pouring for this many seconds after completing a pour.
l4d2_pourgas_timeout "0.4"

// Pour Gas plugin version.
l4d2_pourgas_version 


Changes:
Code:
1.15 (11-Dec-2022)
    - Changes to fix compile warnings on SourceMod 1.11.

1.14 (28-Sep-2021)
    - Added a warning when the translation files are missing.
    - Changed method of creating an explosive to prevent it being visible (still sometimes shows, but probably less).

1.13 (01-Jul-2021)
    - Added a warning message to suggest installing the "Scavenge Score Fix - Gascan Pouring" plugin if missing.

1.12a (24-Feb-2021)
    - Added Simplified Chinese and Traditional Chinese translations. Thanks to "HarryPotter" for providing.

1.12 (09-Oct-2020)
    - Changed "OnClientPostAdminCheck" to "OnClientPutInServer" - to fix any issues if Steam service is down.

1.11 (30-Sep-2020)
    - Fixed compile errors on SM 1.11.

1.10 (10-May-2020)
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.
    - Various optimizations and fixes.

1.9 (01-Apr-2020)
    - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.

1.8.5 (23-Oct-2019)
    - Small clean up and optimization.

1.8.4 (03-Jul-2019)
    - Fixed minor memory leak when creating the puddles.

1.8.3 (28-Jun-2019)
    - Changed PrecacheParticle method.

1.8.2 (03-Jun-2019)
    - Removed gamedata signature/SDKCall dependency for stagger.
    - Now uses native VScript API for stagger function thanks to "Timocop"'s function and "Lux" reporting.

1.8.1 (14-Aug-2018)
    - Fixed invalid entity error. - Thanks to "Ja-Forces" for reporting.
    - Changed Windows "OnStaggered" gamedata to be compatible with Left4Downtown detouring that function. - Thanks to "Spirit_12".

1.8 (05-May-2018)
    - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    - Removed instructor hints due to Valve: FCVAR_SERVER_CAN_EXECUTE prevented server running command: gameinstructor_enable.

1.7.4 (20-Jul-2017)
    - Fixed bug when "l4d2_pourgas_hold" is set to "0". - Thanks to "yeahya" for reporting.

1.7.3 (01-Jul-2017)
    - Fixed random crashes when pouring the gascan. - Thanks to "PepeZukas" for reporting and testing.

1.7.2 (21-Aug-2013)
    - Fixed invalid entity error. - Thanks to "Electr000999" for reporting.

1.7.1 (14-Aug-2013)
    - Fixed index out of bounds error. - Thanks to "Electr000999" for reporting.

1.7 (10-Aug-2013)
    - Oil puddles are no longer time limited and stay until shot.
    - Added cvar "l4d2_pourgas_delete" to delete oil puddles after a specified time. 0 = stay forever.
    - Added cvar "l4d2_pourgas_burn" to set how long the fires burn for.
    - Fire particles added when "l4d2_pourgas_burn" is set higher than 15 seconds.

1.6 (06-Jul-2013)
    - Gamedata signatures file updated. No other changes.

1.6 (11-Jul-2012)
    - Fixed players spinning around when pouring.
    - Fixed the first explosion making the server freeze for a second.
    - Fixed not being able to pour if you were holding a gascan before a map change.

1.5 (30-Jun-2012)
    - Added some checks to prevent errors being logged - Thanks to "disawar1" for reporting.

1.4 (20-Jun-2012)
    - Added some checks to prevent errors being logged - Thanks to "gajo0650" for reporting.
    - Fixed a bug when players were pouring their last can and being hurt.

1.3 (16-Jun-2012)
    - Added some checks to prevent errors being logged - Thanks to disawar1 for reporting.

1.2 (16-Jun-2012)
    - Blocked scavenge gascans from being used to pour gas. Causes too many bugs.
    - Stops pouring when players are hurt and "l4d2_pourgas_hold" is 0. Prevents endlessly pouring.

1.1 (16-Jun-2012)
    - Fixed the plugin not fully resetting, which prevented players from pouring.

1.0 (15-Jun-2012)
    - Initial release.


Installation:
  • Scavenge Score Fix - Gascan Pouring - Get this plugin to prevent bugs when pouring the gascan on certain maps/gamemodes.
  • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
  • Download "translations.zip" and extract the "translations" folder to your servers \addons\sourcemod\ folder.

Updating from 1.6 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Current Translations: English (en), German (de), Russian (ru), Simplified Chinese (zho), Traditional Chinese (chi).
Attached Files
File Type: zip translations.zip (2.3 KB, 780 views)
File Type: sp Get Plugin or Get Source (l4d2_pourgas.sp - 500 views - 46.7 KB)
__________________

Last edited by Silvers; 12-11-2022 at 04:35.
Silvers is offline