Raised This Month: $ Target: $400
 0% 

Help: Creating Timestamps in AMXX


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 10-21-2006 , 10:48   Help: Creating Timestamps in AMXX
Reply With Quote #1

I would like to store a timestamp to a variable so I can compare it to another timestamp. I want to be using this as a sort of poor man's timer. Is this possible? If so, how do I create timestamps?
Bad_Bud is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-21-2006 , 11:22   Re: Help: Creating Timestamps in AMXX
Reply With Quote #2

Hmm, not sure if this is a valid answer but you can use HL's gametime.

Code:
new Float:gametime = get_gametime(); if (gametime > myDelay) {      // Code... }

Also what are you timing for?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 10-21-2006 , 17:20   Re: Help: Creating Timestamps in AMXX
Reply With Quote #3

To get the current timestamp just use get_systime().

At least, if your definition of a ' current timestamp' is:
Amount of seconds elapsed since 00:00:00 on January 1, 1970
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-21-2006 , 19:36   Re: Help: Creating Timestamps in AMXX
Reply With Quote #4

Oh wow, I was way off target.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 10-21-2006 , 20:56   Re: Help: Creating Timestamps in AMXX
Reply With Quote #5

It works, thanks. Glad I didn't have to use something like set_task for something so simple.
Bad_Bud is offline
Reply


Thread Tools
Display Modes

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 04:45.


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