AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   TimeLeft Extender (last round mapchange block) (https://forums.alliedmods.net/showthread.php?t=54580)

prodigy 04-29-2007 10:44

TimeLeft Extender (last round mapchange block)
 
3 Attachment(s)
TimeLeft Extender 1.2

Author:
prodigy (
[email protected])

A few words before:
I know there are a few plugins "on the market" which do exactly the same, but I thought I'd write a more flexible plugin. Where you can choose the chattime etc.
I also missed the timeleft announcement since it was only displaying "No Time Limit" when those plugins blocked the map change.
These plugins were also missing the language choosing aspect.
The name for this plugin was created when the first idea came up with increasing the time limit. I dropped that idea and kept the name.

Purpose:
This plugin removes the timelimit amx_tle_catchat seconds before mapchange and makes the round end
after the current round, delaying the change for amx_tle_chattime seconds.
When mapchange is blocked, typing timeleft displays that the current round is the last and prevents
showing "No Time Limit" IF you put the plugin BEFORE timeleft.amxx in plugins.ini!

CVars:
Code:

amx_tle_enabled [1]/0  // Controls wether the plugin is enabled or not. (default 1)
amx_tle_usehud [1]/0    // Controls wether to use HUD message announcement or not. (default 1)
amx_tle_chattime [7]    // Controls the time people have to chat before actual change occurs. (default 7)
amx_tle_catchat [5]    // Controls at which second of timeleft the plugin should
                        //  catch the mapchange and block it. (default 5)
amx_tle_textcolor 0-[2] // Sets the color of the "This is the last round" message.
                        //  0 = Normal chat color
                        //  1 = Team color (CT: blue, T: red)
                        //  2 = Green

Commands:
Code:

amx_changenow // Changes map immediatley to current amx_nextmap
say changenow // Changes map immediatley to current amx_nextmap
say timeleft  // If the plugin blocked the mapchange, saying timeleft will
              //  display "This is the last round." in the users language.

Installation:

Method 1:
  • Download the .rar file and extract it into your amxmodx directory. (Answer 'yes' when asked for replacing)
  • Add TimeLeftExtender.amxx before timeleft.amxx in your plugins.ini
Method 2:
  • Download the .amxx file and put it into your amxmodx/plugins directory.
  • Add TimeLeftExtender.amxx before timeleft.amxx in your plugins.ini
  • Download the .txt file and put it into your amxmodx/data/lang folder.
Your plugins.ini file should look something like this:
Code:

[...]
; Map related
nextmap.amxx          ; displays next map in mapcycle
mapchooser.amxx      ; allows to vote for next map

TimeLeftExtender.amxx ; << needs to be in front of timeleft.amxx to
                      ; block it from displaying "No Time Limit"!!
timeleft.amxx        ; displays time left on map
[...]

I also suggest setting amx_time_display to something like this:
Code:

amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60"
Because announcing the last 10 seconds or so isnt that useful since the round has an undefined ending.

Screenshots:
[IMG]http://img265.**************/img265/5742/deaztec0022px6.th.jpg[/IMG]
The first chat message (the green one) comes from the blocking, the following is the answer to "say timeleft".


Currently there are only [en] and [de] translations in the .txt file.
I welcome any further translations and will add them.
You would need to translate this into your language:
Code:

[en]
ADMIN_CHANGENOW_2 = ADMIN %s: Change to nextmap (%s) now.
ADMIN_CHANGENOW_1 = ADMIN: Change to nextmap (%s) now.
LAST_ROUND = This is the last round

Credits:
Code:

- Johnny got his gun @ http://forums.alliedmods.net/showthread.php?p=67909
  For his code about detecting a round end.. and inspiring me to write this
- The AMXX Team for 2 lines of code from the timeleft.sma
- MaximusBrood @ http://forums.alliedmods.net/showthread.php?p=236886
  For the color-code
- neuromancer: For fixing the bug where the plugin "randomly" changed
  the map for some unknown reason

Changelog:
Timeformats are european (dd.mm.yyyy) and in 24h.

Code:

1.2 (17.07.2007):
  Bug Fix:
    o Fixed the bug where the plugin "randomly" changed
        the map for some unknown reason

1.1a (08.05.2007 - 19:44):
    o changed cvars to pcvars

1.1 (30.04.2007 - 00:14):
    Features:
      o Added amx_tle_textcolor and functionality

1.0 (29.04.2007 - 16:44)
    o initial release

0.1 Alpha (29.04.2007)
    o Added functionality for everything in 1.0,
      basically I just renamed the Version number.

//edit1 (Admin Access Information):
I nearly forgot about it. By default ADMIN_MAP (flag f) access is required for the amx_changenow / say changenow commands.

Alka 04-29-2007 10:50

Re: TimeLeft Extender (TLE)
 
um....nice! Basically this is some kind of "extend_map" plugin?

prodigy 04-29-2007 10:54

Re: TimeLeft Extender (TLE)
 
Uhm, well if I know correctly the meaning of "extend_map" plugin.. yes it is.

It is mainly like those plugins with some extra features:
http://forums.alliedmods.net/showthread.php?p=24826
http://forums.alliedmods.net/showthread.php?t=21870

It sets mp_timelimit to 0 amx_tle_catchat seconds before mapchange and waits for the round to end. But with some more features than just simply that.

Alka 04-29-2007 11:02

Re: TimeLeft Extender (TLE)
 
Gj!This is handy...+k :wink:

datwinkle 04-30-2007 18:17

Re: TimeLeft Extender (TLE)
 
nice its like the regular timelimit but with more features! +Karma!

godlike 05-06-2007 05:10

Re: TimeLeft Extender (TLE)
 
tested and runs great. Just use pcvars and this will be approved by a mod.

prodigy 05-08-2007 13:27

Re: TimeLeft Extender (TLE)
 
Should I use them only on my own cvars or the other cvars too?
Like amx_show_activity or mp_timelimit. Is it even possible to do so?

This is my first plugin, I'm sorry about that. :P

Updated with my own cvars as pcvars.

Mordekay 06-26-2007 12:44

Re: TimeLeft Extender (last round mapchange block)
 
The plugin is running, and works on my regular cs 1.6 server
But it seems that on my wc3ft server the plugin changes the map when somebody revives.
Code:

; Map related
nextmap.amxx                ; displays next map in mapcycle
mapchooser.amxx                ; allows to vote for next map
TimeLeftExtender.amxx
timeleft.amxx                ; displays time left on map

Code:

          [ 13] Nextmap Chooser        1.76d    AMXX Dev Team    mapchooser.amxx  running 
          [ 14] TimeLeft Extender      0.1a    prodigy          TimeLeftExtende  running 
          [ 15] TimeLeft                1.76d    AMXX Dev Team    timeleft.amxx    running


Czarny Iwan 07-07-2007 15:27

Re: TimeLeft Extender (last round mapchange block)
 
The plugin works great, but I wonder if there is a posibility to add function like in Lastround v1.0. I mean play one more round when map time is ove or going to be over.

O! I have even better idea. How about to add sound from vox telling "This is the last round". I've checked and vox has sounds needed to do this.

I have one problem. When the last round is very long then map is changing before round ends. What's wrong?

prodigy 07-11-2007 16:03

Re: TimeLeft Extender (last round mapchange block)
 
Hmm, I'm going to check that some time.
I'm kind of busy right now, but I will check that.

If someone else has any ideas you are welcome in fixing these issues. I will add them to the first post when I check back the next time.

@WC3 Mod:
It changes on any revive or only a specific (Warden, Item, etc.?)

But I really don't know why it should change, if warcraft mod isn't triggering a roundend event it should not change.

//edit: I got no problems running Warcraft 3 revives (Warden) with my addon.
Demo: http://home.arcor.de/ts3k/csserv/no-bug.rar (Includes a good example of a situation that might occur that you can't avoid; Last round announcement / round end in nearly the same moment)
Plugins Running: http://home.arcor.de/ts3k/csserv/plugins.ini

@Long rounds:
I'll set roundtime to 9 and then wait for the round end, checking that now too.

//edit2: Got no problems with long rounds either. What plugins are you guys running, could you give me a full plugins.ini and where you got the plugins from (Which warcraft3 version? I'm running http://war3ft.net/ War3FT Mod 3.0 RC8 )
Demo: http://home.arcor.de/ts3k/csserv/longrounds.rar (nearly 10 minutes, have fun :D)


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

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