Raised This Month: $ Target: $400
 0% 

How to catch score restart?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 06-05-2013 , 14:48   How to catch score restart?
Reply With Quote #1

Hello.


I need to catch score restart to do some actions there. (basically i want to disable plugin and then enabled in 2nd round).

How can i catch score restart (restart round)?
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
Old 06-23-2013, 04:42
Row
This message has been deleted by ConnorMcLeod. Reason: TROLLINg
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-23-2013 , 05:08   Re: How to catch score restart?
Reply With Quote #3

This is how you should do :

PHP Code:
#include < amxmodx >

new g_iRoundCount 1;
new 
bool:g_bIsRestarting;

public 
plugin_init()
{
    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w");
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0");
}

public 
Event_TextMsg_Restart()
{
    
g_bIsRestarting true
}

public 
Event_HLTV_New_Round()
{
    if( 
g_bIsRestarting )
    {
        
g_bIsRestarting false;
        
g_iRoundCount 1;
    }
    else
    {
        ++
g_iRoundCount;
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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:28.


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