Raised This Month: $ Target: $400
 0% 

How do i make a message appear to a player every 2 hours (his time spent on a server)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 10-16-2015 , 14:18   Re: How do i make a message appear to a player every 2 hours (his time spent on a ser
Reply With Quote #7

Wait.... can I actually do it with the for loop in the function that checks every 2 hours? I just need to find the final number with math.
I guess I wont host a server more than 3 months. So that would make X the final number.... It should go like this
PHP Code:
for(new 0Xi+= 7200); // 7200 seconds is 2 hours 
Thn you take the variable where the spent time is hold and check if the variable equals to i... the key for the loop
You can just replace 7200 with 60 if your plugin checks every minute.
redivcram is offline
 



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 22:06.


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