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

[L4D2] Weapon reload system (Update of an old plugin.)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Alaina
Junior Member
Join Date: Apr 2014
Plugin ID:
4156
Plugin Version:
1.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Modern FPS Style reload.
    Old 04-04-2014 , 15:47   [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #1

    (I sincerely apologise for posting it in the wrong section before, got slightly confused.)

    Version: 1.3
    Original Author: ghosthunterfool
    Original Plugin: https://forums.alliedmods.net/showthread.php?p=1793378
    Updated by: Alaina
    Public CVAR: l4d2_wepreload_version -- This returns the version of the plugin.
    This plugin does not use additional cvar's (There are defined in the script but they are for script usage purpose only and should not be used in the console.)

    Update: 1.1
    Changed the "ammo" types from the old L4D2 Library to the new L4D2 library, fixing the plugin.
    The plugin now supports reloading all the correct value's (Reloading M4 under 0 bullets, will give you 51, simular to other weapons).

    Update 1.2:
    - Gave each weapon their own AMMO definition; this resolves some of the weapon's getting overloaded (Assigned wrong values; AK's would end up with 51 rounds after a rapid reload.)
    - Identified an error with the pistol reload (As reported by Krufftys Killers) -- Added in a code wich makes the plugin ignore pistol reload. (You also cannot edit the clipsize of a pistol; so this edit is a win-win)
    - Renamed the CVAR to be more plugin specific.

    Update 1.3:

    * Fixed the problem where the pistol would spit out errors on the plugin.
    * Fixed an issue where the AK-47 still would not get its correct ammo after reloading.

    Update 1.4:
    - Fixed an issue where the plugin wouldn't "halt" when an invalid client reloaded a weapon (Ghost client)
    - Fixed an issue with connvars being messed up and overriding each other.

    NOTE:
    Before you update from version 1.3 to version 1.4 --
    Please delete "\cfg\sourcemod\l4d2_weapon_reload.cfg"; the plugin will automaticly re-create it.




    Why did I update it?
    This is an updated version of the original plugin. This plugin was still using the old Left 4 Dead 2 ammo type's and it was pretty usefull in some cases, where you would need that faster reload to survive.


    Summary:
    This plugin simulates the reload as seen in most modern FPS games.
    If you reload while your clip isn't empty; the reload will happen faster and you'll have one extra bullet in the clip (The one thats still in the weapon).
    If your clip is empty; the normal default clip size & reload time will occur.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_weapon_reload.sp - 3720 views - 22.9 KB)

    Last edited by Alaina; 04-11-2014 at 09:29.
    Alaina is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 04-04-2014 , 19:24   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #2

    L 04/04/2014 - 16:03:42: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
    L 04/04/2014 - 16:03:42: [SM] Displaying call stack trace for plugin "l4d2_gun.smx":
    L 04/04/2014 - 16:03:42: [SM] [0] Line 426, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132310.attach::Timer_InsertClip()
    Krufftys Killers is offline
    Alaina
    Junior Member
    Join Date: Apr 2014
    Old 04-05-2014 , 06:15   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #3

    Quote:
    Originally Posted by Krufftys Killers View Post
    L 04/04/2014 - 16:03:42: [SM] Native "GetEntProp" reported: Entity -1 (-1) is invalid
    L 04/04/2014 - 16:03:42: [SM] Displaying call stack trace for plugin "l4d2_gun.smx":
    L 04/04/2014 - 16:03:42: [SM] [0] Line 426, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132310.attach::Timer_InsertClip()
    Hello,
    Can you tell me with wich weapon this occured; or does it happen for any? As i'm not getting this problem myself.

    EDIT: Check top post please.

    Last edited by Alaina; 04-05-2014 at 08:05.
    Alaina is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 04-05-2014 , 10:14   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #4

    L 04/05/2014 - 08:07:28: [SM] Native "GetConVarInt" reported: Invalid convar handle 0 (error 4)
    L 04/05/2014 - 08:07:28: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 08:07:28: [SM] [0] Line 506, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132331.attach::updateConVar()
    L 04/05/2014 - 08:07:28: [SM] [1] Line 420,
    Krufftys Killers is offline
    Alaina
    Junior Member
    Join Date: Apr 2014
    Old 04-05-2014 , 11:46   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #5

    Quote:
    Originally Posted by Krufftys Killers View Post
    L 04/05/2014 - 08:07:28: [SM] Native "GetConVarInt" reported: Invalid convar handle 0 (error 4)
    L 04/05/2014 - 08:07:28: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 08:07:28: [SM] [0] Line 506, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132331.attach::updateConVar()
    L 04/05/2014 - 08:07:28: [SM] [1] Line 420,
    Apologies - Completely forgot to disable "pistol" support in the plugin itself. Should be fixed now (hopefully.) -- I didn't get any errors yet on my server.
    Alaina is offline
    PatriotGames
    AlliedModders Donor
    Join Date: Feb 2012
    Location: root@irs:/# rm -rf /
    Old 04-05-2014 , 18:54   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #6

    Thank you for updating this plugin. It is a nice upgrade for the survivors.

    Testing your latest version and getting the following errors when using the default pistol, but not with the magnum:

    05 "L4D2 Weapon Reload System" (1.2.1) by ghosthunterfool & Alaina

    Code:
    L 04/05/2014 - 15:35:16: SourceMod error session started
    L 04/05/2014 - 15:35:16: Info (map "c5m1_waterfront") (file "errors_20140405.log")
    L 04/05/2014 - 15:35:16: [SM] Native "GetEntPropString" reported: Entity -1 (-1) is invalid
    L 04/05/2014 - 15:35:16: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 15:35:16: [SM]   [0]  Line 717, /groups/sourcemod/compiler-1.5/include/entity.inc::GetEntityClassname()
    L 04/05/2014 - 15:35:16: [SM]   [1]  Line 335, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132342.attach::Event_Weapon_Reload()
    L 04/05/2014 - 15:35:22: [SM] Native "GetEntPropString" reported: Entity -1 (-1) is invalid
    L 04/05/2014 - 15:35:22: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 15:35:22: [SM]   [0]  Line 717, /groups/sourcemod/compiler-1.5/include/entity.inc::GetEntityClassname()
    L 04/05/2014 - 15:35:22: [SM]   [1]  Line 335, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132342.attach::Event_Weapon_Reload()
    Other than the error, the sound of the magazine/clip being reinserted seems to double-play, but that is a minor thing compared to the benefit of increased reload speed.

    Regards,

    PG
    PatriotGames is offline
    Alaina
    Junior Member
    Join Date: Apr 2014
    Old 04-05-2014 , 20:04   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #7

    Quote:
    Originally Posted by PatriotGames View Post
    Thank you for updating this plugin. It is a nice upgrade for the survivors.

    Testing your latest version and getting the following errors when using the default pistol, but not with the magnum:

    05 "L4D2 Weapon Reload System" (1.2.1) by ghosthunterfool & Alaina

    Code:
    L 04/05/2014 - 15:35:16: SourceMod error session started
    L 04/05/2014 - 15:35:16: Info (map "c5m1_waterfront") (file "errors_20140405.log")
    L 04/05/2014 - 15:35:16: [SM] Native "GetEntPropString" reported: Entity -1 (-1) is invalid
    L 04/05/2014 - 15:35:16: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 15:35:16: [SM]   [0]  Line 717, /groups/sourcemod/compiler-1.5/include/entity.inc::GetEntityClassname()
    L 04/05/2014 - 15:35:16: [SM]   [1]  Line 335, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132342.attach::Event_Weapon_Reload()
    L 04/05/2014 - 15:35:22: [SM] Native "GetEntPropString" reported: Entity -1 (-1) is invalid
    L 04/05/2014 - 15:35:22: [SM] Displaying call stack trace for plugin "l4d2_weapon_reload.smx":
    L 04/05/2014 - 15:35:22: [SM]   [0]  Line 717, /groups/sourcemod/compiler-1.5/include/entity.inc::GetEntityClassname()
    L 04/05/2014 - 15:35:22: [SM]   [1]  Line 335, /home/groups/alliedmodders/forums/files/2/4/7/9/8/9/132342.attach::Event_Weapon_Reload()
    Other than the error, the sound of the magazine/clip being reinserted seems to double-play, but that is a minor thing compared to the benefit of increased reload speed.

    Regards,

    PG
    Yeah; I'm currently aware about the pistol acting up with the code; I'm looking into it why it's causing that.
    I bet it's something to do with the way Valve's handles the pistol as a "must have" weapon in Left 4 Dead 2; as you always have the pistol.
    I'll do my best to resolve this. I did notice that this error doesn't really cause any major faults within the plugin and i'll continue working.

    About the double reload sound; this is indeed correct and I don't think there is a way to fix it.. But fair is fair; i'lll look into it aswell.

    Last edited by Alaina; 04-05-2014 at 20:12.
    Alaina is offline
    Alaina
    Junior Member
    Join Date: Apr 2014
    Old 04-06-2014 , 06:37   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #8

    Version 1.3 is released.

    Last edited by Alaina; 04-06-2014 at 06:42.
    Alaina is offline
    ghosthunterfool
    Senior Member
    Join Date: Mar 2010
    Old 04-07-2014 , 01:46   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #9

    Hey, thanks for updating/fixing whatever I left. Great work
    ghosthunterfool is offline
    Alaina
    Junior Member
    Join Date: Apr 2014
    Old 04-07-2014 , 07:26   Re: [L4D2] Weapon reload system (Update of an old plugin.)
    Reply With Quote #10

    Quote:
    Originally Posted by ghosthunterfool View Post
    Hey, thanks for updating/fixing whatever I left. Great work
    No problem (I hope you don't mind!) I should be the one thanking you for this amazing plugin and idea.
    It was a shame that it didn't work with the latest L4D2 updates and this plugin really was something that alot of people wanted; and thats why I updated your work!
    Alaina 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:53.


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