Author Topic: Round Timer  (Read 5585 times)

0 Members and 1 Guest are viewing this topic.

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Round Timer
« on: September 17, 2014, 01:15:10 PM »
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~

Offline Neku

  • Hero Member
  • *****
  • Posts: 549
  • Karma: 27
Re: Round Timer
« Reply #1 on: September 17, 2014, 02:50:53 PM »
You wouldn't use a timer, you'd use CurTime().
Out of the Garry's Mod business.

Offline Zmaster

  • Full Member
  • ***
  • Posts: 235
  • Karma: 25
Re: Round Timer
« Reply #2 on: September 17, 2014, 03:16:39 PM »
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