AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [DONE]How to check if freeze time has passed? (https://forums.alliedmods.net/showthread.php?t=208021)

Unkolix 02-09-2013 05:13

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

YamiKaitou 02-09-2013 05:53

Re: How to check if freeze time has passed?
 
New Round / Player Spawn / Round Start / Round End - do Not mess it

Unkolix 02-09-2013 06:08

Re: How to check if freeze time has passed?
 
I am still confused between round start and new round and don't know how to check it...

YamiKaitou 02-09-2013 06:37

Re: How to check if freeze time has passed?
 
One is called when Freeze Time starts, the other is called with Freeze Time ends. Read that thread to figure out which

Unkolix 02-09-2013 06:40

Re: How to check if freeze time has passed?
 
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.

Sylwester 02-09-2013 06:50

Re: How to check if freeze time has passed?
 
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
    
//...



Unkolix 02-09-2013 07:03

Re: How to check if freeze time has passed?
 
Quote:

Originally Posted by Sylwester (Post 1890742)
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!


All times are GMT -4. The time now is 20:29.

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