Results 1 to 10 of 14

Thread: console print

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    A other libcod function:
    PHP Code:
    consoleSay(message)
    {
        
    sendgameservercommand(-1"h \"console: " message "\"");
    }

    tellMessage(message)
    {
        
    sendgameservercommand(self getentitynumber(), "h \"console: " message "\"");

    Quote Originally Posted by feanor View Post
    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)
    Last edited by Mitch; 13th November 2017 at 18:59.

  2. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (14th November 2017)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •