AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   TF2 Build Restrictions 0.5.5 (Updated 07/23/10) (https://forums.alliedmods.net/showthread.php?t=73127)

DJ Tsunami 06-23-2008 07:16

TF2 Build Restrictions 0.5.6 (Updated 2020/08/05)
 
9 Attachment(s)
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.

r3dh3adkid 06-23-2008 22:47

Re: TF2 Build Restrictions
 
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.

DontWannaName 06-24-2008 01:21

Re: TF2 Build Restrictions
 
Enable debug mode in plugin settings.cfg by changing it from no to yes. Then post what it says, much more helpful.

r3dh3adkid 06-24-2008 02:35

Re: TF2 Build Restrictions
 
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.

DJ Tsunami 06-24-2008 04:13

Re: TF2 Build Restrictions
 
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.

r3dh3adkid 06-24-2008 13:04

Re: TF2 Build Restrictions
 
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()


Zyreal 06-29-2008 00:14

Re: TF2 Build Restrictions
 
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

FunTF2Server 06-29-2008 04:13

Re: TF2 Build Restrictions
 
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

r3dh3adkid 06-29-2008 13:02

Re: TF2 Build Restrictions
 
@ 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.

bl4nk 06-29-2008 13:08

Re: TF2 Build Restrictions
 
/cfg/mapname.cfg. No plugin required.

(ex: /cfg/cp_dustbowl.cfg)


All times are GMT -4. The time now is 16:18.

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