Results 1 to 3 of 3

Thread: say message with console

  1. #1
    Private
    Join Date
    Aug 2013
    Posts
    95
    Thanks
    13
    Thanked 4 Times in 3 Posts

    say message with console

    hello everybody

    someone know how say a message from the console?
    ex: console: message
    in the tchat, by a script? like b3
    in a moment, the console say: website is....
    or when the console say the killstreak without have of b3
    console: "player" is on 5 kills without be death

    it's maybe:
    wait(15)
    SayAll("text");
    wait(50)

    but i do not know where to start
    i hope you will be what i mean
    xfire: ordi37zk

  2. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by ORDI View Post
    hello everybody

    someone know how say a message from the console?
    ex: console: message
    in the tchat, by a script? like b3
    in a moment, the console say: website is....
    or when the console say the killstreak without have of b3
    console: "player" is on 5 kills without be death

    it's maybe:
    wait(15)
    SayAll("text");
    wait(50)

    but i do not know where to start
    i hope you will be what i mean
    xfire: ordi37zk
    Without b3 it is possible with libcod. You can do it global with say or tell entitynumber to a player.

    See: https://znation.nl/cod4script/Cmd_ExecuteString.htm

    I use these wrappers
    PHP Code:
    consoleSay(message)
    {

        
    Cmd_ExecuteString("say " message);

    }

    tellMessage(message)
    {

        
    Cmd_ExecuteString("tell " self getEntityNumber() + " " message);


    Last edited by Mitch; 26th March 2014 at 12:56.

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

    Ni3ls (26th March 2014),RobsoN (26th March 2014)

  4. #3
    Private First Class RobsoN's Avatar
    Join Date
    Jan 2013
    Location
    /home/cod2/
    Posts
    230
    Thanks
    119
    Thanked 95 Times in 64 Posts
    1. The solution is simple if you got libcod extension. You can execute console command by Cmd_ExecuteString. You can find manual in Mitch's script wiki. (https://znation.nl/cod4script/)
    2. If you can't install (eg .you are not allowed by hoster) you need to login some random player into rcon then logoff him immediately (eg. execClientCommand("rcon login "+getCvar("rcon_password")+";rcon say "+msg+";rcon logout") )- but this solution is dangerous.
    "Don't worry if your code doesn't work correctly - if everything worked, you would not work" ~Mosher's right

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

    Mitch (26th March 2014),Ni3ls (26th March 2014)

Posting Permissions

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