AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to determine when round starts (after freeze time) (https://forums.alliedmods.net/showthread.php?t=2908)

Neo-Vortex 06-20-2004 10:16

How to determine when round starts (after freeze time)
 
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?

jtp10181 06-20-2004 10:29

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.

T(+)rget 06-20-2004 10:39

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 :D

jtp10181 06-20-2004 10:50

cool.... good solution target

I was just looking at other plugins that did something similar.

T(+)rget 06-20-2004 18:57

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).


All times are GMT -4. The time now is 14:48.

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