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

[L4D/L4D2] Improved Multiple Equipment


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MasterMind420
Veteran Member
Join Date: Nov 2010
Plugin ID:
5373
Plugin Version:
3.6
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Carry two items in each slot.
    Old 10-05-2016 , 11:56   [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #1

    [L4D/L4D2] IMPROVED MULTIPLE EQUIPMENT

    >>>>>NEW FEATURES<<<<<
    Auto Activate -
    Multiple Equipment now activates at round start, no need to pick anything up.
    AFK Save -
    Saves and loads equipment if you go afk automatically, option to enable/disable in config.
    Primary Weapon Workaround -
    All primary weapons now retain 1 bullet before the gun completely empties so u can switch.
    Splitscreen Player Support -
    Plugin now fully supports splitscreen players, except for Extra Equipment View(impractical to code in).
    Extra Equipment View -
    Switching to thirdperson shows your extra equipment on yourself, all other players extra items always show.

    >>>>>HOW TO<<<<<
    (Select mode 1 or 2 in the cfg)
    Mode 1 = Press 1,2,3,4,5 once to switch.
    Mode 2 = Press 1,2,3,4,5 twice to switch.
    Restore Item =
    Press 1,2,3,4,5 or shove.
    Switch Command = Bind sm_s0 to a key or type !s0 in chat.

    >>>>>CHANGELOG<<<<<
    ---VERSION 2.0---
    Added afk feature, now saves and loads equipment if you go afk.
    Added reactivate feature, on map change you can freely switch items without having to pick anything up.
    Added primary weapon workaround, all primary weapons now retain 1 bullet before the gun completely empties, so u can switch.
    No need for the drop fix for the M60 or Grenade Launcher it's built into Multiple Equipment.

    ---VERSION 2.1---
    Added new thirdperson !eview feature, this command is no longer necessary but still available.
    Weapon clipping issues have been resolved by this, basically if you go thirdpersonshoulder it automatically activates !eview showing you your extra equipment on your back, when you leave thirdpersonshoulder it reverts back to disabling the !eview command so you won't have weapon clipping issues. I have also added a precaution to player_spawn which disables it again, just in case.

    ---VERSION 2.2---
    Corrected the code for the auto !eview feature, there should be no more clipping issues in firstperson.
    Reworked item pickup code. Let me know if other players connect/disconnect, if on map change it breaks.

    ---VERSION 2.3---
    Cleaned up the script a bit.
    Added M60 reserve ammo workaround, just needs a reload animation when the clip empties. Eventually i'll get to it.
    Added a fix to the grenade launcher not reloading its last round.

    ---VERSION 2.4---
    Added afk feature, now saves and loads equipment if you go afk.
    Added reactivate feature, on map change you can freely switch items without having to pick anything up.
    Added primary weapon workaround, all primary weapons now retain 1 bullet before the gun completely empties, so u can switch.
    Added new thirdperson !eview auto feature, this command has been deactivated, when you switch to thirdpersonshoulder it will activate !eview.

    ---VERSION 2.5---
    Reworked activation into OnClientPostAdminCheck timer.
    Reworked player_bot_replace and bot_player_replace to correct detaching item entities causing item clipping as well as fixing afk saving of equipment.
    Removed code causing loose indentation warning on compile, it's no longer necessary.

    ---VERSION 2.6---
    Added splitscreen player support.
    Removed showing extra equipment on splitscreen players to fix item clipping issues.
    Added cvar l4d_me_afksave, saving while afk is now optional(because of possible exploit).
    Added cvar l4d_me_view, showing extra equipment is now optional(because of clipping issues).
    Reworked activation and auto thirdpersonshoulder extra equipment showing into OnGameFrame.
    Added player_disconnect event pre hook to remove all items from fully disconnected players.
    Added clipping fix to item_pickup so it will trigger everytime an item is picked up.
    Added timer to bot_player_replace to correct clipping issues when coming back from afk.
    Some unnecessary code has also been removed.

    ---VERSION 2.7---
    Added cvar l4d_me_custom_notify, you can now setup a chat/hint welcome message for your server.
    Added cvar l4d_me_custom_notify_msg, change this to the message you would like to be displayed.
    Reworked activation into player_spawn, initially I had issues but worked them out.
    Modified afk saving slightly, as well as player_spawn to add RemoveItemAttach after equipment loads.
    This seems to have resolved the spawn clipping issue where it looks like you have an extra weapon.

    ---VERSION 2.8---
    Moved auto activation and thirdpersonshoulder check back to OnClientPostAdminCheck.
    Added Clipping Fix to Activate, item_pickup, player_bot_replace, bot_player_replace.
    Added bot checks to stop timers being started that aren't necessary for bots.
    Removed Mode Select Menu, Mode 2, as well as all unnecessary code involving prior activation methods.
    AttachAllEquipment only happens in thirdpersonshoulder view now.
    Removed Show Message and Mode Select convars from the config.

    ---VERSION 2.9---
    Added l4d_me_mode cvar into the config, Single Tap and Double Tap are now selectable again in the config.
    Both modes work flawlessly now, no random slot switching when you switch and the scroll wheel is also fixed.
    The item in the slot will remain that item until you single tap it or double tap it depending on the mode you select.

    ---VERSION 3.0---
    Changed custom server message delivery to a more effective method, also added a client check.
    Added a workaround for the afk thirpersonshoulder clipping bug, no more clipping issues after leaving afk, if entering afk thirdpersonshoulder.
    Modified all the clipping fix methods i was using to only remove the view, not the attachments, removing the attachments broke the viewing system.

    ---VERSION 3.1---
    Fixed all secondary equipment loss after all players die(Mission Lost).
    Fixed settransmit Extra Equipment View/Thirdperson Viewing thanks to Ludastars help.

    ---VERSION 3.2---
    Fixed bug causing extra equipment positions being offset after map change.
    Fixed bug causing extra equipment positions being offset after leaving afk.
    Fixed bug where adrenaline would show incorrectly in the secondary slot.
    Fixed bug where defibrillator would show incorrectly in the secondary slot.
    Modified alot more code...optimizations and other minor fixes.

    ---VERSION 3.3---
    Fixed issue where changing your character using a plugin would offset all extra equipment.
    Also optimized CreateItemAttach to use Case instead of If statements, thanks to Ludastar.


    ---VERSION 3.4---
    Drastically cut the performance impact of the character switch view fix in half.
    Bot clipping issues in splitscreen have been resolved, requires a map reload/restart first.
    Fixed an issue when restarting a game or changing mission would save equipment from last game.


    ---VERSION 3.5---
    Added and made optional(off by default) in the config a simple player connect message.

    ---VERSION 3.6---
    Added ThirdpersonShoulderDetect Plugin Support.
    Cleaned up some code.
    This is my finale release of this plugin.

    AS ALWAYS DELETE YOUR CONFIGS IF THEY'VE CHANGED AFTER AN UPDATE AND REPORT ANY BUGS.

    CREDIT = MasterMind420 / Ludastar / Pan Xiaohai / Marcus101RR
    ORIGINAL THREAD = https://forums.alliedmods.net/showthread.php?t=166580
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_guncontrol.sp - 938 views - 22.9 KB)
    File Type: sp Get Plugin or Get Source (l4d2_pistol_reloading.sp - 878 views - 11.0 KB)
    File Type: sp Get Plugin or Get Source (l4d_multiple_equipment.sp - 1130 views - 57.9 KB)
    File Type: sp Get Plugin or Get Source (l4d_multiple_equipment_final.sp - 1215 views - 59.5 KB)

    Last edited by MasterMind420; 10-15-2017 at 15:57.
    MasterMind420 is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 10-06-2016 , 09:38   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #2

    Getting this error
    L 10/06/2016 - 02:09:03: SourceMod error session started
    L 10/06/2016 - 02:09:03: Info (map "desperate_houseway") (file "errors_20161006.log")
    L 10/06/2016 - 02:09:03: Error log file session closed.
    L 10/06/2016 - 02:59:48: SourceMod error session started
    L 10/06/2016 - 02:59:48: Info (map "l4d2_daybreak01_hotel") (file "errors_20161006.log")
    L 10/06/2016 - 02:59:48: [SM] Exception reported: Invalid game event handle 0 (error 4)
    L 10/06/2016 - 02:59:48: [SM] Blaming: l4d_multiple_equipment.smx()
    L 10/06/2016 - 02:59:48: [SM] Call stack trace:
    L 10/06/2016 - 02:59:48: [SM] [0] GetEventInt
    L 10/06/2016 - 02:59:48: [SM] [1] Line 271, /home/forums/content/files/9/7/2/5/7/157745.attach::player_use()
    L 10/06/2016 - 02:59:49: [SM] Exception reported: Invalid game event handle 0 (error 4)
    Krufftys Killers is offline
    P00kster
    Member
    Join Date: Aug 2015
    Old 10-06-2016 , 12:32   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #3

    Lines 85 and 86 need to be changed from:

    Code:
    	HookEvent("player_use", player_use, EventHookMode_PostNoCopy);
    	HookEvent("player_spawn", player_spawn, EventHookMode_PostNoCopy);
    to

    Code:
    	HookEvent("player_use", player_use, EventHookMode_Post);
    	HookEvent("player_spawn", player_spawn, EventHookMode_Post);
    This will fix the error.

    Quote:
    Originally Posted by Krufftys Killers View Post
    Getting this error
    L 10/06/2016 - 02:09:03: SourceMod error session started
    L 10/06/2016 - 02:09:03: Info (map "desperate_houseway") (file "errors_20161006.log")
    L 10/06/2016 - 02:09:03: Error log file session closed.
    L 10/06/2016 - 02:59:48: SourceMod error session started
    L 10/06/2016 - 02:59:48: Info (map "l4d2_daybreak01_hotel") (file "errors_20161006.log")
    L 10/06/2016 - 02:59:48: [SM] Exception reported: Invalid game event handle 0 (error 4)
    L 10/06/2016 - 02:59:48: [SM] Blaming: l4d_multiple_equipment.smx()
    L 10/06/2016 - 02:59:48: [SM] Call stack trace:
    L 10/06/2016 - 02:59:48: [SM] [0] GetEventInt
    L 10/06/2016 - 02:59:48: [SM] [1] Line 271, /home/forums/content/files/9/7/2/5/7/157745.attach::player_use()
    L 10/06/2016 - 02:59:49: [SM] Exception reported: Invalid game event handle 0 (error 4)
    P00kster is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 10-06-2016 , 12:56   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #4

    yah sorry about that...the new versions fixed should be ready in a day or two
    MasterMind420 is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Black Hole
    Old 10-09-2016 , 05:53   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #5

    Quote:
    Originally Posted by MasterMind420 View Post
    yah sorry about that...the new versions fixed should be ready in a day or two
    BTW, MasterMind, also list plugins that are incompatible with this one like Merudo's Survivor Identity Fix For 5+ Players plugin and other plugins that involves the events player_bot_replace, player_afk, and bot_player_replace to save previous weapons.
    cravenge is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 10-09-2016 , 12:50   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #6

    Quote:
    Originally Posted by cravenge View Post
    BTW, MasterMind, also list plugins that are incompatible with this one like Merudo's Survivor Identity Fix For 5+ Players plugin and other plugins that involves the events player_bot_replace, player_afk, and bot_player_replace to save previous weapons.
    Or i could just post the fixed version i made of Merudo's identity fix, thanks for the heads up forgot about that. I'm releasing an update today but before i do i may just change the saving system first, so it doesn't interfere. Before i had problems using player_afk to save but i'm pretty sure i can get it working right now...making it compatible, again thanks for the heads up man, completely forgot...if it doesn't work i'll post a working copy of Merudo's fix....the only plugin i was aware of being incompatible was Merudo's fix. If anyone knows of any others let me know...

    Last edited by MasterMind420; 10-09-2016 at 12:51.
    MasterMind420 is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 10-26-2016 , 23:42   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #7

    Sorry for the delay everyone, do to some recent life issues i've had i haven't had much time to code. Within the next few days i'll be releasing everything i have and i'm not sure when i'll be able to get back to coding again. Multiple Equipment will be updated along with several other plugins i've been working on. I'll also be releasing a new plugin called Gun Manager...It's a rewrite of Gun Control and a few others combined that i have been working on.
    MasterMind420 is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 11-05-2016 , 17:58   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #8

    Sorry for the delay again, I found an interesting bug, if you disable a slot in the config its not actually disabled for all players only the main player(i assume the first to join). So until I come up with a fix there won't be an update released. If there's anyone else who can reproduce this on your own server and let me know if it's happening on yours I would appreciate it. I want to make sure its not just me having the issue.
    MasterMind420 is offline
    cravenge
    Veteran Member
    Join Date: Nov 2015
    Location: Black Hole
    Old 11-05-2016 , 20:12   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #9

    Quote:
    Originally Posted by MasterMind420 View Post
    Sorry for the delay again, I found an interesting bug, if you disable a slot in the config its not actually disabled for all players only the main player(i assume the first to join). So until I come up with a fix there won't be an update released. If there's anyone else who can reproduce this on your own server and let me know if it's happening on yours I would appreciate it. I want to make sure its not just me having the issue.
    Was going to report that.. Better check the code to help you find that bug.
    cravenge is offline
    MasterMind420
    Veteran Member
    Join Date: Nov 2010
    Old 11-05-2016 , 20:21   Re: [L4D/L4D2] Improved Multiple Equipment
    Reply With Quote #10

    thanks for the confirmation...its odd that it would only effect one person and not the rest...maybe need to loop thru all the clients i'll check it out, but i'm not sure where yet...pm me if u find it...i'll be checking too tonight.
    MasterMind420 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 14:18.


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