Forum

> > CS2D > Scripts > LUA read the real time (os.date)
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch LUA read the real time (os.date)

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt LUA read the real time (os.date)

ReVoltage
User Off Offline

Zitieren
I want to know, is it possible to:
Can the lua read the real time in my computer?
"Read" the time, not "Show" the time
Example:
If the time 12:00 AM, it will do something
1
2
3
if os.date("%I:%M %p")=="12:00 AM" then
--blablabla
end
Something like that, i cant describe more
So is it possible to do this?
If it possible, i want to know how
Thx before

alt Re: LUA read the real time (os.date)

ohaz
User Off Offline

Zitieren
It is possible. But it only reads the real time on the server (since Lua code is only run on the server). You can't read the client side real time.

alt Re: LUA read the real time (os.date)

ReVoltage
User Off Offline

Zitieren
user ohaz hat geschrieben
It is possible. But it only reads the real time on the server (since Lua code is only run on the server). You can't read the client side real time.

Sorry, i dont understand
Do you mean, its only read the hoster real time?
So it is possible, can tell me how to do this?

alt Re: LUA read the real time (os.date)

Alistaire
User Off Offline

Zitieren
1
os.date("%c")

----

user oxytamine hat geschrieben
Please, DC, disable os-like functions in Lua, I'm so tired of these endless exploits.


Yea, save systems are complete and utter exploits. Holy shit look how much they exploit.

alt Re: LUA read the real time (os.date)

DC
Admin Off Offline

Zitieren
@user oxytamine: Scripts run on the server side only. Just check scripts written by others before you use them and your are safe. Also never run your server as root. Create a new user who only has access to the cs2d folder. This way you are pretty safe even if you don't check the scripts before using them (which I still wouldn't recommend though).
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht