Author Topic: Script that prints text  (Read 1011 times)

I'm looking for a script that will just print text in chat upon entering a specific /command.
« Last Edit: March 26, 2017, 02:40:45 PM by 8hbc »

/messagesent should work
can you be more descriptive/examples?

Like you could type /rules and in chat, it would display the text in chat

But what do you want printed specifically

Code: [Select]
function serverCmd<command>(%client)
{
%client.chatMessage("<text>");
}

so if I wanted to make a command duck which printed out a triangle of quacks
Code: [Select]
function serverCmdDuck(%client)
{
%client.chatMessage("<color:ffffff>quack");
%client.chatMessage("<color:ffffff>quack quack");
%client.chatMessage("<color:ffffff>quack quack quack");
}

would print out
quack
quack quack
quack quack quack

when I type /duck in the chat

Code: [Select]
function serverCmd<command>(%client)
{
%client.chatMessage("<text>");
}
I sent him something like that over Steam, but instead of %client.chatMessage("<text>");, it was messageAll("","MESSAGE");

That's fine too, right?

I sent him something like that over Steam, but instead of %client.chatMessage("<text>");, it was messageAll("","MESSAGE");

That's fine too, right?

That will print the message to all players instead.
You should also use single quotes '' for the first parameter of messageAll, as it's a tagged string.

Thanks! I was having a problem with tabbing as <br> wasn't working