Major points.
Most time-valued functions are measured in milliseconds(10 second release of mute seems unintended to me).
When you do an IF without a body, only one statement will be part of the IF.
Don't use %1 and %2, they won't work. Use %x.name
function servercmdMute(%client, %user)
{
if(!%client.isSuperAdmin)
{
messageClient(%client, '', '\c6You must be a Super Admin to use this command');
return;
}
if(%user !$= "")
{
%victim = FindClientByName(%user);
$Mute[%victim.player] = true;
messageAll('', "\c3"@ %victim.name @" \c6has been muted by \c3"@ %user.name, 5);
messageClient(%victim, '', "\c6You have been muted by \c3"@ %client.name);
//schedule(10000, 0, "unmute", %victim);
}
}
function unmute(%victim)
{
$Mute[%victim.player] = false;
messageClient(%victim, '', "\c6You are now unmuted");
}
function servercmdUnmute(%client, %user)
{
if(!%client.isSuperAdmin)
{
messageClient(%client, '', '\c6You must be a super admin to use that command');
return;
}
if(%user !$= "")
{
$Mute[%victim.player] = false;
messageClient(%victim, '', "\c6You have been unmuted by \c3"@ %client.name);
messageAll('', "\c3"@ %user.name @" \c6has been unmuted by \c3"@ %client.name);
}
}
package mutePackage
{
function servercmdMessageSent(%client, %text)
{
if($mute::mute[%victim.player])
{
messageClient(%client, '', '\c6You cannot talk while muted.');
return;
}
else
Parent::ServercmdmessageSent(%client, %text);
}
};
ActivatePackage(mutePackage);