Raised This Month: $ Target: $400
 0% 

how to check when round time has expired?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-06-2014 , 00:48   Re: how to check when round time has expired?
Reply With Quote #7

Try with a task then.

PHP Code:
#include < amxmodx >
#include < engine >
#include < round_terminator >

#pragma semicolon 1

#define PLUGIN "No Objectives Round End"
#define VERSION "0.0.1"

#define cm(%0)    ( sizeof(%0) - 1 )

const TASK_ROUNDEND 1931543;

new 
mp_roundtimeFloat:g_flRoundTime;

public 
plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" );

    if(    !
find_ent_by_class(-1"func_bomb_target")
    &&    !
find_ent_by_class(-1"info_bomb_target")
    &&    !
find_ent_by_class(-1"func_hostage_rescue")
    &&    !
find_ent_by_class(-1"func_escapezone")
    &&    !
find_ent_by_class(-1"func_vip_safetyzone")
    &&    !
find_ent_by_class(-1"hostage_entity")    )
    {
        
mp_roundtime get_cvar_pointer("mp_roundtime");
        
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0");
        
register_logevent("LogEvent_Round_Start"2"1=Round_Start");
        
Event_HLTV_New_Round();
    }
}

public 
Event_HLTV_New_Round()
{
    
remove_task(TASK_ROUNDEND);
    
g_flRoundTime floatclamp(get_pcvar_float(mp_roundtime)*60.060.0540.0);
}

public 
LogEvent_Round_Start()
{
    
set_task(g_flRoundTime"Task_RoundEnd"TASK_ROUNDEND);
}

public 
Task_RoundEnd()
{
    
TerminateRoundRoundEndType_Timer );

If doesn't work, try RoundEndType_Timer instead.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-06-2014 at 00:49.
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 10:05.


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