11.07.2011, 20:23
PHP код:
public XaPMutePlayer(playerid, time, reason) // Credit To XaP Admin Mod !
{
if(!IsPlayerConnected(playerid)) return 1;
new string[256],ActionName[24]; GetPlayerName(playerid,ActionName,24);
AccInfo[playerid][Muted] = 1;
new nTime[16];
nTime = time;
if(time == 1)
{
format(string, 256, "The player %s has been muted for %d second.(Reason: %s)", ActionName, nTime, reason);
}
else if(time <= 59 && >= 2)
{
format(string, 256, "The player %s has been muted for %d seconds.(Reason: %s)", ActionName, nTime, reason);
}
else if(time >= 60)
{
format(string, 256, "The player %s has been muted for %d seconds.(Reason: %s)", ActionName, nTime, reason);
}
TimerUnMute[playerid] = SetTimerEx("UnMutePlayer", (time*1000), 0, "d", playerid);
SendClientMessageToAll(yellow,string);
return 1;
}