AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   DoD end of round reset? (https://forums.alliedmods.net/showthread.php?t=6267)

Trp. Jed 09-25-2004 21:37

DoD end of round reset?
 
Yes I've searched but not been able to find it.

How does one detect the end of a round or a new round starting in DoD? I.e when all objectives are capped, one team wins and you go back to square one.

The plug-in I'm writing needs it but Im not usings DoDX, just raw AMXX 0.16.

jtp10181 09-25-2004 22:15

a log event would be a good way..... dunno what dod logs look like though, if you post one I could prob figure it out.

SidLuke 09-26-2004 06:02

Message RoundState, read data 1 to get round result ( I think : 0 = end , 1= start , 3 = allies win , 4 = axis win , 5 = round draw )

Trp. Jed 09-26-2004 06:43

Danke Sid :)

I have nothing against DoDX by the way - just that a lot of the people who want this plugin dont/wont install it. :?

Trp. Jed 09-28-2004 12:30

Sid, is RoundState and event or a message? I tried register_message but it never gets caught.

FeuerSturm 09-28-2004 14:22

it's an even.

in plugin_init:
register_event("RoundState","roundend","a","1 =3","1=4")
(for example)

and then

public roundend(){
//do something here
}

that will execute roundend() when axis or allies win.

hope that helps a bit

Trp. Jed 09-28-2004 15:58

Ah thanks, I got a bit confused because in the meta game command it lists them as messages.

To be honest I dont even need to know who wins, just when the round has eneded and a new one starts so I can reset some variables.

But thanks for the heats up. To notepad!

SidLuke 09-28-2004 16:44

event = message

register_event(message,function,flags,params) - "function" will be executed (at message end) when this message will be send if params and flags match,

register_message(message,function) - specific message can be changed, function is executed after any message value. Very unstable , crashable function, don't ever use it if you really don't know what you want to do.

Trp. Jed 09-30-2004 01:13

Fair enough guys, thanks for the heads up.

I don't actually need to know who won or lost, just that the round has ended either due to the time expiring or a full cap taking place, its just so I can reset some stuff.


All times are GMT -4. The time now is 17:26.

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