View Single Post
Author Message
xZk
Senior Member
Join Date: Nov 2017
Location: cl
Old 01-11-2020 , 13:23   [L4D/2]Incapped Weapons
Reply With Quote #1

Quote:

Plugin Obsolete!, please use this version:[L4D & L4D2] Incapped Weapons Patch by Silvers


Intro
As the survivors are by default almost useless if they are incapped, I wanted to publish this plugin to dispense that, and in addition to giving a somewhat simpler alternative, to manage to use all their weapons and give a possible solution for those who use Windows since bug spawn of weapons spawns on the map when the weapons are configured for your script in incapped mode ("WeaponType" "pistol").
Details
Survivors can switch all their weapons, but cannot use all(slot 4|5). Also you can filter weapons to use in "incapped_weapons_classnamelist.cfg"


Cvars:
PHP Code:
// 0:Disable, 1:Enable plugin
// Default: "1"
incapped_weapons_enable "1"

// 0:Disable, 1:Allow weapons of slot 1, -1: Allow only switch weapons of slot1
// Default: "1"
incapped_weapons_slot1 "1"

// 0:Disable, 1:Allow weapons of slot 2, -1: Allow only switch weapons of slot2
// -
// Default: "1"
incapped_weapons_slot2 "1"

// 0:Disable, 1:Allow weapons of slot 3, -1: Allow only switch weapons of slot3
// Default: "1"
incapped_weapons_slot3 "1"

// 0:Disable, 1:Allow weapons of slot 4, -1: Allow only switch weapons of slot4
// Default: "1"
incapped_weapons_slot4 "1"

// 0:Disable, 1:Allow weapons of slot 5, -1: Allow only switch weapons of slot5
// Default: "1"
incapped_weapons_slot5 "1"

// 0:Disable, 1:Force switch to primary weapon, 2: Force switch to secondary weapon
// Default: "1"
incapped_weapons_switch "1"

// 0:Disable, 1:Prevent give pistol on incapped
// -
// Default: "0"
incapped_weapons_blockgive "0" 
Admin Commands:
PHP Code:
"sm_iw_reload" //reload config data weapons list(incapped_weapons_classnamelist.cfg) 

Credits
Silvers: for let me using your forwards, and your code
BHaType: for your code to auto create data cfg


Changelog


Requirements:Conflicts:
Incapped Magnum 1.4
Incapped Grenade (Pipe/Molotov/Vomitjar)

Notes:

Rant:
-download the plugin from incapped_weapons.smx, don't try to download from the Get Plugin, it won't work
-put incapped_weapons_classnamelist.cfg in /addons/sourcemod/data/ folder if this file is not generated.
-this SM1.8 version or higher is needed to compile in addition to the required Mission and Weapons - Info Editor
-make sure you don't have any weapons modified with: "WeaponType" "pistol",
in your file: /addons/sourcemod/data/l4d_info_editor_weapons.cfg, because otherwise this plugin will be useless for you
-warning not to use the "map" command, to change maps instead use "sm_map" or "changelevel", in Linux it can cause crash.
Attached Files
File Type: sp Get Plugin or Get Source (incapped_weapons.sp - 397 views - 14.9 KB)

Last edited by xZk; 04-05-2020 at 22:00. Reason: v1.5
xZk is offline