A other libcod function:
PHP Code:
consoleSay(message)
{
sendgameservercommand(-1, "h \"console: " + message + "\"");
}
tellMessage(message)
{
sendgameservercommand(self getentitynumber(), "h \"console: " + message + "\"");
}
Originally Posted by
feanor
also how can i make timestamps for rcon commands on log ? not on console log. thx for answers
Do you mean LogPrint( <string> ) for printing to games_mp.log?
For time you can use either the mysql's NOW() function or these libcod function included in voron's libcod (commit from 1 Feb):
PHP Code:
getSystemTime() # Number of seconds since 00:00 hours, Jan 1, 1970 UTC
getLocalTime() # Returns local time as text (format: Www Mmm dd hh:mm:ss yyyy)
http://www.cplusplus.com/reference/ctime/time/ (system time)
Www is the weekday, Mmm the month (in letters), dd the day of the month, hh:mm:ss the time, and yyyy the year.
http://www.cplusplus.com/reference/ctime/asctime/ (local time)