Raised This Month: $ Target: $400
 0% 

remaining round time


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-25-2007 , 15:17   Re: remaining round time
Reply With Quote #4

This will print each seconds and to every player how many seconds are remaining :

Code:
#include <amxmodx> #define TASKID 87654 new seconds, rt new roundtime public plugin_init() {     register_plugin("remaining seconds","0.1","connor")         register_logevent("eRoundStart", 2, "1=Round_Start")     register_logevent("eRoundEnd", 2, "1=Round_End")     register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")         roundtime = get_cvar_pointer("mp_roundtime") } public eRestart() {     if(task_exists(TASKID))         remove_task(TASKID) } public eRoundStart() {     seconds = 0     rt = floatround(get_pcvar_float(roundtime) * 60.0) - 1     set_task(1.0, "count", TASKID, _, _, "b") } public count(taskid) {     seconds++     client_print(0, print_center, "%i seconds left", rt - seconds) } public eRoundEnd() {     remove_task(TASKID)     seconds = 0 }
ConnorMcLeod is offline
 



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 16:13.


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