jump.tf Forums
Welcome B)

Time Limit Extend

SimplyJpk

  • Newbie
  • *
    • Posts: 13
    • Frags: +0/-0
  • Just Jump ~ Owner
    • View Profile
TimeLimit Extend Version: 0.8.1

I run a fairly large Casual TF2 server in Australia, quite often people want to extend the map in the last moments before a map change, or for other reasons.  This gives players a chance to use '!time +' or '!time -' as a means to add a bit of time to the server.

People can still use rtv so, even if good amount of people want an extra couple mins. The even greater number will dominate them just using rtv.

Originally it was a fairly basic plugin, but for what ever reason i had a couple other servers asking if they could have access to the plugin, asked server how they felt. They said it wouldn't be bad, blah blah. Here it is. I've tried to improve the code, clean it up a bit and make the overall functionality of it much better..

I'm not that great at SourceMod, only been dabling in it for a few months now. Background experience in a few other languages though.

If you see anything wrong in the source, let me know I'll fix it up. This really was a quick edit to make it look a bit better for public use. So there may be a few small bugs. (Nothing serious)

Commands
sm_time +/-
sm_mapextend +/-

Example: !time + (Would extend the map by the Cvar's value)

Convars
tl_addtime : Float (1.0 Default) : When adding time with +, it'll add by this much (In minutes) ie 0.5 being 30 seconds
tl_remtime Float (1.0 Default) : When removing time with -, it'll remove this much (In minutes) ie 0.5 being 30 seconds
tl_stopbelow : int (120 Default) : Once time limit is below so much, It won't accept the commands
tl_multply Float (1.0 Default) : It will multiply the add/rem time by this much for Admins or Donors (Set as Flag b/a Respectively)
tl_display : String[24](MapExtend Default) : What the starting tag displays ie: "[MapExtend] 60 Seconds have been removed."

Known Problems
As far as I've been able to work out the time limit is defined by whole numbers, so if you have mp_timelimit at 30, and you + 0.5 minutes, nothing happens, but if you - 0.5 minutes, you lose an entire minute. There seems to be functionality in sourcemod to get around this. But I didn't bother since it was a private plugin. Next chance I get I'll fiddle around and see if seconds are a doable thing. c:

Tips
I've used this plugin for over a month now. For larger jump servers, I'd set the values lower.. I have 30 seconds per user, 60 for admin/Donor for adding (2.0x Multiplier) and 0.35 for remtime, which is 21 seconds, 42 for donor to be removed.

For a smaller server, larger values might be ideal Since your player base is more likely to want to keep doing the thing they're doing, instead of being forced to another map.

Thanks
Hope it is of some use to you guys, If you have any suggestions throw them down. Might have a shot. Source and Compiled version can be found attached to the thread.

timelimit_extend.smx
timelimit_extend.sp
(For what ever reason, I couldn't attach the files to the Thread, Links to my website instead)

Stay Awesome,
Jpk.
« Last Edit: June 25, 2015, 06:45:12 AM by SimplyJpk »