General > Developers Corner

Round Timer

(1/3) > >>

Zmaster:
I'm in development of a gamemode (for learning purposes) and I'm got to the part where I want to create a timer (for rounds)

I don't want to be walked through it step by step, since I'm trying to do as much as I can on my own, but I'm insure about this

I assumed I'd use a timer for this, but I don't know how to go about it

Basically, I want a round to be 8 minutes long and after every 8 minutes, the map will reset and every player will be sent back to their spawn and respawned

I know how to do the respawning and map resetting on my own, but I don't know what to do about the rest

Can anybody explain a little bit but still leave me room to figure it out? Thanks~

Neku:
You wouldn't use a timer, you'd use CurTime().

Zmaster:
http://wiki.garrysmod.com/page/Global/CurTime
"Returns the uptime of the server in seconds (to at least 4 decimal places)"

How would that be used in this situation? 0.o

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given

[0] Board index

Go to full version