Right, I'm back home. You've over complicated the echo message with the timeout and what not. You'll be better off using an echo like Callimuc said. Here's what I've come up with.
PHP Code:
const WAIT_TIME = 5;
function onActionServerside() {
switch(params[0]) {
case "echoMessage": {
if (clientr.msg_wait >= timevar2) {
player.chat = "I must wait" SPC WAIT_TIME SPC "seconds!";
} else {
echo(player.nick SPC "(" @ player.account @ "):" SPC params[1]);
clentr.msg_wait = timevar2 + WAIT_TIME;
}
break;
}
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.chat.starts("/echo")) {
temp.msg = player.chat.substring(6);
triggerServer("gui", "name", "echoMessage", temp.msg);
}
}