[SourceMod] Freeze Time 1.0.0.3

This Section is all about Coding in C/C++ / Lua / SourcePawn for now...
Post Reply
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

[SourceMod] Freeze Time 1.0.0.3

Post by TESLA-X4 »

Despite what its name seems to imply, this plugin does not do bullettime. Instead, what it actually does is freeze players at the beginning of a map to prevent players who join earlier rushing ahead without waiting for the rest (a concept originating from CS:S). Once the freeze time has expired, players will be able to move normally again. The freeze time is dynamic - it varies according to the number of connecting players (clamped to 60 seconds if exceeding). While the freeze time is active, players will see a countdown showing the remaining time before expiry.

Configuration:
/sourcemod/configs/freezetime.cfg: Automatically generated on initial plugin load, use it to set which maps should have freeze times. Instructions are included in this file.

Commands & Console Variables:
None (only version ConVar).

Dependencies:
None.

Installation:
- Place freezetime.smx into the /sourcemod/plugins directory.
- Place freezetime.phrases.txt into the /sourcemod/translations directory.

Changelog:

Code: Select all

Version 1.0.0.3
-----------------------
! Fixed timer counts sometimes turning negative (hopefully! Damned static variables causing issues)
- Removed player render effects due to model issues
+ Added checks for timer validity

Version 1.0.0.2
-----------------------
! Fixed Timer_Unfreeze() acting on dead/spectating players when it should not
+ Added default maps: oc_breakout, oc_cardwar, oc_courier
+ Added support for translations
+ Added textual feedback for players who are unable to spawn (since the countdown panel does not appear for dead/spectating players)

Version 1.0.0.1
-----------------------
Initial (public) release
+ Added a configuration file to enable configuring which maps will have freeze times

Version 1.0.0
-----------------------
Initial (private) release
Notes:
In case you haven't already noticed, this is a plugin for server operators, not clients.
Because I was only able to test this on a server with bots, certain events may not be handled by the code.

Known Bugs/Limitations:
- Because players are unable to clear their spawn points, it may cause the game to keep other players in spectator mode until the freeze time expires and the players move from their spawns. No longer a valid issue in the OC hotfix (unreleased at time of writing) and in the next release.
- If there is only one player on the server, they will still see a message informing them that they are frozen to wait for other players, despite the freeze time being inactive.
- The freeze time penalty cannot be changed without incurring further modifications to the code and a recompile (i.e. it's hardcoded).

Download:
Get Plugin or Get Source
Browse all released versions here.
Last edited by TESLA-X4 on Thu Aug 09, 2012 3:12 am, edited 4 times in total.
Reason: 1.0.0.3 Update
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
LivingWithGames
npc_helicopter
npc_helicopter
Posts: 932
Joined: Mon Mar 15, 2010 2:21 pm
Location: Peruibe , SP , Brazil
Contact:

Re: [SourceMod] Freeze Time

Post by LivingWithGames »

Very useful,nicely done TESLA.
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: [SourceMod] Freeze Time 1.0.0.2

Post by TESLA-X4 »

The plugin has been updated, please see the first post for details.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: [SourceMod] Freeze Time 1.0.0.3

Post by MaestraFénix »

I completely forgot this plugin. For the maps who have a "wait zone" this could be fatal. It would be possible deactivate it with the specified name of the map, like some plugins do (for example, load a gamemode by the name, like i had in my CSS server)?
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: [SourceMod] Freeze Time 1.0.0.3

Post by TESLA-X4 »

Um, you already can? o_O
TESLA-X4 wrote:Configuration:
/sourcemod/configs/freezetime.cfg: Automatically generated on initial plugin load, use it to set which maps should have freeze times. Instructions are included in this file.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: [SourceMod] Freeze Time 1.0.0.3

Post by MaestraFénix »

TESLA-X4 wrote:Um, you already can? o_O
TESLA-X4 wrote:Configuration:
/sourcemod/configs/freezetime.cfg: Automatically generated on initial plugin load, use it to set which maps should have freeze times. Instructions are included in this file.
This is the main reason about why i´ll never become a team member of a mod.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
User avatar
Microtor
Vertex
Vertex
Posts: 5
Joined: Tue Jul 31, 2012 8:20 pm
Contact:

Re: [SourceMod] Freeze Time 1.0.0.3

Post by Microtor »

fraking Plugins. HOW DO THEY WORK? :|

Nice Job, Only one question. Do you need all the players to have the plugin for it to work?
My Own awnser to this question right now is Yes
Image

Oh, don't be such a baby. Episode 3 will come out.

*Turns to Archimedes*

No it won't.
User avatar
Andrax17
npc_combine_elite
npc_combine_elite
Posts: 451
Joined: Wed May 05, 2010 7:11 pm
Location: Finland
Contact:

Re: [SourceMod] Freeze Time 1.0.0.3

Post by Andrax17 »

Microtor wrote:fraking Plugins. HOW DO THEY WORK? :|

Nice Job, Only one question. Do you need all the players to have the plugin for it to work?
My Own awnser to this question right now is Yes
uh.. no, plugins are for servers, not for clients.
User avatar
Lucky9Two
Beta Tester
Beta Tester
Posts: 244
Joined: Sat Apr 10, 2010 8:46 am
Location: Mojave, California
Contact:

Re: [SourceMod] Freeze Time 1.0.0.3

Post by Lucky9Two »

Image

Getting that when it starts up. Any ideas?

It's keeping the freeze time from not working.

It also fails to generate the config file.
Image

"For though I fly through the shadow of the Valley of Death, I will fear no evil, for I am at 70,000 feet and climbing"
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: [SourceMod] Freeze Time 1.0.0.3

Post by TESLA-X4 »

Whoops, download this instead - I mistakenly linked the 'get plugin' link to the compiled binary directly, instead of the proper package.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
Post Reply