Raised This Month: $ Target: $400
 0% 

round start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
izzle
Senior Member
Join Date: Aug 2009
Old 11-15-2009 , 11:48   round start
Reply With Quote #1

How do I make my plugin start after the freeze time ends?
__________________
izzle is offline
master4life
Senior Member
Join Date: Mar 2006
Location: Germany
Old 11-15-2009 , 11:57   Re: round start
Reply With Quote #2

Replace MP_FREEZETIME with your server setting
PHP Code:
#include < amxmodx >

#define MP_FREEZETIME 2.0

public plugin_init( ) {
    
register_plugin"Mp Freezetime""1.0""master4life" );
    
    
register_logevent"EventRoundStart"2"1=Round_Start" );
}

public 
EventRoundStart( )
    
set_taskMP_FREEZETIME"function" );

public function( 
id ) {
    
// Code here    

__________________


[img]http://img714.**************/img714/8612/33726.png[/img]

Last edited by master4life; 11-15-2009 at 12:32.
master4life is offline
Send a message via ICQ to master4life Send a message via MSN to master4life Send a message via Skype™ to master4life
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 11-15-2009 , 12:02   Re: round start
Reply With Quote #3

As far as I know, HLTV roundstart was called when freezetime ends and the logevent roundstarts is called when the round starts (when freezetime is still active).

Could also be just the way around, test both.
__________________
I am out of order!
grimvh2 is offline
master4life
Senior Member
Join Date: Mar 2006
Location: Germany
Old 11-15-2009 , 12:33   Re: round start
Reply With Quote #4

@grimvh2 Thanks for Info code Updated
__________________


[img]http://img714.**************/img714/8612/33726.png[/img]
master4life is offline
Send a message via ICQ to master4life Send a message via MSN to master4life Send a message via Skype™ to master4life
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-15-2009 , 12:33   Re: round start
Reply With Quote #5

No, HLTV is when freeze time starts so the event in the code below is fine. ( without the task )
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 11-15-2009 , 12:36   Re: round start
Reply With Quote #6

PHP Code:
#include <amxmodx>
 
new bool:g_FreezeTime;
 
public 
plugin_init()
{
        
register_event("HLTV""HLTV""a""1=0""2=0");
        
register_logevent("RoundStart"2"1=Round_Start");
}
 
public 
HLTV()
{
        
// Freeze time started
        
g_FreezeTime true;
}
 
public 
RoundStart()
{
        
// Freeze time is over
        
g_FreezeTime false;
}
 
public Function()
{
        if (
g_FreezeTime)
                return;
 
        
// Freeze time is over so you can add plugin code

__________________
hleV 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 22:06.


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