auto-unmute
#1

hey how do i create an auto-unmute for this command?
Код:
CMD:mute(playerid, params[])
{
    new str[128], reason[128], id, time;
    if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_RED, "Error: You are not logged in!");
	if(PlayerAcc[playerid][Admin] >= 3)
	{
		if(sscanf(params, "uis[128]", id, time, reason)) return SendClientMessage(playerid, COLOR_RED, "Syntax: /mute (id) (minutes) (reason)");
		if(id == INVALID_PLAYER_ID) return ErrorMessages(playerid, 2);
	    if(id == playerid) return ErrorMessages(playerid, 4);
	    if(PlayerAcc[id][Mute] == 1) return SendClientMessage(playerid, COLOR_RED, "That player is already mute!");
		format(str, sizeof(str), "%s(%d) has been mute by Admin %s(%d) for %i minutes (for: %s)", GetName(id), id, GetName(playerid), playerid, time, reason);
		SendClientMessageToAll(COLOR_RED, str);
		format(str, sizeof(str), "You mute %s(%d) for %i minutes (for: %s)", GetName(id), id, time, reason);
	    SendClientMessage(playerid, COLOR_YELLOW, str);
	    PlayerAcc[id][Mute] = 1;
	    PlayerAcc[id][MuteTime] = time*time;
	    MuteTimer[id] = SetTimerEx("OnPlayerUnmute", PlayerAcc[id][MuteTime], false, "d", playerid);
	}
	else return ErrorMessages(playerid, 1);
	return 1;
}
some admins forgot to use /unmute. i need an auto unmute saying "%s(%d) have been automatically unmuted."
Reply


Messages In This Thread
auto-unmute - by suni - 02.07.2015, 22:17
Re: auto-unmute - by Sime30 - 02.07.2015, 22:26
Re: auto-unmute - by Prokill911 - 02.07.2015, 22:48
Re: auto-unmute - by suni - 02.07.2015, 23:05
Re: auto-unmute - by Sime30 - 02.07.2015, 23:41
Re: auto-unmute - by suni - 19.07.2015, 22:55
Re: auto-unmute - by suni - 24.07.2015, 19:49
AW: auto-unmute - by Mencent - 24.07.2015, 20:04
Re: auto-unmute - by suni - 24.07.2015, 23:15
Re: auto-unmute - by xVIP3Rx - 24.07.2015, 23:21

Forum Jump:


Users browsing this thread: 6 Guest(s)