function blNotificationLoop(%msg,%time,%mil)
{
cancel($blNotificationLoop);
%cnt = ClientGroup.getCount();
for(%i=0;%i<%cnt;%i++)
{
%client = ClientGroup.getObject(%i);
if(!%client.ignoreSpam)
messageClient(%client,'',%msg);
}
if(!%mil)
$blNotificationLoop = schedule(%time * 1000,0,blNotificationLoop,%msg,%time,%mil);
else
$blNotificationLoop = schedule(%time,0,blNotificationLoop,%msg,%time,%mil);
}
function serverCmdToggleGLMessage(%client,%time,%mil)
{
if(!%client.isAdmin)
return;
if(isEventPending($blNotificationLoop))
{
cancel($blNotificationLoop);
messageAll('',"\c6Blockland Greenlight Notification Spam has been \c0DISABLED\c6.");
return;
}
else
{
if(%time / 1000 >= 1 && !%mil)
{
messageClient(%client,'',"\c6It appears that you wrote the time in millaseconds.");
messageClient(%client,'',"\c6So we will fix it, because I'm sure you mean \c3" @ %time / 1000 @ " \c6seconds not \c3" @ %time @ " \c6seconds.");
messageClient(%client,'',"\c6But if you did mean \c3" @ %time @ " \c6millaseconds, then just do /ToggleGLMessage " @ %time @ " 1. The 1 will tell Blockland to use millaseconds.");
%time = %time / 1000;
}
announce("\c6Blockland Greenlight Notification Spam has been \c4ENABLED\c6.");
blNotification(%time,"Help Blockland get on Steam's greenlight! Click <a:steamcommunity.com/sharedfiles/filedetails/?id=95710780>here!</a>",%mil);
}
}
function serverCmdIgnoreMe(%client)
{
if(%client.ignoreSpam)
{
messageClient(%client,'',"\c6You will no longer be ignored in Blockland Greenlight Message Spam.");
%client.ignoreSpam = false;
}
else
{
messageClient(%client,'',"\c6You will no longer be bothered about Blockland Greenlight.");
%client.ignoreSpam = true;
}
}
Now loving use that.