Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: console print

  1. #11
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    Quote Originally Posted by feanor View Post
    if i edit like this

    PHP Code:
    logprint(Rcon from %s:\n%s\n", NET_AdrToString (from), Cmd_Argv(2)) 
    pretty sure it will not work cuz logprint is not declared. how can i call logprint function in libcod ? or i have to declare myself ?
    functions.hpp

    PHP Code:
    typedef void (*G_LogPrintf_t)(const char *fmt, ...);
    #if COD_VERSION == COD2_1_0
    static const G_LogPrintf_t G_LogPrintf = (G_LogPrintf_t)0x08107502;
    #elif COD_VERSION == COD2_1_2
    static const G_LogPrintf_t G_LogPrintf = (G_LogPrintf_t)0x08109836;
    #elif COD_VERSION == COD2_1_3
    static const G_LogPrintf_t G_LogPrintf = (G_LogPrintf_t)0x08109992;
    #endif 

    PHP Code:
    G_LogPrintf"Something\n" ); 
    sudo apt-get rekt

  2. The Following 2 Users Say Thank You to voron00 For This Useful Post:

    feanor (15th November 2017),kung foo man (15th November 2017)

  3. #12
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by feanor View Post
    it will leak rcon password but already i was trying to find this command
    PHP Code:
     player printOutOfBand("print\nHELLO PLAYER CONSOLE!!!\n"); 


    yeah how can i log for example

    PHP Code:
    32:12 rcon clientkick from 123.123.123.123 
    I use this for showing rcon status without leaking the rcon password:

    PHP Code:
    self connectionlessPacket("rcon " getcvar("rcon_password") + " status"); 
    Note: apparently disabled and marked for rewrite in the latest commit.

    It shows up in the console log as:
    PHP Code:
    Rcon from [ip]:[port]:

    status 
    then use LogPrint for your games log:
    PHP Code:
    LogPrint("rcon status from " self getIP()); 

  4. The Following 2 Users Say Thank You to Mitch For This Useful Post:

    feanor (15th November 2017),kung foo man (15th November 2017)

  5. #13
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    Maybe bad idea, but for "console: my message :3" this:
    Code:
    Cmd_ExecuteString("say "+self.name+" welcome to the server!");
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  6. The Following User Says Thank You to maxdamage99 For This Useful Post:

    feanor (16th November 2017)

  7. #14
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    If you have libcod already, why not go with sendgameservercommand instead of the old executestring?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

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