Raised This Month: $ Target: $400
 0% 

how to check when round time has expired?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-05-2014 , 06:29   Re: how to check when round time has expired?
Reply With Quote #1

If you use linux, try this :

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

#pragma semicolon 1

#define PLUGIN ""
#define VERSION "0.0.1"

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

new OrpheuFunction:g_ofnHasRoundTimeExpired;
new 
OrpheuHook:g_ohHasRoundTimeExpired;

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")    )
    {
        
g_ofnHasRoundTimeExpired OrpheuGetFunction("HasRoundTimeExpired""CHalfLifeMultiplay");
        
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0");
        
Event_HLTV_New_Round();
    }
}

public 
Event_HLTV_New_Round()
{
    
g_ohHasRoundTimeExpired OrpheuRegisterHook
    
(
        
g_ofnHasRoundTimeExpired,
        
"OnHasRoundTimeExpired_P",
        
OrpheuHookPost
    
);
}

public 
OnHasRoundTimeExpired_P()
{
    if( 
OrpheuGetReturn() )
    {
        
OrpheuUnregisterHook(g_ohHasRoundTimeExpired);
        
TerminateRoundRoundEndType_Timer );
    }

Requires following plugin : http://forums.alliedmods.net/showthread.php?p=1122356
And function signature :
On windows the function is not called, that's why plugin can't work.
Code:
{
    "name" : "HasRoundTimeExpired",
    "class" : "CHalfLifeMultiplay",
    "library" : "mod",
	"return" :
    {
        "type" : "bool"
    },
    "identifiers" :
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0xDB,"*","*",0xA1,"*","*","*","*",0xD8,"*",0xD8,"*","*",0xD8,"*","*","*","*","*",0xDF,"*",0xF6,"*","*",0x7A,"*",0x8B,"*","*",0x85]
        },
        {
            "os" : "linux",
            "mod" : "cstrike",
            "value" : "_ZN18CHalfLifeMultiplay19HasRoundTimeExpiredEv"
        }
    ]
}
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 10:05.


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