Raised This Month: $120 Target: $400
 30% 

TF2 Build Restrictions 0.5.5 (Updated 07/23/10)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Plugin ID:
436
Plugin Version:
0.5.5
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    109 
    Plugin Description:
    Restrict buildings in TF2.
    Old 06-23-2008 , 08:16   TF2 Build Restrictions 0.5.5 (Updated 07/23/10)
    Reply With Quote #1

    This plugin restricts the amount of buildings players can build. This is useful if you have modified MaxObjects in objects.txt to a higher number, so players can build more than 1 sentry, dispenser, etc. Since modifying objects.txt needs a server restart, this plugin will restrict the amount of buildings on the fly.

    For this to work you obviously have to modify MaxObjects in objects.txt to the maximum amount of buildings you'll ever want a single player to have. Also, players will have to bind keys to "build 0-3". The cvars are:

    sm_buildrestrict_enabled (0/1, default 1)
    Enable/disable restricting buildings in TF2.

    sm_buildrestrict_immunity (0/1, default 0)
    Enable/disable admin immunity for restricting buildings in TF2.

    sm_buildrestrict_blu_dispensers
    sm_buildrestrict_blu_sentries

    sm_buildrestrict_blu_teleport_entrances
    sm_buildrestrict_blu_teleport_exits

    Limits for Blu buildings in TF2. (number of buildings a player can build. Default 1)

    sm_buildrestrict_red_dispensers
    sm_buildrestrict_red_sentries

    sm_buildrestrict_red_teleport_entrances
    sm_buildrestrict_red_teleport_exits

    Limits for Red buildings in TF2.

    You can put any of these cvars in server.cfg or sourcemod.cfg, and then if you want map specific cvars you can make a file called mapname.cfg (for example cp_dustbowl.cfg) and put those cvars in there.

    Changelog
    • 0.5.5
      • Fixed teleporter entrances and exits.
    • 0.5
      • Worked around a Valve bug that still allowed people to build more buildings than the limit.
    • 0.4
      • Really fixed admin immunity now.
    • 0.3.5
      • Fixed limit 0 not working.
      • Fixed typo in build command description.
      • Attempted to fix admin immunity.
    • 0.3
      • Simplified the plugin, fixed bugs.
      • Added admin immunity.
    • 0.2
      • Initial release.
    Attached Files
    File Type: sp Get Plugin or Get Source (buildrestrict.sp - 6889 views - 4.6 KB)
    __________________

    Last edited by DJ Tsunami; 07-23-2010 at 08:31.
    DJ Tsunami is offline
    r3dh3adkid
    Senior Member
    Join Date: Apr 2008
    Location: Georgia
    Old 06-23-2008 , 23:47   Re: TF2 Build Restrictions
    Reply With Quote #2

    Can I have your babies now or later?

    I love this plugin, but i'm getting an error:
    Code:
    L 06/23/2008 - 15:26:49: [SM] Plugin encountered error 15: Array index is out of bounds
    L 06/23/2008 - 15:26:49: [SM] Debug mode is not enabled for "buildrestrict.smx"
    L 06/23/2008 - 15:26:49: [SM] To enable debug mode, edit plugin_settings.cfg, or type: sm plugins debug 29 on
    Worked great until until my server crashed. Dunno if it was related with this or not.
    __________________

    Last edited by r3dh3adkid; 06-23-2008 at 23:55.
    r3dh3adkid is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 06-24-2008 , 02:21   Re: TF2 Build Restrictions
    Reply With Quote #3

    Enable debug mode in plugin settings.cfg by changing it from no to yes. Then post what it says, much more helpful.
    __________________

    DontWannaName is offline
    r3dh3adkid
    Senior Member
    Join Date: Apr 2008
    Location: Georgia
    Old 06-24-2008 , 03:35   Re: TF2 Build Restrictions
    Reply With Quote #4

    Whoops, sorry should have thought to do that!

    Here you go:
    Code:
    L 06/24/2008 - 02:30:18: [SM] Plugin encountered error 15: Array index is out of bounds
    L 06/24/2008 - 02:30:18: [SM] Displaying call stack trace for plugin "buildrestrict.smx":
    L 06/24/2008 - 02:30:18: [SM]   [0]  Line 80, /home/groups/alliedmodders/forums/files/3/4/6/6/8/27975.attach::Event_ObjectBuilt()
    Also i'm having a weird problem where I cant build my teleporter exit randomly...sometimes it may do it but other times it may not do it.

    I have it set to only allow 1 exit period so I dunno why its not letting me. It still shows up in the menu as being available but I cant place it.
    __________________
    r3dh3adkid is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Old 06-24-2008 , 05:13   Re: TF2 Build Restrictions
    Reply With Quote #5

    That might have to do with that error. What it does is block the whole command if you've reached the limit, so apparently it thinks you reached the limit while in fact you haven't. Nothing I've noticed while I was testing though. And unfortunately I'm quite busy at the moment, so I'm not sure when I'll be able to take a look at it.
    __________________
    DJ Tsunami is offline
    r3dh3adkid
    Senior Member
    Join Date: Apr 2008
    Location: Georgia
    Old 06-24-2008 , 14:04   Re: TF2 Build Restrictions
    Reply With Quote #6

    Pfft, take your time. Its not really a big problem.

    I also found another error while in debug.

    Code:
    L 06/24/2008 - 03:10:01: [SM] Plugin encountered error 15: Array index is out of bounds
    L 06/24/2008 - 03:10:01: [SM] Displaying call stack trace for plugin "buildrestrict.smx":
    L 06/24/2008 - 03:10:01: [SM]   [0]  Line 93, /home/groups/alliedmodders/forums/files/3/4/6/6/8/27975.attach::Event_ObjectDestroyed()
    __________________
    r3dh3adkid is offline
    Zyreal
    Junior Member
    Join Date: Jun 2008
    Old 06-29-2008 , 01:14   Re: TF2 Build Restrictions
    Reply With Quote #7

    Awesome job, I'll be checking it often for when you enable an admin only version. Something just tied to the cheat command or somesuch. I'm not a coder, but possibly just have the restrictions work on everyone except the people with the admin cheat flag? - Zy
    Zyreal is offline
    FunTF2Server
    Veteran Member
    Join Date: Apr 2008
    Old 06-29-2008 , 05:13   Re: TF2 Build Restrictions
    Reply With Quote #8

    fyi this plugin no longer works on team fortress 2 with the new pyro update. It causes players to disconnect when they spawn for some reason. I removed the plugin and it fixed the problem, and tested several times.

    this also does not work for the game Zombie Panic: Source, no crashing on that game, just plain doesn't change the game name.

    can you at least make this plugin work for TF2 again? thx
    __________________
    FunTF2Server is offline
    r3dh3adkid
    Senior Member
    Join Date: Apr 2008
    Location: Georgia
    Old 06-29-2008 , 14:02   Re: TF2 Build Restrictions
    Reply With Quote #9

    @ FunTF2Server

    Pyro update came out the 19th, this thread was started on the 23rd. I dont think the pyro update broke it. One of the updates after the pyro weapons may have broke it. Also, this does work or atleast it i've got it to work for me....sometimes :-P

    @ DJ Tsunami

    What folder do the maps specific configs go in? I tried doing it with Map Cvar Automater but that didn't seem to work.
    __________________
    r3dh3adkid is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 06-29-2008 , 14:08   Re: TF2 Build Restrictions
    Reply With Quote #10

    /cfg/mapname.cfg. No plugin required.

    (ex: /cfg/cp_dustbowl.cfg)
    bl4nk 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 05:11.


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