Well, I tested it, and it mutes who ever uses it with the target, here is the code:
if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
if(!$RTB::RTBR_ServerControl_Hook)
exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");
RTB_registerPref("Mute Command","Server Commands","Mute::Users","list SuperAdmin 1 Admins 2 Host 3", "Mute Command","1", 0, 1);
}
else
{
$Mute::Users = "1";
}
function servercmdMute(%client, %user, %time)
{
if($Mute::Users == 1 && !%client.isSuperAdmin)
{
messageClient(%client, '', '\c6You must be a super admin to use this command.');
return;
}
if($Mute::Users == 2 && !%client.isAdmin)
{
messageClient(%client, '', '\c6You must be an Admin to use this command.');
return;
}
if($Mute::Users == 3 && !((isObject(localclientconnection) && %client.getID() == localclientconnection.getID())) || !%client.bl_id == getNumKeyID())
{
messageClient(%client, '', '\c6You must be the Host to use this command.');
return;
}
if(%time =="")
{
%victim = FindClientByName(%user);
$Mute[%victim.BLID] = true;
messageAll("", "\c3"@ %victim.name @"\c6 has been muted by \c3"@ %client.name);
messageClient(%victim, '', "\c6You have been muted by \c3"@ %client.name);
cancel($mute::schedule[%victim.BLID]);
}
else
{
%victim = FindClientByName(%user);
$Mute[%victim.BLID] = true;
messageAll("", "\c3"@ %victim.name @"\c6 Has been muted by \c3"@ %client.name @"\c6 for "@ %time @" Seconds");
messageClient(%victim, '', "\c6You have been muted by \c3"@ %Client.name @"\c6 for "@ %time @" Seconds");
Cancel($mute::Schedule[%victim.BLID]);
$mute::Schedule[%victim.BLID] = schedule(%time*1000,0,"unmute", %victim);
}}
function unmute(%victim)
{
$Mute[%victim.BLID] = false;
MessageClient(%victim, '', "\c6You are now unmuted");
}
function servercmdunmute(%client, %user)
{
if($Mute::Users == 1 && !%client.isSuperAdmin)
{
messageClient(%client, '', '\c6You must be a super admin to use this command.');
return;
}
if($Mute::Users == 2 && !%client.isAdmin)
{
messageClient(%client, '', '\c6You must be an Admin to use this command.');
return;
}
if($Mute::Users == 3 && !((isObject(localclientconnection) && %client.getID() == localclientconnection.getID())) || !%client.bl_id == getNumKeyID())
{
messageClient(%client, '', '\c6You must be the Host to use this command.');
return;
}
if($mute[%victim.BLID] == false)
{
messageClient(%client, '', "\c6That player is not muted!");
return;
}
else
{
%victim = FindClientByName(%user);
$Mute[%victim.BLID] = false;
messageClient(%victim, '', "\c6You have been unmuted by \c3"@ %client.name);
messageAll("", "\c3"@ %victim.name @" \c6has been unmuted by \c3"@ %client.name);
cancel($mute::Schedule[%victim.BLID]);
}}
package mute
{
function servercmdMessageSent(%client, %text)
{
if($mute[%victim.BLID] == true)
{
messageClient(%client, '', "\c6You cannot talk while muted.");
}
else
{
Parent::ServercmdmessageSent(%client, %text);
}
}
};
ActivatePackage(mute);
Now I don't know why this is, but I would like to know how to fix this, is it a problem with storing it on the BLID?
-edit-
It doesn't mute just those people, it mutes everyone in the server!