Raised This Month: $ Target: $400
 0% 

Easy way to get round time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 05-27-2009 , 12:39   Re: Easy way to get round time?
Reply With Quote #1

like this ?
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Get Roundtime"
#define VERSION "1.0"
#define AUTHOR "Starsailor"

#define TASKID 1337


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("Event_roundend"2"1=Round_End"
    
register_event("HLTV","Event_newround","a","1=0","2=0")
    
register_event("TextMsg""Event_roundend""a""2&#Game_C""2&#Game_w")
}

public 
Event_newround()
    
set_task(get_cvar_float("mp_freezetime"),"StartCount",TASKID)

new 
Time

public StartCount(task){
    
Time++
    
set_task(0.9,"StartCount",TASKID)
    
}

public 
Event_roundend(){
            
    if(
task_exists(TASKID))
        
remove_task(TASKID)
            
    
client_print(0,print_chat,"The round has lasted: %d",Time)
    
    
Time 0

The result is the time that players has played in each round
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor 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 01:27.


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