14.12.2012, 15:07
pawn Код:
CMD:mute(playerid, params[])
{
new id, string[128], time;
if(PlayerInfo[playerid][pAdmin] < 1)return NisiAdmin(playerid);
else if(sscanf(params, "ui", id, time))return Koristi(playerid, "/mute [ime/ID] [Time in seconds]");
if(time < 0) return SendClientMessage(playerid, -1, "Time cannot be lower than 0");
else if(id == INVALID_PLAYER_ID) return PogresanID(playerid);
SetPVarInt(id, "Mutan", 1);
format(string, sizeof(string), ""#COL_YELLOW"Mute|Utisao si igraca %s!",PlayerName(id));
SendClientMessage(playerid,-1, string);
format(string, sizeof(string), ""#COL_YELLOW"Mute|Mutan si od Admina %s!",PlayerName(playerid));
SendClientMessage(id,-1, string);
SetTimerEx("unmute", time, 0, "i", id);
return 1;
}
forward unmute(p);
public unmute(p)
{
SetPVarInt(p, "Mutan", 0);
SendClientMessage(p, -1, "You have been automatically unmuted.");
return 1;
}
Didn't notice you want an unmute command, sec.