I am very new to TorqueScript (in fact, I just started learning today), and I'd like some help with this basic script I've been trying to make.
Pretty much I am trying to make it so that if the client types "/messageall {message}", a chat message is displayed to all users, and if the client types "/messageuser {user blid} {message}" then a message is sent to a specific user.
function servercmdMessageAll(%client, %message)
{
if (!%client.issuperadmin) return;
messageAll(%message);
}
function servercmdMessageUser(%client, %blid, %message)
{
%target = getclientbyid(%blid);
if (%target == -1) return;
messageClient(%target, "", "<color:FF0000>Message from [" @ %client @ "] <color:FFFFFF>" @ %message");
}
Unfortunately, this code does not run. Even when trying simple commands like talk(); it still does not display.
I'd greatly appreciate any help (even more so if well explained), even if this script is utter nonsense.
Thanks!