PDA

View Full Version : say message with console



ORDI
26th March 2014, 11:43
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

Mitch
26th March 2014, 12:52
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 (https://github.com/kungfooman/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


consoleSay(message)
{

Cmd_ExecuteString("say " + message);

}

tellMessage(message)
{

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

}

RobsoN
26th March 2014, 12:58
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.