Jump to content

I Need help for Turf War Countdown :D


shaynendra

Recommended Posts

Okay, I have a Server Roleplay and I along with my friends are planning to develop a script Turf War originally created by Manve, After we developed, one of my colleagues said that there should be additional 10min Countdown to take Rather certain areas we have set in the game, he said Countdown is based DxDrawText and lasted 10min after one team entering the Colshape. I only ask for help how to make the Countdown. Thank you :)

The Screenshot about Turf War Countdown :

11118905_988724137804506_2136816295_n.png

I Hope you can help me and Sorry for my english :lol:

Link to comment

I don't know if your friends also is asking around about this, but I helped someone with an almost identical issue here a few days ago, here's my reply.

If time is provided in total seconds you can divide it by 60 and use math.floor to get the amount of minutes. Then you subtract the minutes multiplied by 60 from the total seconds to get the seconds (like a clock showing minutes and seconds) if that's what you want.

local total_time = 135; 
local minutes = math.floor(total_time/60); 
local seconds = total_time-(minutes*60); 
outputChatBox("Time left is: "..minutes.." minutes and "..seconds.." seconds!"); 
-- Above code will output: "Time left is: 2 minutes and 15 seconds" 

I'm a little confused right now, what code are you using for your turf system so far? getTickCount() is a useful function for mission timers too.
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...