SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/02/2012, 08:57 PM   #1
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 586
Reputation: 60
Default Task scheduler

Is there any way to schedule something to work if it's monday or so...
To learn server which day in the week is...
Dragony92 is offline   Reply With Quote
Old 16/02/2012, 10:02 PM   #2
Fj0rtizFredde
High-roller
 
Fj0rtizFredde's Avatar
 
Join Date: Jun 2008
Location: Sweden
Posts: 1,065
Reputation: 120
Default Re: Task scheduler

I don't know if this is what you are looking for but you could check out Ryder's CTime plugin here.
__________________
Latest crap I've made:
[Include]CleverBot - Never Be Alone Again!
Fj0rtizFredde is offline   Reply With Quote
Old 16/02/2012, 10:05 PM   #3
2KY
High-roller
 
2KY's Avatar
 
Join Date: Jan 2012
Location: United States
Posts: 1,047
Reputation: 165
Default Re: Task scheduler

GetTime & GetDate.
__________________
Check out my wiki page
2KY is offline   Reply With Quote
Old 16/02/2012, 10:11 PM   #4
Dragony92
Banned
 
Join Date: Feb 2011
Location: Belgrade, Serbia
Posts: 586
Reputation: 60
Default Re: Task scheduler

@2KY that's not for day of week...
Dragony92 is offline   Reply With Quote
Old 17/02/2012, 12:35 AM   #5
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,810
Reputation: 3111
Default Re: Task scheduler

Short answer: yes. Long answer, you need to use the "getdate" function 2KY linked you to and work out from there what day it is. This is not easy as you need to take in to account things like leap years and days in a month, but isn't that difficult to work out the current day given any reference day in the past. Work out the total number of days since the day you know about (e.g. it is Friday 17/02/12 here) and mod that number by 7.
Y_Less is offline   Reply With Quote
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
gta_sa task kill fordawinzz Scripting Help 3 23/11/2011 04:15 PM
Help for my Task System. Vero Help Archive 0 30/04/2011 10:51 AM
Need help with my task bar Jochemd Everything and Nothing 2 10/09/2010 02:33 PM


All times are GMT. The time now is 12:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.