Raised This Month: $ Target: $400
 0% 

[DONE]How to check if freeze time has passed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-09-2013 , 05:13   [DONE]How to check if freeze time has passed?
Reply With Quote #1

How to check if freeze time has passed?

Last edited by Unkolix; 02-09-2013 at 07:15.
Unkolix is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-09-2013 , 05:53   Re: How to check if freeze time has passed?
Reply With Quote #2

New Round / Player Spawn / Round Start / Round End - do Not mess it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-09-2013 , 06:08   Re: How to check if freeze time has passed?
Reply With Quote #3

I am still confused between round start and new round and don't know how to check it...
Unkolix is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 02-09-2013 , 06:37   Re: How to check if freeze time has passed?
Reply With Quote #4

One is called when Freeze Time starts, the other is called with Freeze Time ends. Read that thread to figure out which
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-09-2013 , 06:40   Re: How to check if freeze time has passed?
Reply With Quote #5

New round when Freeze Time starts and round start when it ends.
But you see I have made a menu that lets players use it once per round, but if the call it on freeze time, they get it. I want to block them from getting the menu in freeze time.
Unkolix is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-09-2013 , 06:50   Re: How to check if freeze time has passed?
Reply With Quote #6

PHP Code:
new bool:g_freezetime
public plugin_init(){
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_logevent("logevent_round_start"2"1=Round_Start")
}

public 
event_new_round()
    
g_freezetime true

public logevent_round_start()
    
g_freezetime false

public some_function(id){
    if(
g_freezetime)
        return
    
//...

__________________
Impossible is Nothing
Sylwester is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-09-2013 , 07:03   Re: How to check if freeze time has passed?
Reply With Quote #7

Quote:
Originally Posted by Sylwester View Post
PHP Code:
new bool:g_freezetime
public plugin_init(){
    
register_event("HLTV""event_new_round""a""1=0""2=0")
    
register_logevent("logevent_round_start"2"1=Round_Start")
}

public 
event_new_round()
    
g_freezetime true

public logevent_round_start()
    
g_freezetime false

public some_function(id){
    if(
g_freezetime)
        return
    
//...

Thanks!!!! It works!
Unkolix 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 20:29.


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