Raised This Month: $84 Target: $400
 21% 

TimeLeft Extender (last round mapchange block)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay        Approver:   Hawk552 (427)
prodigy
Junior Member
Join Date: Apr 2007
Location: Germany
Old 04-29-2007 , 10:44   TimeLeft Extender (last round mapchange block)
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (TimeLeftExtender.sma - 5127 views - 8.6 KB)
File Type: txt TimeLeftExtender.txt (329 Bytes, 2510 views)
File Type: rar TimeLeftExtender.rar (9.2 KB, 3592 views)
__________________
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Signature comes here." <<std::endl;
return 0;
}

Last edited by prodigy; 07-17-2007 at 13:48. Reason: Version 1.2 update
prodigy is offline
Send a message via ICQ to prodigy
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-29-2007 , 10:50   Re: TimeLeft Extender (TLE)
Reply With Quote #2

um....nice! Basically this is some kind of "extend_map" plugin?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
prodigy
Junior Member
Join Date: Apr 2007
Location: Germany
Old 04-29-2007 , 10:54   Re: TimeLeft Extender (TLE)
Reply With Quote #3

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.
prodigy is offline
Send a message via ICQ to prodigy
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 04-29-2007 , 11:02   Re: TimeLeft Extender (TLE)
Reply With Quote #4

Gj!This is handy...+k
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
datwinkle
BANNED
Join Date: May 2006
Location: Virginia
Old 04-30-2007 , 18:17   Re: TimeLeft Extender (TLE)
Reply With Quote #5

nice its like the regular timelimit but with more features! +Karma!
datwinkle is offline
Send a message via AIM to datwinkle
godlike
Senior Member
Join Date: Apr 2005
Old 05-06-2007 , 05:10   Re: TimeLeft Extender (TLE)
Reply With Quote #6

tested and runs great. Just use pcvars and this will be approved by a mod.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
prodigy
Junior Member
Join Date: Apr 2007
Location: Germany
Old 05-08-2007 , 13:27   Re: TimeLeft Extender (TLE)
Reply With Quote #7

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.

Updated with my own cvars as pcvars.
__________________
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Signature comes here." <<std::endl;
return 0;
}

Last edited by prodigy; 05-08-2007 at 13:37.
prodigy is offline
Send a message via ICQ to prodigy
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 06-26-2007 , 12:44   Re: TimeLeft Extender (last round mapchange block)
Reply With Quote #8

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
__________________

Mordekay is online now
Czarny Iwan
Senior Member
Join Date: Jun 2007
Location: Poland
Old 07-07-2007 , 15:27   Re: TimeLeft Extender (last round mapchange block)
Reply With Quote #9

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?
__________________

Last edited by Czarny Iwan; 07-08-2007 at 18:15. Reason: Found an error
Czarny Iwan is offline
prodigy
Junior Member
Join Date: Apr 2007
Location: Germany
Old 07-11-2007 , 16:03   Re: TimeLeft Extender (last round mapchange block)
Reply With Quote #10

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 )
__________________
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "Signature comes here." <<std::endl;
return 0;
}

Last edited by prodigy; 07-11-2007 at 17:20.
prodigy is offline
Send a message via ICQ to prodigy
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:26.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode