Raised This Month: $ Target: $400
 0% 

How to determine when round starts (after freeze time)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neo-Vortex
Senior Member
Join Date: Jun 2004
Location: Australia
Old 06-20-2004 , 10:16   How to determine when round starts (after freeze time)
Reply With Quote #1

Hey, how can you determine when a round starts, after freeze time has expired

I tried (found it in another plugin)

Code:
register_logevent("function_name",2,"0=World triggered","1=Round_Start")

but it does it before freezetime, not after it (even though the server console only shows

Quote:
World triggered "Round_Start"
after freezetime... bug? me == stupid? something else?
Neo-Vortex is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-20-2004 , 10:29  
Reply With Quote #2

Try this....

Code:
register_event("RoundTime", "new_round", "bc")

that one might get it after the freezetime not sure.....

here is another method

Code:
new Float:freezetime = get_cvar_float("mp_freezetime") if (!freezetime) freezetime = 0.1 set_task(freezetime, "startRound2", 0, "", 0, "a")

use that to get the freeze time and then set a task based on it which will call another function where you can do your post freezetime stuff.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
T(+)rget
Senior Member
Join Date: Mar 2004
Old 06-20-2004 , 10:39  
Reply With Quote #3

You can just do this:
Code:
register_logevent("function_name", 2, "1=Round_Start") public function_name() {    // Code here }

Yes its run after Freezetime because its the start of the round
T(+)rget is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 06-20-2004 , 10:50  
Reply With Quote #4

cool.... good solution target

I was just looking at other plugins that did something similar.
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
T(+)rget
Senior Member
Join Date: Mar 2004
Old 06-20-2004 , 18:57  
Reply With Quote #5

We use the example I gave on SoccerMod to allow players to boost again on start of new round (after freezetime).

I think I also use this in ChickenMod, keep forgeting (think for VIP).
T(+)rget 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 14:48.


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