12.01.2015, 13:19
pawn Code:
CMD:mute(playerid, params[])
{
new targetid, minutes, reason[128], string[128];
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "Player is not connected to the server");
if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "Command not found on server! /help");
if(sscanf(params,"uis[128]", targetid, minutes, reason)) return SendClientMessage(playerid, COLOR_RED, "Mute: /mute (id) (minutes) (reason)");
format(string, sizeof(string), "Administrator %s muted %s for %d minutes (%s)", PlayerName(playerid), PlayerName(targetid), minutes, reason);
SendClientMessageToAll(COLOR_RED, string);
SetTimer("Unmute", minutes*60000, 0);
return 1;
}
forward Unmute(playerid);
public Unmute(playerid)
{
SendClientMessage(playerid, COLOR_RED, "You have been unmuted automatically by server");
return 1;
}