Blockland Forums > Suggestions & Requests
ChatMsgAll outside of minigames
TheArmyGuy:
Basically what the title says. CenterPrintAll and BottomPrintAll would be great to have, too. And don't bother with admin-only whatever things, I would only use this for certain events inside a build without wanting to force everyone inside a minigame. usually I use wrench events admin only, anyways. However, some people might prefer an admin-only version, but I really don't care. Thanks in advance :)
WALDO:
This sounds like a cool idea. /support
Treynolds416:
This would be relatively easy to do, I could have sworn it's been done before
If you still need this in a few hours remind me and I'll do it
pecon98:
--- Code: ---registerOutputEvent(fxDtsBrick, "ChatMessageServer", "STRING 200 150", 1);
registerOutputEvent(fxDtsBrick, "CenterPrintServer", "STRING 200 150 INTEGER 0 10", 1);
registerOutputEvent(fxDtsBrick, "BottomPrintServer", "STRING 200 150 INTEGER 0 10 BOOL", 1);
function fxDtsBrick::ChatMessageServer(%this, %msg, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
messageClient(%client,'', %msg);
}
}
function fxDtsBrick::CenterPrintServer(%this, %msg, %time, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time);
}
}
function fxDtsBrick::BottomPrintServer(%this, %msg, %time, %bar, %oClient)
{
%numClients = ClientGroup.getCount();
for(%i; %i<numClients; %i++)
{
%client = ClientGroup.get(%i);
%client.centerPrint(%msg,%time,%bar);
}
}
--- End code ---
I don't have time to test this, but this is generally what you need. You can test it out by copying all the code and then entering eval(getclipboard()); into the console while hosting a server. Though you'll want it packaged as an add-on if you want it to function properly.
TheArmyGuy:
I can't test it anymore before I go to bed, but many thanks still. The first thing I'm doing when I get up is testing it out.