AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to determine if round is restarted? (https://forums.alliedmods.net/showthread.php?t=25269)

Jordan 03-10-2006 21:58

How to determine if round is restarted?
 
Hey - for my plugin I am using HLTV as my event but it doesn't catch sv_restartround 1... is there any way to catch this? I need it :twisted:

Xanimos 03-10-2006 22:18

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

Jordan 03-10-2006 22:30

Thanks :)

VEN 03-11-2006 07:07

No, that event is for round start and he needs round REstart, this is two different events.

Quote:

for my plugin I am using HLTV as my event but it doesn't catch sv_restartround 1
Of course, because that's different event.

Quote:

sv_restartround 1... is there any way to catch this? I need it
Do you really need catch only sv_restartround and not sv_restart? Only 1 and not 2, 3, 4... ?
I highly doubt that you want to catch exactly sv_restartround 1, therefore see below.

That would catch exactly the moment when sv_restartround 1 or sv_restart 1 is set.
Code:
register_logevent("logevent_restart_round_1", 2, "1=Restart_Round_(1_second)")

If you want exact the same event but for any argument (number) then use that:
Code:
public plugin_log() {     if (read_logargc() != 2)         return     new arg[16]     read_logargv(1, arg, 15)     if (equal(arg, "Restart_Round_(")) {         // ...     } }

And finally if you want to catch the moment when "Game will restart in..." center text message is appears use that:
Code:
register_event("TextMsg", "event_game_will_restart", "a", "2=#Game_will_restart_in")

Probably you would ask what the difference between two last, well, there are no any noticeable difference.


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

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