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

[TF2] Weapon Restrictions


Post New Thread Reply   
 
Thread Tools Display Modes
DronElektron
Junior Member
Join Date: Jun 2011
Location: Russia, Moscow
Old 06-19-2014 , 11:13   Re: [TF2] Weapon Restrictions
Reply With Quote #21

Very nice plugin, work's good
__________________

Last edited by DronElektron; 06-19-2014 at 19:41.
DronElektron is offline
Donski
Senior Member
Join Date: Sep 2012
Old 06-20-2014 , 10:37   Re: [TF2] Weapon Restrictions
Reply With Quote #22

What does this error mean?

Code:
L 06/20/2014 - 10:29:30: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 732
Donski is offline
DronElektron
Junior Member
Join Date: Jun 2011
Location: Russia, Moscow
Old 06-20-2014 , 12:47   Re: [TF2] Weapon Restrictions
Reply With Quote #23

Code:
// This doesn't actually work on non-bots, but in case Valve fixes it later...
public Action:BuilderSpawn(entity)
{
    new owner = GetEntPropEnt(entity, Prop_Send, "m_hOwnerEntity");
    if (owner < 1 || owner > MaxClients)
    {
        LogError("Invalid owner %d for tf_weapon_builder %d", owner, entity);
        return Plugin_Continue;
    }
Valve likes to break some stuff actually, so I think this error can be skipped, because troubles not in plugin...

p.s. I see it too in logs, so don't care
Code:
L 06/20/2014 - 19:31:25: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 370
L 06/20/2014 - 19:31:25: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 370
L 06/20/2014 - 19:31:27: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 374
L 06/20/2014 - 19:31:27: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 374
L 06/20/2014 - 20:11:36: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 253
L 06/20/2014 - 20:11:36: [tf2-weapon-restrictions.smx] Invalid owner -1 for tf_weapon_builder 253
__________________
DronElektron is offline
Donski
Senior Member
Join Date: Sep 2012
Old 06-20-2014 , 12:56   Re: [TF2] Weapon Restrictions
Reply With Quote #24

It's not working though I wanted to block the Base Jumper, so I made a cfg called basejumper.cfg and did weaponrestrict basejumper. Nop.
Donski is offline
DronElektron
Junior Member
Join Date: Jun 2011
Location: Russia, Moscow
Old 06-20-2014 , 13:02   Re: [TF2] Weapon Restrictions
Reply With Quote #25

Hm, this is my file "jump.cfg" and all works fine
Code:
"weapon_restrictions"
{
    "name"                "Jump restrictions"
    "default"            "allow"

    "allow_buildings"        "1"
    "allow_action_items"    "1"

    "indexes"
    {
        "127"
        {
            "name"        "The Direct Hit"
            "deny"        "1"
        }

        "228"
        {
            "name"        "The Black Box"
            "deny"        "1"
        }

        "1085"
        {
            "name"        "Festive Black Box"
            "deny"        "1"
        }

        "414"
        {
            "name"        "The Liberty Launcher"
            "deny"        "1"
        }

        "441"
        {
            "name"        "The Cow Mangler 5000"
            "deny"        "1"
        }

        "513"
        {
            "name"        "The Original"
            "deny"        "1"
        }

        "730"
        {
            "name"        "The Beggar's Bazooka"
            "deny"        "1"
        }

        "1101"
        {
            "name"        "The B.A.S.E. Jumper"
            "deny"        "1"
        }

        "1104"
        {
            "name"        "The Air Strike"
            "deny"        "1"
        }

        "131"
        {
            "name"        "The Chargin' Targe"
            "deny"        "1"
        }

        "130"
        {
            "name"        "The Scottish Resistance"
            "deny"        "1"
        }

        "265"
        {
            "name"        "Stickybomb Jumper"
            "deny"        "1"
        }

        "307"
        {
            "name"        "The Ullapool Caber"
            "deny"        "1"
        }

        "406"
        {
            "name"        "The Splendid Screen"
            "deny"        "1"
        }

        "996"
        {
            "name"        "The Loose Cannon"
            "deny"        "1"
        }
    }
}
And in server.cfg I have:
Code:
weaponrestrict "jump"
__________________

Last edited by DronElektron; 06-20-2014 at 13:04.
DronElektron is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-20-2014 , 13:26   Re: [TF2] Weapon Restrictions
Reply With Quote #26

*slow clap*

Apparently Valve has taken to spawning Construction PDAs and Sappers without setting their owners first.

I'll probably just remove that block since it doesn't work on real players anyway... only bots actually obey the build restrictions and players are handled separately because of it.

Also, I meant to get back to this plugin... trying to figure out a better way of swapping weapons back with their base versions.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Donski
Senior Member
Join Date: Sep 2012
Old 06-20-2014 , 19:57   Re: [TF2] Weapon Restrictions
Reply With Quote #27

As of recent update this plugin caused engineers not being able to build. (or was it just my config)

The menu shows up but you can't build.
Donski is offline
TheDJGr33n
Junior Member
Join Date: Apr 2014
Old 06-22-2014 , 07:45   Re: [TF2] Weapon Restrictions
Reply With Quote #28

Quote:
Originally Posted by Donski View Post
As of recent update this plugin caused engineers not being able to build. (or was it just my config)

The menu shows up but you can't build.
I think I have managed to fix it on my server by removing the buildings sections and recompiling, I have included the recompiled version in the attatchments of this post. It seems it was registering the owner of every building as invalid, this even got rid of the sentry on jump_littleman.
Attached Files
File Type: smx tf2-weapon-restrictions.smx (15.2 KB, 199 views)

Last edited by TheDJGr33n; 06-22-2014 at 07:53. Reason: Forgot to give reason for recompile.
TheDJGr33n is offline
arthurdead
Senior Member
Join Date: Jul 2013
Old 06-22-2014 , 13:58   Re: [TF2] Weapon Restrictions
Reply With Quote #29

Quote:
Originally Posted by TheDJGr33n View Post
I think I have managed to fix it on my server by removing the buildings sections and recompiling, I have included the recompiled version in the attatchments of this post. It seems it was registering the owner of every building as invalid, this even got rid of the sentry on jump_littleman.
post source
arthurdead is offline
TheDJGr33n
Junior Member
Join Date: Apr 2014
Old 06-22-2014 , 17:35   Re: [TF2] Weapon Restrictions
Reply With Quote #30

Quote:
Originally Posted by arthurdead View Post
post source
Sorry, forgot about that. Literally all I've done is removed the sections that checked for engi builds, someone listed it a few posts up.
Attached Files
File Type: sp Get Plugin or Get Source (tf2-weapon-restrictions.sp - 148 views - 12.8 KB)
TheDJGr33n 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 16:34.


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