I don't want to post because it's, well, it's a shot in the dark, I had no idea what I was doing when I packaged the function, its a mute command so I tried to package servercmdmessagesent but I have no idea how to do this, thus this post, I'll post the code:
[WARNING] ITS MESSY
function servercmdmute(%client, %user)
{
if(%Client.isSuperAdmin == false || %Client.isAdmin == false)
{
messageClient(%client, '', '\c6You must be admin to use this command.');
return;
}
if(%user !$= "")
{
%victim = findClientByName(%user).player;
%victimn = findClientByName(%user);
muteplayer(%victim);
messageAll("",'\c3%1 \c6was muted by \c3%2', %victimn.name, %client.name);
messageClient(%victimn, '', '\c6You are now muted', %user);
return;
}}
package mute
{
function muteplayer(%victim)
{
%victim::onservercmdmessagesent
return;
}
parent::servercmdmessagesent
}
};
activate(mute);
function servercmdunmute(%client, %user)
{
if(%Client.isSuperAdmin == false || %Client.isAdmin == false)
{
messageClient(%client, '', '\c6You must be admin to use this command.');
return;
}
if(%user !$= "")
{
%victim = findClientByName(%user).player;
%victimn = findClientByName(%user);
cancel(%victim.muteplayer);
messageAll("",'\c3%1 \c6was unmuted by \c3%2', %victimn.name, %client.name);
messageClient(%victimn, '', '\c6You are now unmuted', %user);
}
This will be painful.....