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

[L4D2] Oshroth's Backpack


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MasterMind420
BANNED
Join Date: Nov 2010
Plugin ID:
5634
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Delete This Thread
    Unapprover:
    Reason for Unapproving:
    No source code / plugin, upload source and use the Report Post button for a new review.
    Old 05-20-2017 , 19:39   [L4D2] Oshroth's Backpack
    Reply With Quote #1

    Oshroth's Backpack
    by MasterMind420

    Players are given a backpack to store extra items.
    Full credit for the idea goes to the original author Oshroth.
    You can find his thread here - https://forums.alliedmods.net/showthread.php?t=121373

    Features:
    Code:
    Backpack Slot Limits - Limit the amount of items u can carry.
    Incap Item Pickup - Press Use key while incap to pickup items.
    Drop Items - Hold Reload key to drop items in front of you.
    Starting Items - Configure players first spawn items.
    Death Drop - Enable/Disable dropping items on death.
    Changelog:
    Code:
    v0.8
    Items automatically refill empty slots.
    Limit backpack contents added. (Optional)
    Pickup items while incap added. (Optional)
    Display a backpack on players backs added. (Optional)
    Configure players starting backpack contents added. (Optional)
    
    v0.9
    Removed some useless code snippets.
    Added DeathDrop option - players drop or don't drop items on death.
    Updated IsSurvivorThirdPerson bool, thanks Lux.
    
    v1.0
    Major rewrite fixed many bugs and did many optimizations.
    Recreated the admin backpack menu to work much better.
    Item switching can now be done pressing number keys(NGBUCKWANGS).
    Added ability to drop items holding your RELOAD button(NGBUCKWANGS).
    Added single tap and double tap option for item switching.
    Added ThirdpersonShoulder Detect Plugin support.
    
    v1.1
    Fixed -
    	Quantities not subtracting from player passing pills
    	Item pickup not always working and needing to be pressed several times
    Feature -
    	Added incap pickup option again
    	Modified item limit to use slot limit instead
    	Added ability to pass multiple pills/adrenaline
    
    v1.2
    Fixed -
    	Fixed broken qty hints system
    	Fixed after throwing grenade switching to another
    Feature -
            Made items more visible when swapping/dropping them
    
    v1.3
    Fixed -
    	Fixed broken grenade replenish after dropping one
    PLEASE REPORT ANY BUGS OR BROKEN FEATURES YOU FIND

    Last edited by DarkDeviL; 10-18-2021 at 09:04. Reason: Restore to previous version.
    MasterMind420 is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 05-22-2017 , 06:19   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #2

    L 05/22/2017 - 01:09:41: SourceMod error session started
    L 05/22/2017 - 01:09:41: Info (map "c5m1_waterfront") (file "errors_20170522.log")
    L 05/22/2017 - 01:09:41: [SM] Exception reported: Invalid timer handle b6ef0a30 (error 3)
    L 05/22/2017 - 01:09:41: [SM] Blaming: l4d2_backpack.smx
    L 05/22/2017 - 01:09:41: [SM] Call stack trace:
    L 05/22/2017 - 01:09:41: [SM] [0] KillTimer
    L 05/22/2017 - 01:09:41: [SM] [1] Line 459, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
    L 05/22/2017 - 01:09:41: [SM] [3] FakeClientCommand
    L 05/22/2017 - 01:09:41: [SM] [4] Line 3011, /home/forums/content/files/9/7/2/5/7/162900.attach::CheatCommand
    L 05/22/2017 - 01:09:41: [SM] [5] Line 371, /home/forums/content/files/9/7/2/5/7/162900.attach::AutoItemRefill
    L 05/22/2017 - 018:09: Error log file session closed.
    L 05/22/2017 - 01:436: SourceMod error session started
    L 05/22/2017 - 01:436: Info (map "c5m1_waterfront") (file "errors_20170522.log")
    L 05/22/2017 - 01:436: [SM] Exception reported: Invalid timer handle e3830846 (error 3)
    L 05/22/2017 - 01:436: [SM] Blaming: l4d2_backpack.smx
    L 05/22/2017 - 01:436: [SM] Call stack trace:
    L 05/22/2017 - 01:436: [SM] [0] KillTimer
    L 05/22/2017 - 01:436: [SM] [1] Line 489, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
    L 05/22/2017 - 01:436: [SM] [3] FireEvent
    L 05/22/2017 - 01:436: [SM] [4] Line 1656, /home/forums/content/files/8/5/7/7/8/101316.attach::FireEventsFootlocker
    L 05/22/2017 - 01:436: [SM] [5] Line 1624, /home/forums/content/files/8/5/7/7/8/101316.attach::tmrAutoGrab
    L 05/22/2017 - 01:47:23: Error log file session closed.
    L 05/22/2017 - 01:48:00: SourceMod error session started
    Krufftys Killers is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 05-22-2017 , 07:39   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #3

    Quote:
    Originally Posted by Krufftys Killers View Post
    L 05/22/2017 - 01:09:41: SourceMod error session started
    L 05/22/2017 - 01:09:41: Info (map "c5m1_waterfront") (file "errors_20170522.log")
    L 05/22/2017 - 01:09:41: [SM] Exception reported: Invalid timer handle b6ef0a30 (error 3)
    L 05/22/2017 - 01:09:41: [SM] Blaming: l4d2_backpack.smx
    L 05/22/2017 - 01:09:41: [SM] Call stack trace:
    L 05/22/2017 - 01:09:41: [SM] [0] KillTimer
    L 05/22/2017 - 01:09:41: [SM] [1] Line 459, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
    L 05/22/2017 - 01:09:41: [SM] [3] FakeClientCommand
    L 05/22/2017 - 01:09:41: [SM] [4] Line 3011, /home/forums/content/files/9/7/2/5/7/162900.attach::CheatCommand
    L 05/22/2017 - 01:09:41: [SM] [5] Line 371, /home/forums/content/files/9/7/2/5/7/162900.attach::AutoItemRefill
    L 05/22/2017 - 018:09: Error log file session closed.
    L 05/22/2017 - 01:436: SourceMod error session started
    L 05/22/2017 - 01:436: Info (map "c5m1_waterfront") (file "errors_20170522.log")
    L 05/22/2017 - 01:436: [SM] Exception reported: Invalid timer handle e3830846 (error 3)
    L 05/22/2017 - 01:436: [SM] Blaming: l4d2_backpack.smx
    L 05/22/2017 - 01:436: [SM] Call stack trace:
    L 05/22/2017 - 01:436: [SM] [0] KillTimer
    L 05/22/2017 - 01:436: [SM] [1] Line 489, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
    L 05/22/2017 - 01:436: [SM] [3] FireEvent
    L 05/22/2017 - 01:436: [SM] [4] Line 1656, /home/forums/content/files/8/5/7/7/8/101316.attach::FireEventsFootlocker
    L 05/22/2017 - 01:436: [SM] [5] Line 1624, /home/forums/content/files/8/5/7/7/8/101316.attach::tmrAutoGrab
    L 05/22/2017 - 01:47:23: Error log file session closed.
    L 05/22/2017 - 01:48:00: SourceMod error session started
    Thanks for the report, this error may be difficult to narrow down. I need more info...does the plugin stop working...if you could describe in detail what happens in game that would be great. I've yet to get any errors with the plugin myself. There is one possibility, do you use any plugins that blocks or removes the cheat flag from the give command to players. Specifically Left 4 Dead Build Enabler?
    MasterMind420 is offline
    Krufftys Killers
    Senior Member
    Join Date: Jan 2014
    Old 05-22-2017 , 08:49   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #4

    I think It's https://forums.alliedmods.net/showthread.php?t=129603 Fort Spawner I also have it on another server that not putting out errors .
    I'll try removeing Fort Spawner from kruffty's killer and test again .
    Krufftys Killers is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 05-22-2017 , 08:52   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #5

    Quote:
    Originally Posted by Krufftys Killers View Post
    I think It's https://forums.alliedmods.net/showthread.php?t=129603 Fort Spawner I also have it on another server that not putting out errors .
    I'll try removeing Fort Spawner from kruffty's killer and test again .
    ok, yah sadly this plugin won't work correctly or may put out errors if any plugin on the server changes flags on the give command or blocks it altogether, i'll update the the post to reflect that.
    MasterMind420 is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 05-22-2017 , 13:02   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #6

    Here my IsThirdPerson bool is more updated and has better support for local servers.

    PHP Code:
    static bool:IsSurvivorThirdPerson(iClient
    {
        
    //if(bThirdPerson[iClient])
            //return true;
        
    if(GetEntPropFloat(iClientProp_Send"m_TimeForceExternalView") > GetGameTime())
            return 
    true;
        if(
    GetEntProp(iClientProp_Send"m_iObserverMode") == 1)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_pummelAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_carryAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_pounceAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_jockeyAttacker") > 0)
            return 
    true
        if(
    GetEntProp(iClientProp_Send"m_isHangingFromLedge") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_reviveTarget") > 0)
            return 
    true;  
        if(
    GetEntPropFloat(iClientProp_Send"m_staggerTimer"1) > -1.0)
            return 
    true
        switch(
    GetEntProp(iClientProp_Send"m_iCurrentUseAction"))
        {
            case 
    1:
            {
                static 
    iTarget;
                
    iTarget GetEntPropEnt(iClientProp_Send"m_useActionTarget");
                
                if(
    iTarget == GetEntPropEnt(iClientProp_Send"m_useActionOwner"))
                    return 
    true;
                else if(
    iTarget != iClient)
                    return 
    true;
            }
            case 
    4678910:
                return 
    true;
        }
        
        static 
    String:sModel[31];
        
    GetEntPropString(iClientProp_Data"m_ModelName"sModelsizeof(sModel));
        
        switch(
    sModel[29])
        {
            case 
    'b'://nick
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    626625624623622621661662664665666667668670671672673674620680:
                        return 
    true;
                }
            }
            case 
    'd'://rochelle
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    674678679630631632633634668677681680676675673672671670687629:
                        return 
    true;
                }
            }
            case 
    'c'://coach
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    656622623624625626663662661660659658657654653652651621620669:
                        return 
    true;
                }
            }
            case 
    'h'://ellis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    625675626627628629630631678677676575674673672671670669668667666665684:
                        return 
    true;
                }
            }
            case 
    'v'://bill
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    528759763764529530531532533534753676675761758757756755754527772762:
                        return 
    true;
                }
            }
            case 
    'n'://zoey
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    537819823824538539540541542543813828825822821820818817816815814536809:
                        return 
    true;
                }
            }
            case 
    'e'://francis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    532533534535536537769768767766765764763762761760759758757756531530775:
                        return 
    true;
                }
            }
            case 
    'a'://louis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    529530531532533534766765764763762761760759758757756755754753527772528:
                        return 
    true;
                }
            }
            case 
    'w'://adawong
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                case 
    674678679630631632633634668677681680676675673672671670687629:
                        return 
    true;
                }
            }
        }
        
        return 
    false;

    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 05-22-2017 at 13:04.
    Lux is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 05-22-2017 , 13:20   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #7

    Quote:
    Originally Posted by Lux View Post
    Here my IsThirdPerson bool is more updated and has better support for local servers.

    PHP Code:
    static bool:IsSurvivorThirdPerson(iClient
    {
        
    //if(bThirdPerson[iClient])
            //return true;
        
    if(GetEntPropFloat(iClientProp_Send"m_TimeForceExternalView") > GetGameTime())
            return 
    true;
        if(
    GetEntProp(iClientProp_Send"m_iObserverMode") == 1)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_pummelAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_carryAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_pounceAttacker") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_jockeyAttacker") > 0)
            return 
    true
        if(
    GetEntProp(iClientProp_Send"m_isHangingFromLedge") > 0)
            return 
    true;
        if(
    GetEntPropEnt(iClientProp_Send"m_reviveTarget") > 0)
            return 
    true;  
        if(
    GetEntPropFloat(iClientProp_Send"m_staggerTimer"1) > -1.0)
            return 
    true
        switch(
    GetEntProp(iClientProp_Send"m_iCurrentUseAction"))
        {
            case 
    1:
            {
                static 
    iTarget;
                
    iTarget GetEntPropEnt(iClientProp_Send"m_useActionTarget");
                
                if(
    iTarget == GetEntPropEnt(iClientProp_Send"m_useActionOwner"))
                    return 
    true;
                else if(
    iTarget != iClient)
                    return 
    true;
            }
            case 
    4678910:
                return 
    true;
        }
        
        static 
    String:sModel[31];
        
    GetEntPropString(iClientProp_Data"m_ModelName"sModelsizeof(sModel));
        
        switch(
    sModel[29])
        {
            case 
    'b'://nick
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    626625624623622621661662664665666667668670671672673674620680:
                        return 
    true;
                }
            }
            case 
    'd'://rochelle
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    674678679630631632633634668677681680676675673672671670687629:
                        return 
    true;
                }
            }
            case 
    'c'://coach
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    656622623624625626663662661660659658657654653652651621620669:
                        return 
    true;
                }
            }
            case 
    'h'://ellis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    625675626627628629630631678677676575674673672671670669668667666665684:
                        return 
    true;
                }
            }
            case 
    'v'://bill
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    528759763764529530531532533534753676675761758757756755754527772762:
                        return 
    true;
                }
            }
            case 
    'n'://zoey
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    537819823824538539540541542543813828825822821820818817816815814536809:
                        return 
    true;
                }
            }
            case 
    'e'://francis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    532533534535536537769768767766765764763762761760759758757756531530775:
                        return 
    true;
                }
            }
            case 
    'a'://louis
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                    case 
    529530531532533534766765764763762761760759758757756755754753527772528:
                        return 
    true;
                }
            }
            case 
    'w'://adawong
            
    {
                switch(
    GetEntProp(iClientProp_Send"m_nSequence"))
                {
                case 
    674678679630631632633634668677681680676675673672671670687629:
                        return 
    true;
                }
            }
        }
        
        return 
    false;

    Thanks a lot man, much appreciated...
    MasterMind420 is offline
    Emilio3
    Member
    Join Date: Aug 2013
    Location: London UK
    Old 05-23-2017 , 01:09   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #8


    can you fix to coach the set parent because the backpack spawning in the top weapon and when i use ThirdPerson i not see my backpack but i can see in player and bot the backpack

    Last edited by Emilio3; 05-23-2017 at 01:20.
    Emilio3 is offline
    JohnnyDave255
    Member
    Join Date: May 2017
    Location: Philippines
    Old 05-23-2017 , 05:16   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #9

    Nice plugin. Will try to test this and find the bugs.
    __________________
    https://forums.alliedmods.net/signaturepics/sigpic279390_1.gif
    >>>Johnny Dave<<<
    JohnnyDave255 is offline
    MasterMind420
    BANNED
    Join Date: Nov 2010
    Old 05-23-2017 , 06:48   Re: [L4D2] Oshroth's Backpack
    Reply With Quote #10

    Quote:
    Originally Posted by Emilio3 View Post

    can you fix to coach the set parent because the backpack spawning in the top weapon and when i use ThirdPerson i not see my backpack but i can see in player and bot the backpack
    That specific problem has to do with the skin your using, try it with the default character skin or another skin that actually works and you'll see what I mean...
    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 18:41.


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