Raised This Month: $ Target: $400
 0% 

Event for specified time - do every day in xx:xx hours


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 10-07-2014 , 07:32   Re: Event for specified time - do every day in xx:xx hours
Reply With Quote #1

PHP Code:

    
new CurrentTime[9
    
get_time("%H",CurrentTime,8)
    new 
hour str_to_num(CurrentTime)
    if(
hour==19)
{
//event

__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 10-07-2014 , 08:16   Re: Event for specified time - do every day in xx:xx hours
Reply With Quote #2

Quote:
Originally Posted by aron9forever View Post
PHP Code:

    
new CurrentTime[9
    
get_time("%H",CurrentTime,8)
    new 
hour str_to_num(CurrentTime)
    if(
hour==19)
{
//event

No. And u can get hour with
PHP Code:
new htime(h); 
FromTheFuture is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 10-07-2014 , 09:09   Re: Event for specified time - do every day in xx:xx hours
Reply With Quote #3

Quote:
Originally Posted by FromTheFuture View Post
No. And u can get hour with
PHP Code:
new htime(h); 
no? what no? I'm using this for happy hour on my server?
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
FromTheFuture
Senior Member
Join Date: Jan 2013
Old 10-07-2014 , 09:49   Re: Event for specified time - do every day in xx:xx hours
Reply With Quote #4

Quote:
Originally Posted by aron9forever View Post
no? what no? I'm using this for happy hour on my server?
No, because where your set_task for check time or u check it only in plugin_init?
And No, because I said to u about get_time.
FromTheFuture 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 17:36.


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