Help with Mute command
#1

If i mute player for 5 min, when he left the server and come back again after theese 5 minutes it's bugged. He is still muted. How to fix it?

Код:
CMD:mute(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 2)
	{
	    new id, time, reason[128];
	    if(sscanf(params, "dds[128]", id, time, reason)) return SendClientMessage(playerid, WHITE, "USAGE:/mute (ID) (minutes) (reason)");
	    if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, RED, "Player not found!");
	    if(PlayerInfo[id][pMuted] == 1) return 1;
	    if(PlayerInfo[id][pAdmin] >= 5)
        {
            SendClientMessage(playerid, RED, "You cannot mute 5 level admin!");
		}
	    else
	    {
	    new adname[MAX_PLAYER_NAME], tt[MAX_PLAYER_NAME], str[250];
	    GetPlayerName(playerid, adname, sizeof(adname));
	    GetPlayerName(id, tt, sizeof(tt));
	    mtimer = SetTimerEx("UnMute",time*1000*60,0,"i",id);
	    PlayerInfo[id][pMuted] = 1;
	    format(str, sizeof(str), "ADMIN: %s is muted by admin %s за %d minutes. Reason: %s", tt, adname, time, reason);
	    SendClientMessageToAll(RED, str);
	    return 1;
	    }
 	}
	else return SendClientMessage(playerid, RED, "You are not an admin!");
	return 1;
}
Reply


Messages In This Thread
Help with Mute command - by Stoyanov - 06.12.2014, 17:04
Re: Help with Mute command - by Ryz - 06.12.2014, 17:06
Re: Help with Mute command - by Stoyanov - 06.12.2014, 17:17
Re: Help with Mute command - by Stoyanov - 06.12.2014, 17:56
Re: Help with Mute command - by Ryz - 06.12.2014, 17:58
Re: Help with Mute command - by Stoyanov - 06.12.2014, 18:00
Re: Help with Mute command - by Stoyanov - 06.12.2014, 20:17
Re: Help with Mute command - by Stoyanov - 07.12.2014, 11:42
Re: Help with Mute command - by Stoyanov - 08.12.2014, 12:51
Re: Help with Mute command - by MD5 - 08.12.2014, 12:54

Forum Jump:


Users browsing this thread: 5 Guest(s)