AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D2] Oshroth's Backpack (https://forums.alliedmods.net/showthread.php?t=297678)

MasterMind420 05-20-2017 19:39

[L4D2] Oshroth's Backpack
 
1 Attachment(s)
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

Krufftys Killers 05-22-2017 06:19

Re: [L4D2] Oshroth's Backpack
 
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 - 01:38:09: Error log file session closed.
L 05/22/2017 - 01:43:36: SourceMod error session started
L 05/22/2017 - 01:43:36: Info (map "c5m1_waterfront") (file "errors_20170522.log")
L 05/22/2017 - 01:43:36: [SM] Exception reported: Invalid timer handle e3830846 (error 3)
L 05/22/2017 - 01:43:36: [SM] Blaming: l4d2_backpack.smx
L 05/22/2017 - 01:43:36: [SM] Call stack trace:
L 05/22/2017 - 01:43:36: [SM] [0] KillTimer
L 05/22/2017 - 01:43:36: [SM] [1] Line 489, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
L 05/22/2017 - 01:43:36: [SM] [3] FireEvent
L 05/22/2017 - 01:43:36: [SM] [4] Line 1656, /home/forums/content/files/8/5/7/7/8/101316.attach::FireEventsFootlocker
L 05/22/2017 - 01:43:36: [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

MasterMind420 05-22-2017 07:39

Re: [L4D2] Oshroth's Backpack
 
Quote:

Originally Posted by Krufftys Killers (Post 2522242)
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 - 01:38:09: Error log file session closed.
L 05/22/2017 - 01:43:36: SourceMod error session started
L 05/22/2017 - 01:43:36: Info (map "c5m1_waterfront") (file "errors_20170522.log")
L 05/22/2017 - 01:43:36: [SM] Exception reported: Invalid timer handle e3830846 (error 3)
L 05/22/2017 - 01:43:36: [SM] Blaming: l4d2_backpack.smx
L 05/22/2017 - 01:43:36: [SM] Call stack trace:
L 05/22/2017 - 01:43:36: [SM] [0] KillTimer
L 05/22/2017 - 01:43:36: [SM] [1] Line 489, /home/forums/content/files/9/7/2/5/7/162900.attach::Event_ItemPickup
L 05/22/2017 - 01:43:36: [SM] [3] FireEvent
L 05/22/2017 - 01:43:36: [SM] [4] Line 1656, /home/forums/content/files/8/5/7/7/8/101316.attach::FireEventsFootlocker
L 05/22/2017 - 01:43:36: [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?

Krufftys Killers 05-22-2017 08:49

Re: [L4D2] Oshroth's Backpack
 
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 .

MasterMind420 05-22-2017 08:52

Re: [L4D2] Oshroth's Backpack
 
Quote:

Originally Posted by Krufftys Killers (Post 2522256)
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.

Lux 05-22-2017 13:02

Re: [L4D2] Oshroth's Backpack
 
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;



MasterMind420 05-22-2017 13:20

Re: [L4D2] Oshroth's Backpack
 
Quote:

Originally Posted by Lux (Post 2522310)
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...

Emilio3 05-23-2017 01:09

Re: [L4D2] Oshroth's Backpack
 
http://uksymbyosys.tk/picture1.jpg
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

JohnnyDave255 05-23-2017 05:16

Re: [L4D2] Oshroth's Backpack
 
Nice plugin. Will try to test this and find the bugs.

MasterMind420 05-23-2017 06:48

Re: [L4D2] Oshroth's Backpack
 
Quote:

Originally Posted by Emilio3 (Post 2522439)
http://uksymbyosys.tk/picture1.jpg
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...


All times are GMT -4. The time now is 12:02.

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