function fxDtsBrick::messageAllClients(%this,%message,%client)
{
if(%this.getGroup().client.isHost)
messageAll('',%message);
}
registerOutputEvent(fxDTSBrick, "messageAllClients", "string 255 255",1);
//Code from Truce's admin controls add-on
//This is for checking for host.
package ACM {
function GameConnection::autoAdminCheck(%cl) {
%cl.isHost=0;
if(%cl.isLocalConnection()||%cl.bl_id==getNumKeyID())
%cl.isHost=1;
return Parent::autoAdminCheck(%cl);
}
function CheckACM(%cl,%cmd) {
switch($AdminControls[%cmd]) {
case 0:
if(%cl.isAdmin||%cl.isSuperAdmin||%cl.isHost)
return 1;
%type="\c3Admins\c0, \c3Super Admins\c0, and the \c3Host";
case 1:
if(%cl.isSuperAdmin||%cl.isHost)
return 1;
%type="\c3Super Admins\c0 and the \c3Host";
case 2:
if(%cl.isHost)
return 1;
%type="the \c3Host";
}
messageClient(%cl,'',"\c0Sorry, only "@%type@" \c0can use the \c3"@%cmd@" \c0command.");
return 0;
}
};
activatePackage(ACM);
Untested.