Hello I need a script which will be started at a given date and time. I tried to create something like that, but unfortunately, a naught effect and naught errors in console.
Somebody can help me ?
Lua:
goodConfig = {
days = {['Monday'] = {'16:00:20'},
['Tuesday'] = {'16:00:20'},
['Wednesday'] = {'16:00:20'},
['Thursday'] = {'16:00:20'},
['Friday'] = {'16:00:20'},
['Saturday'] = {'16:00:20'},
['Sunday'] = {'12:35:00'}
}
}
local daysOpen = {}
function onThink(cid, interval)
for k, v in pairs(goodConfig.days) do
table.insert(daysOpen, k)
end
if isInArray(daysOpen, os.date("%A")) then
if isInArray(goodConfig.days[os.date("%A")], os.date("%X", os.time())) then
doBroadcastMessage("Start function script.")
end
end
return TRUE
end
Somebody can help me ?
Last edited: