Raised This Month: $51 Target: $400
 12% 

Timeleft in rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Gamperis
BANNED
Join Date: Aug 2013
Old 08-14-2013 , 06:18   Timeleft in rounds
Reply With Quote #1

Hello everyone. I am set in my server the map time in rounds, but when i type in chat timeleft, i do not see the map rounds remaining before change map... What do i do? Or i need other plugin? I use amx_round_count.amxx

The example what i need:



I see which round now when the rounds start, but i do not see rounds remaining when i type timeleft...


Last edited by Gamperis; 08-14-2013 at 06:22.
Gamperis is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 08-14-2013 , 06:46   Re: Timeleft in rounds
Reply With Quote #2

That is pretty easily achieved.

Add the following in timeleft.sma and recompile it:

Under new g_Switch and above plugin_init() add:
Code:
new Rounds = 0;

Inside the plugin_init() function (inside the brackets) add:
Code:
register_logevent( "LogEvent_RoundStart", 2, "1=Round_Start" )

Under plugin_init() add:
Code:
public LogEvent_RoundStart( ) {     Rounds++; }

Look for client_print(0, print_chat, "%L", LANG_PLAYER, "NO_T_LIMIT") and comment or replace it with this:
Code:
client_print( 0, print_chat, "Rounds Remaining: %i", ( get_cvar_num( "mp_maxrounds" ) - Rounds ) );

That's it. Recompile and you're done.
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Gamperis
BANNED
Join Date: Aug 2013
Old 08-14-2013 , 06:57   Re: Timeleft in rounds
Reply With Quote #3

Quote:
Originally Posted by Xellath View Post
That is pretty easily achieved.

Add the following in timeleft.sma and recompile it:

Under new g_Switch and above plugin_init() add:
Code:
new Rounds = 0;

Inside the plugin_init() function (inside the brackets) add:
Code:
register_logevent( "LogEvent_RoundStart", 2, "1=Round_Start" )

Under plugin_init() add:
Code:
public LogEvent_RoundStart( ) {     Rounds++; }

Look for client_print(0, print_chat, "%L", LANG_PLAYER, "NO_T_LIMIT") and comment or replace it with this:
Code:
client_print( 0, print_chat, "Rounds Remaining: %i", ( get_cvar_num( "mp_maxrounds" ) - Rounds ) );

That's it. Recompile and you're done.
Compile errors, warnings. I do not understand not everything what you wrote because i am not English . Can you do it, please?
Attached Files
File Type: sma Get Plugin or Get Source (timeleft.sma - 526 views - 6.4 KB)

Last edited by Gamperis; 08-14-2013 at 07:00.
Gamperis is offline
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 08-14-2013 , 07:03   Re: Timeleft in rounds
Reply With Quote #4

Served on a silver platter.
Attached Files
File Type: sma Get Plugin or Get Source (timeleft.sma - 579 views - 6.2 KB)
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Gamperis
BANNED
Join Date: Aug 2013
Old 08-14-2013 , 07:39   Re: Timeleft in rounds
Reply With Quote #5

Quote:
Originally Posted by Xellath View Post
Served on a silver platter.
Thank you very much!

Last edited by Gamperis; 08-14-2013 at 11:55.
Gamperis is offline
Reply



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 19:46.


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