Shadow Dan
Sh4dowDan
Hi everyone.
So here is my problem:
I want to see current time when someone log into my server.
I got this:
and want this in console (current my pc time):
In TFS for tibia 8.6 it was something like:
So current time 2:16:57.
my player.cpp
here is full file player.cpp
http://paste.ofcode.org/36AQLL37HTFzegeJywQXmPz
Sadly its too hard for me so i ask for help :<
so far i managed to do it in lua but it takes 1 more line in console
login.lua
it looks like this:
I want only 1 line per login :/
This looks really crap
So here is my problem:
I want to see current time when someone log into my server.
I got this:
Code:
[God] Shadow has logged in.
Code:
03:22:55 [God] Shadow has logged in.
In TFS for tibia 8.6 it was something like:
Code:
std::clog << ">> Loading mods..." << std::endl;
Code:
[2:16:57.625] >> Loading mods...
my player.cpp
Code:
std::cout << name << " has logged in." << std::endl;
here is full file player.cpp
http://paste.ofcode.org/36AQLL37HTFzegeJywQXmPz
Sadly its too hard for me so i ask for help :<
so far i managed to do it in lua but it takes 1 more line in console
login.lua
Code:
local timenow = os.date("%H:%M:%S", os.time())
print(timenow)
Code:
[God] Shadow has logged in.
03:03:49
This looks really crap
Code:
[God] Shadow has logged out
[God] Shadow has logged in.
03:22:51
03:22:51
[God] Shadow has logged out
[God] Shadow has logged in.
03:22:52
03:22:52
[God] Shadow has logged out
[God] Shadow has logged in.
03:22:53
03:22:54
[God] Shadow has logged out
[God] Shadow has logged in.
03:22:55
Last edited: