so with the plugin m-Time you can change the time for 24h
is there a possibility to check what time is it ?
like
if time == 20:00 then
rust.SendChatMessage(player, n00b)
Checking in-game Rust time?
Discussion in 'Rust Development' started by PaiN, Apr 26, 2015.
-
just look at m-Time, the code to check what time it is is inside.
you can also check my zone manager, as i set the lights on/off depending on the current time -
I've checked m-Time nothing is checking if time is..
You plugin helped but!
i wrote a very fast test plugin and i know that something is wrong with the local currentTime.. dunno what
and error "File: test.lua Line: 16 'then' expected near '=':"
Code:PLUGIN.Title = "test" PLUGIN.Description = "test" PLUGIN.Author = "Merka" PLUGIN.Version = V(1, 0, 0)function PLUGIN:Init() command.AddChatCommand("s", self.Object, "cmdS") end function PLUGIN:cmdS(player, cmd) local currentTime = TOD_Sky.Instance.Cycle.Hour if currentTime = 10 then rust.SendChatMessage(player, "retard") end end
-
Code:if currentTime == 10 then
If you want to CHECK it in an IF element, you should use "=="
It should be fixed then -
-
No problem