Okay now. Now the problem is, is it sends the message on /startaa and it does not loop.
function AnnounceTime_Loop()
{
cancel($AnounceTime::Loop);
if($AnounceTime::AnnounceTime < 1)
{
$AnounceTime::AnnounceTime = 1;
}
$AnounceTime::Loop = schedule($AnounceTime::AnnounceTime * 60000,0,"AnnounceTime");
}
function AnnounceTime()
{
%aamsg = $Pref::Server::AutoAnnounce;
messageAll('',"\c3" @ %aamsg @ "\c3.");
}
function serverCmdStartAA(%client)
{
if(%client.isSuperAdmin)
{
cancel($AnounceTime::Loop);
$AnounceTime::Loop = schedule($AnounceTime::AnnounceTime * 60000,0,"AnnounceTime");
messageAll('',%client.getPlayerName() @ "\c3 has started the ***.");
}
else
{
messageClient(%client,'',"\c6Only \c0Super Admins\c3 may start the ***.");
}
}