Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-----------------------------------------------------------------------------
- // Script_Mute
- // Made by Elopus A.K.A. QuantumWarpCode
- // For use in Blockland
- //-----------------------------------------------------------------------------
- package mute
- {
- function serverCmdmute(%client, %target, %time)
- {
- if(%client.isAdmin || %client.isSuperAdmin)
- {
- %target = findClientByName(%target);
- if(%target != 0)
- {
- if(%target.isMuted)
- {
- messageClient(%client,'',"This person has already been muted.");
- }
- else
- {
- %target.isMuted = true;
- messageClient(%target, '', '\c3You have been muted by \c6%1\c3 for \c6%2\c3 seconds.', %client.name, %time);
- %time *= 1000;
- %target.muteSchedule = schedule(%time, 0, muteTimeUp, %target);
- }
- }
- else
- {
- messageClient(%client,'',"Player not found.");
- }
- }
- else
- {
- messageClient(%client,'',"You are not an admin.");
- }
- }
- function serverCmdunMute(%client, %target)
- {
- if(%client.isAdmin || %client.isSuperAdmin)
- {
- %target = findClientByName(%target);
- if(%target != 0)
- {
- if(!%target.isMuted)
- {
- messageClient(%client,'',"This person is not muted.");
- }
- else
- {
- %target.isMuted = false;
- messageClient(%target, '', '\c3You have been unmuted by \c6%1\c3.', %client.name);
- cancel(%target.muteSchedule);
- }
- }
- else
- {
- messageClient(%client,'',"Player not found.");
- }
- }
- else
- {
- messageClient(%client,'',"You are not an admin.");
- }
- }
- function muteTimeUp(%client)
- {
- %client.isMuted = false;
- messageClient(%client, '', '\c3Your mute time is up. You can now talk.');
- }
- function serverCmdmessageSent(%client, %text)
- {
- if(%client.isMuted)
- {
- messageClient(%client,'',"You have been muted. You cannot talk.");
- }
- else
- {
- parent::serverCmdmessageSent(%client, %text);
- }
- }
- };
- activatePackage(mute);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement