AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Round Restart? (https://forums.alliedmods.net/showthread.php?t=17157)

DataMatrix 08-26-2005 16:38

Round Restart?
 
Is there anyway to find out if the round has restarted?

PM 08-26-2005 17:07

What do you mean. Ingame or in windows?

DataMatrix 08-26-2005 17:56

I mean via AMXX... Is there any include with the necessary functions to do this?

Sp4rt4n 08-26-2005 18:00

Code:
register_event("ResetHUD", "newSpawn", "b")

DataMatrix 08-26-2005 18:05

That doesn't explain too much, can you expand on that?

Sp4rt4n 08-26-2005 18:11

Code:
    register_event("ResetHUD", "resethud_event", "be") public resethud_event(id) {     if(hooked[id])     {         release(id)     }     if(is_valid_ent(wait_jump[id]))     {         remove_entity(wait_jump[id])     }     wait_jump[id] = 0     test_wall[id] = false     wait[id] = false     wrappedup[id] = false     if(task_exists(21121411+id))     {         remove_task(21121411+id)     } }


I think ResetHUD hooks the start of a new round

v3x 08-26-2005 18:23

Code:
register_event("TextMsg","Event_RoundRestart","a","2&#Game_w")
Code:
public Event_RoundRestart(id) {     client_print(0,print_chat,"The round is restarting") }
I believe that's what you're looking for, when someone does "sv_restartround <num>".

DataMatrix 08-26-2005 18:30

No, I want to know when the SERVER initiates it, e.g. when the Terrorists win the round a new round starts.

v3x 08-26-2005 18:32

Code:
register_event("SendAudio", "te_win", "a", "2&%!MRAD_terwin") register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
When CT or TE wins.. ^
Code:
register_logevent("new_round",2,"0=World triggered","1=Round_Start")
Beginning of new round ( after freezetime ).

DataMatrix 08-26-2005 18:36

Ok so would I put this in plugin_init
Code:
register_logevent("new_round",2,"0=World triggered","1=Round_Start")

Then the new_round would be public new_round, then my code?

E.g.
Code:
public plugin_init() {     register_logevent("new_round",2,"0=World triggered","1=Round_Start")     return PLUGIN_CONTINUE } public new_round(id) {     blah goes here?         return PLUGIN_CONTINUE }


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

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