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

[L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Plugin ID:
8307
Plugin Version:
1.0.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    hold or tap reload key to switch upgrade packs type
    Old 11-29-2022 , 14:52   [L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]
    Reply With Quote #1

    about
    • small thing, hold or tap reload to switch packs type
    • i think existence of these is very reasonable haha
    • translation file default has en/chi/zho, edit your self if you needed

    Intro Videos
    [L4D2] Switch Upgrade Packs Type (SourceMod)


    ConVar

    PHP Code:
    // announce types 0=dont announce 1=center 2=chat 4=hint. add numbers together you want
    switch_upgradepacks_announce "2"

    // time(seconds) for hold the reload to switch types 0=tap mode
    switch_upgradepacks_holdtime "2" 

    changelog
    • v1.0 just releases; 30-November-2022
    • v1.0.1 fix remove item cause entity leak, thanks to Silvers; 30-November-2022 (2nd time)
    • v1.0.2 fix forgot to listen key release :C sorry; 1-December-2022

    Installation
    • put l4d2_switch_upgradepacks.smx on /plugins/
    • optional put l4d2_switch_upgradepacks.phrases.txt on /translations/ to make announcement work


    Related Plugins
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_switch_upgradepacks.sp - 208 views - 6.4 KB)
    File Type: txt l4d2_switch_upgradepacks.phrases.txt (639 Bytes, 100 views)
    __________________

    Last edited by NoroHime; 11-30-2022 at 11:33.
    NoroHime is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 02-21-2023 , 05:58   Re: [L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]
    Reply With Quote #2

    RemovePlayerItem() sometimes create extra item from weapon spawner. i use RemoveEntity() with FakeClientCommand(client, "use %s", classname_of_new_item) instead.
    maybe what i'm saying is wrong.

    Last edited by little_froy; 02-21-2023 at 06:01.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-21-2023 , 06:02   Re: [L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]
    Reply With Quote #3

    Should always use RemoveEntity after RemovePlayerItem. The latter only removes it from the player, does not delete the entity. This was fixed in 1.0.1
    __________________

    Last edited by Silvers; 02-21-2023 at 06:02.
    Silvers is offline
    little_froy
    Senior Member
    Join Date: May 2021
    Old 02-21-2023 , 06:09   Re: [L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]
    Reply With Quote #4

    Quote:
    Originally Posted by Silvers View Post
    Should always use RemoveEntity after RemovePlayerItem. The latter only removes it from the player, does not delete the entity. This was fixed in 1.0.1
    i found the issue in my own item converter, if i use RemovePlayerItem before RemoveEntity. now i avoid using RemovePlayerItem and only RemoveEntity.
    little_froy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-21-2023 , 06:52   Re: [L4D2] Switch Upgrade Packs Type v1.0.2 [1-December-2022]
    Reply With Quote #5

    There's potential of issues or crash if you don't use RemovePlayerItem before RemoveEntity. Both do different things, look at SM API.
    __________________
    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 21:56.


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