Raised This Month: $208 Target: $400
 52% 

[L4D/2]Incapped Weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author
xZk
Senior Member
Join Date: Nov 2017
Plugin ID:
6891
Plugin Version:
1.3
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    incapped survivors can switch all your weapons
    Old 01-11-2020 , 14:23   [L4D/2]Incapped Weapons
    Reply With Quote #1

    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.
    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
    // Default: "1"
    incapped_weapons_slot1 "1"

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

    // 0:Disable, 1:Allow weapons of slot 3
    // Default: "1"
    incapped_weapons_slot3 "1"

    // 0:Disable, 1:Allow weapons of slot 4
    // Default: "1"
    incapped_weapons_slot4 "1"

    // 0:Disable, 1:Allow weapons of slot 5
    // Default: "1"
    incapped_weapons_slot5 "1"

    // 0:Disable, 1:Force switch to secundary 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
    -not compatible with listen servers*
    Attached Files
    File Type: sp Get Plugin or Get Source (incapped_weapons.sp - 25 views - 12.9 KB)

    Last edited by xZk; 02-13-2020 at 19:31. Reason: v1.3
    xZk is offline
    strikeraot
    Senior Member
    Join Date: Dec 2018
    Location: Viet Nam
    Old 01-14-2020 , 09:59   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #2

    the .cfg will be placed in\addons\sourcemod\configs?
    strikeraot is offline
    strikeraot
    Senior Member
    Join Date: Dec 2018
    Location: Viet Nam
    Old 01-14-2020 , 11:14   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #3

    Can't compile this plugin
    Quote:
    //// incapped_weapons.sp
    //
    // D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\incap ped_weapons.sp(293) : error 017: undefined symbol "RemoveEntity"
    // D:\Steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\incap ped_weapons.sp(174) : warning 204: symbol is assigned a value that is never used: "g_bLeft4Dead2"
    //
    // 1 Error.
    //
    // Compilation Time: 0.41 sec
    // ----------------------------------------

    Press enter to exit ...
    strikeraot is offline
    strikeraot
    Senior Member
    Join Date: Dec 2018
    Location: Viet Nam
    Old 01-14-2020 , 11:16   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #4

    can't load it, too
    Quote:
    ] sm plugins load incapped_weapons
    [SM] Plugin incapped_weapons.smx failed to load: Native "InfoEditor_GetString" was not found.
    strikeraot is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 01-14-2020 , 12:16   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #5

    And this is why I provide a ton of information in my posts, yet it's never enough.

    Quote:
    Originally Posted by strikeraot View Post
    the .cfg will be placed in\addons\sourcemod\configs?
    Here: sourcemod/data/incapped_weapons_classlist.cfg

    Quote:
    Originally Posted by strikeraot View Post
    Can't compile this plugin
    "RemoveEntity" - requires sourcemod 1.10.

    "InfoEditor_GetString" requires Info Editor .inc file.
    __________________
    Silvers is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 01-14-2020 , 16:27   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #6

    im not sure if this plugin changes weapon type to pistol to allow this...however what ive discovered is with melee weapons changed to pistol weapon type u can use melee while incap...however a side effect of this...all survivor bots will pickup melee wespons now. Which is not a good thing, they suck at using them and will continuously pickup pistols and melee if next to each other. This has nothing to do with this plugin, only something I discovered in my own testing.
    MasterMind420 is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Old 01-14-2020 , 17:58   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #7

    I updated this for to compile in sm1.8+ or higher
    Quote:
    2020-01-14 (v1.1)
    * Remove unnecessary events for L4D1
    * Compatibility with SM1.8+

    Last edited by xZk; 01-14-2020 at 17:59.
    xZk is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 01-14-2020 , 18:04   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #8

    I will still fail to compile on the forum due to: #include <l4d_info_editor>

    You *could* copy the natives/forwards from the include into the plugin without having to use the include, but this goes against the standard scripting practices on AM. Actually you could do this in combination with #tryinclude <> and check "#if !defined _info_editor_included" then define the natvies/forwards. Only thing if the include is ever updated and breaks backwards compatibility (I have no plans on this). For simple plugins/includes with few natives/forwards used I may do this more often. For DHooks I wouldn't.
    __________________

    Last edited by Silvers; 01-14-2020 at 18:05.
    Silvers is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Old 01-14-2020 , 18:17   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #9

    ok I understand that it cannot be compiled on the forum, but my intension with the compitability in sm1.8 is because of the method that was (RemoveEntity) that I think is only from sm1.9+, I think I need to detail that it is not you must use the button Getplugin xd
    xZk is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 01-14-2020 , 18:27   Re: [L4D2/L4D?]Incapped Weapons
    Reply With Quote #10

    Quote:
    Originally Posted by xZk View Post
    ok I understand that it cannot be compiled on the forum, but my intension with the compitability in sm1.8 is because of the method that was (RemoveEntity) that I think is only from sm1.9+, I think I need to detail that it is not you must use the button Getplugin xd
    Ahh yeah I forgot about that. We should be forcing server owners to update to 1.10 anyway, more features etc.
    __________________
    Silvers 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 05:25.


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