Raised This Month: $32 Target: $400
 8% 

[L4D & L4D2] Pistol Reload (1.0) [16-May-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
8053
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Sets a pistols clip to 0 when reloading.
    Old 05-16-2022 , 15:59   [L4D & L4D2] Pistol Reload (1.0) [16-May-2022]
    Reply With Quote #1

    About:
    • Sets a pistols clip to 0 when reloading.


    Thanks:
    • Cloud talk - For the request.



    Changes:
    Code:
    1.0 (16-May-2022)
        - Initial release.


    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_pistol_reload.sp - 389 views - 3.2 KB)
    __________________

    Last edited by Silvers; 05-16-2022 at 15:59.
    Silvers is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 12-05-2022 , 16:45   Re: [L4D & L4D2] Pistol Reload (1.0) [16-May-2022]
    Reply With Quote #2

    i tried to force pistols do "empty clip reloading" however the clip is empty or not before reloading in SDKHook_Reload. it works but brings animation glitches cause of the client-side prediction.

    Last edited by little_froy; 12-05-2022 at 16:47.
    little_froy is offline
    NoroHime
    Veteran Member
    Join Date: Aug 2016
    Location: bed
    Old 12-05-2022 , 17:31   Re: [L4D & L4D2] Pistol Reload (1.0) [16-May-2022]
    Reply With Quote #3

    Quote:
    Originally Posted by little_froy View Post
    i tried to force pistols do "empty clip reloading" however the clip is empty or not before reloading in SDKHook_Reload. it works but brings animation glitches cause of the client-side prediction.
    i guess you need SDKHook_ReloadPost, and handle when bSuccessful is true
    __________________
    NoroHime is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 01-18-2023 , 10:44   Re: [L4D & L4D2] Pistol Reload (1.0) [16-May-2022]
    Reply With Quote #4

    i found a better and shallow way to set pistol's clip to empty when reloading:

    set "ammo_pistol_max" to a value other than - 2, then pistols' clip will be empty as default when reloading, no client side delay based ping! but effects both on pistol and pistol magnum.

    also need a plugin to provide reserve ammo, i made one
    https://forums.alliedmods.net/showthread.php?t=340877.

    Last edited by little_froy; 01-22-2023 at 01:08.
    little_froy is offline
    Reply



    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 21:32.


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