FlyingSpoon Posted July 17, 2015 Posted July 17, 2015 Is there a way I can make a 2 minute timer, and display the countdown on a GUI Label or DxText? GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Bilal135 Posted July 17, 2015 Posted July 17, 2015 * Posting this so when someone replies, I get the notification * "Get busy living or get busy dying"
GTX Posted July 17, 2015 Posted July 17, 2015 2 minute timer? This: setTimer(yourFunction, 120000, 1) And we can't make script for you, do it by yourself and we can fix errors. Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
FlyingSpoon Posted July 17, 2015 Author Posted July 17, 2015 *cough* *cough* I never told you to make any script for me, I asked you is there a way, and if yes, what are the functions? If you dont want to help, dont help. I never asked you in the first place Enjoy your day. GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
FlyingSpoon Posted July 17, 2015 Author Posted July 17, 2015 (edited) Thanks for the function, which I already knew. Edited July 17, 2015 by Guest GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Perfect Posted July 17, 2015 Posted July 17, 2015 @Raysmta, he may have misunderstood your question at first place. You should at least give him some respect for trying to help you. And about your question, you may use: setTimer getTimerDetails guiCreateLabel Set a timer using setTimer then get remaining time using getTimerDetails and then put that remaining time inside the guiCreateLabel function. Read about those function in the wiki and you will be done. Hint: timeRemaining, executesRemaining, totalExecutes = getTimerDetails(theTimer) -- Get the timers details Multi Theft Auto Player since middle of 2011. Everybody want to act Crazy/Smart/Intelligent/Different/Unique/Innocent and Thats why I am Perfect.
anumaz Posted July 17, 2015 Posted July 17, 2015 the lazy way would probably be something like. there's probably a better way though. just trying to help you from top of my head local countdown = 120 local label = guiCreateLabel(pos, tostring(countdown), parent of) setTimer(function () countdown = countdown - 1 if countdown >= 0 then guiSetText(label, tostring(countdown)) else --you've reached 0! end end, 120000, 1000) but you could work around getTimerDetails to get the timeRemaining (in ms) - 1000 to get into seconds
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now