AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Time limit enforcer (https://forums.alliedmods.net/showthread.php?t=82726)

strontiumdog 12-28-2008 21:07

Time limit enforcer
 
1 Attachment(s)
What it does
Some maps such as cp_toy_fort or
ctf_snofort_final continually extend the map beyond the alloted time limit.
This plugin forces the map to change to the next map once the time limit is reached.

Requirements
nextmap.smx

Installation
  • Copy sm_forcetimelimit.smx to addons/sourcemod/plugins
  • Add sm_forcetimelimit_enable 1 to each map config that you want to force the map to obey the time limit
Configuration
  • sm_forcetimelimit_enable 1
    default: 0

    When 1, forces a map to obey the time limit set
Notes
Has been tested with TF2 but should work with other mods.


Changelog
v1.1.100
SourceMod release

v1.1.200
Fixed a stupid bug where plugin failed to recognize whether it was on or off

v1.1.201
Fixed minor bug

v.1.1.202
Changed method of ending the map

V.1.1.203
Small bug fixes

v1.1.203b3
Updated version by Bacardi and Stoone
see post: https://forums.alliedmods.net/showpo...5&postcount=57

bl4nk 12-29-2008 01:29

Re: Time limit enforcer
 
http://forums.alliedmods.net/showthread.php?p=508233 ?

strontiumdog 12-29-2008 02:16

Re: Time limit enforcer
 
Team06's version doesn't work in TF2.

This one uses a different method of ending the map and does not require SDK calls.
It also takes into account if the map gets extended.

BrutalGoerge 12-29-2008 04:16

Re: Time limit enforcer
 
i remember asking for this a long while ago. glad it got done. :)

SuperShadow 12-30-2008 07:40

Re: Time limit enforcer
 
Could you please post a link to the compiled version? I'd really like to add this to my TF2 server.

I'm getting "Plugin failed to compile! Please try contacting the author." when clicking Get Plugin.
I also have no luck with compiling on my computer:
Code:

//SourceMod Batch Compiler
// by the SourceMod Dev Team
// Could not find spcomp.exe
Press enter to exit ...

And when renaming spcomp to spcomp.exe:
Code:

//SourceMod Batch Compiler
// by the SourceMod Dev Team
 
//// sm_forcetimelimit.sp
// Internal error.
Press enter to exit ...

Through the on-line compiler:
Code:

SourcePawn Compiler 1.0.4
Copyright (c) 1997-2006, ITB CompuPhase, (C)2004-2008 AlliedModders, LLC
 
/home/groups/sourcemod/upload_tmp/phpHAxVW1.sp(122) : error 017: undefined symbol "GetNextMap"
/home/groups/sourcemod/upload_tmp/phpHAxVW1.sp(122) : error 092: number of arguments does not match definition
/home/groups/sourcemod/upload_tmp/phpHAxVW1.sp(135) : error 017: undefined symbol "GetNextMap"
/home/groups/sourcemod/upload_tmp/phpHAxVW1.sp(135) : error 092: number of arguments does not match definition
/home/groups/sourcemod/upload_tmp/phpHAxVW1.sp(136) : error 017: undefined symbol "ForceChangeLevel"

The server is Linux running the newly released 1.1. My machine is running Windows XP.

Thanks Strontiumdog, I really love your work!

strontiumdog 12-30-2008 19:32

Re: Time limit enforcer
 
1 Attachment(s)
Ah crap.
I wrote it using SM1.1 commands....GetNextMap and ForceChangeLevel are SM1.1

The forum compiler is still 1.04, I think.

Either
Download SM1.1

Or if you want, you can try the compiled version below.

SuperShadow 12-30-2008 23:13

Re: Time limit enforcer
 
Thanks Strontiumdog, there's so much to remember with all of this, it's a wonder more of our heads haven't exploded.

dekken 02-22-2009 06:05

Re: Time limit enforcer
 
thanks mate! i was looking for this exactly...works great in TF2 :)
cheers

SuperShadow 02-24-2009 10:58

Re: Time limit enforcer
 
Strontiumdog, I've tried this plugin a couple of times on my TF2 servers. Whenever it is installed, all maps just end when the timelimit (mp_timelimit "30") is reached.

The default behavior on our servers without the plugin is that pl maps continue to the end of a round, ctf maps will go into overtime if an intell is out of it's starting position and cp maps will continue until a cap point is a solid color.

Since the default value for sm_forcetimelimit_enable is 0, I would expect that just putting the plugin on the server should not change the behavior describe above. Instead, with the plugin installed, when 30 mintues are up, no end of map scoreboard just bang map change.

I've tried putting sm_forcetimelimit_enable "0" into both the server.cfg and sourcemod.cfg files (seperately and at the same time, just to ensure it's getting read). Still after 30 minutes it's immediate map change.

I've created map specific configs in the /cfgs folder with the correct map names for toyfort, snofort, cyberpunk and mario_kart. The only thing they contain is sm_forcetimelimit_enable "1". This really doesn't matter since all maps end with the plugin installed, but at least these don't go forever. :)

I've been a programmer for years in other languages, but just starting to look at SM code. I was wondering, should there be an if (g_Enable) statement in all of the public functions, or at least in the MapChange one? I really don't know enough about timers yet to grasp if this would matter.

When you get a chance, could you please check into this? I'm a fan of a lot of your work and I'd really like to have this one kill the endless maps, but leave the others alone. Thanks!

strontiumdog 02-27-2009 23:15

Re: Time limit enforcer
 
Oh God. Thanks for pointing out the bug.

No. It wasn't that.
g_enable is a handle, and I was trying to find if the handle == 1... *sigh*

I should have done
Code:
if (GetConVarInt(g_enable) == 1)

New version uploaded.


All times are GMT -4. The time now is 05:23.

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