Raised This Month: $32 Target: $400
 8% 

TimeLeft Extender (last round mapchange block)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 - 6290 views - 8.6 KB)
File Type: txt TimeLeftExtender.txt (329 Bytes, 2911 views)
File Type: rar TimeLeftExtender.rar (9.2 KB, 4175 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
 



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 03:41.


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