• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Simple getWorldTime question

Gaddhuve

Member
Joined
May 6, 2011
Messages
76
Solutions
1
Reaction score
19
Hi folks, Im trying to make a script using the getWorldTime function but cant get it working. Im really bad at this stuff so would be grateful for some help!

Code:
function onSay(player, words, param)
if getWorldTime() < 1435 and getWorldTime() > 1450 then
    player:popupFYI('Working')
end
    return false
end

If I remove "getWorldTime() > 1450" its sending the box but not with it. No errors in console. Thanks in advance.
 
It can not be less than 1435 and more than 1450 at the same time.

If you want it to be between those values, swap the < and > so it would look like this:
Lua:
function onSay(player, words, param)
    if getWorldTime() > 1435 and getWorldTime() < 1450 then
        player:popupFYI('Working')
    end
    return false
end
I don't know exactly what getWorldTime() returns but I guess you have looked that up already. If not you can use print(getWorldTime()) and see what it shows.
 
Thanks for clearing that up. Cant seem to learn which is which hehe. Does still not work however but I wont bother you anymore, Ill work around this somehow. Appreciate your time in any case, thanks.
 
Back
Top