Raised This Month: $ Target: $400
 0% 

Count up Timer


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ride like Ghost
AlliedModders Donor
Join Date: Dec 2016
Location: behind my pc
Old 08-03-2017 , 10:43   Count up Timer
Reply With Quote #1

Hellow,
I have a question how do i create a count up timer like i want to see the numbers changing and going up
and does anybody know how to do count up timer like this one from boomix? https://youtu.be/KDlWHTz3zGY

sry for my bad English
Ride like Ghost is offline
Ride like Ghost
AlliedModders Donor
Join Date: Dec 2016
Location: behind my pc
Old 08-03-2017 , 15:16   Re: Count up Timer
Reply With Quote #2

a "chronometer"?
Ride like Ghost is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-03-2017 , 17:29   Re: Count up Timer
Reply With Quote #3

Code:
number++
__________________
Neuro Toxin is offline
Ride like Ghost
AlliedModders Donor
Join Date: Dec 2016
Location: behind my pc
Old 08-03-2017 , 17:50   Re: Count up Timer
Reply With Quote #4

Ty.....
do you have an example code
Ride like Ghost is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-03-2017 , 17:55   Re: Count up Timer
Reply With Quote #5

https://wiki.alliedmods.net/Timers_(SourceMod_Scripting)
__________________
Neuro Toxin is offline
Ride like Ghost
AlliedModders Donor
Join Date: Dec 2016
Location: behind my pc
Old 08-03-2017 , 18:07   Re: Count up Timer
Reply With Quote #6

found nothing but thanks
Ride like Ghost is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 08-03-2017 , 18:28   Re: Count up Timer
Reply With Quote #7

You can store the start time using GetGameTime() then subtract that from current time to get time passed since then.

e.g.
PHP Code:
g_fStartTime GetGameTime()
// later ...

fTimePassed GetGameTime() - g_fStartTime 
Another method is counting no. of ticks that have passed and multiplying by GetTickInterval()

Also to format the time like the video you'll have to do a bit more work, I would take a look at some bhop/surf/kz timers as an example

Last edited by hmmmmm; 08-03-2017 at 18:31.
hmmmmm is offline
Ride like Ghost
AlliedModders Donor
Join Date: Dec 2016
Location: behind my pc
Old 08-03-2017 , 18:45   Re: Count up Timer
Reply With Quote #8

Quote:
Originally Posted by hmmmmm View Post
You can store the start time using GetGameTime() then subtract that from current time to get time passed since then.

e.g.
PHP Code:
g_fStartTime GetGameTime()
// later ...

fTimePassed GetGameTime() - g_fStartTime 
Another method is counting no. of ticks that have passed and multiplying by GetTickInterval()

Also to format the time like the video you'll have to do a bit more work, I would take a look at some bhop/surf/kz timers as an example
Thank you
Ride like Ghost is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:02.


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