04.09.2015, 12:47
means when players to quieten (mute) although write time will be muted during this time is not running does nothing and the player is muted until I do not / unmute if we can fix the timer counts down to after a while un - mute
Vreme =Time
Vreme =Time
Код:
CMD:mute(playerid,params[])
{
if(UlogovanProvera[playerid] == 0) return Ulogovan(playerid);
new ID, Vreme, Razlog[64], str[128];
if(PlayerInfo[playerid][pAdmin] < 2) return Ovlasteni(playerid);
if(AdminDuty[playerid] == 0) return Duznost(playerid);
if(sscanf(params, "uis[64]", ID, Vreme, Razlog)) return SCM(playerid, -1, ""ORANGE"[ARP - INFO] "BELA"/mute [ID/Nick] [Vreme (minuta)] [Razlog]");
if(PlayerInfo[ID][pMutiran] == 1) return SCM(playerid,-1,""CRVENA"#GRESKA: "BELA"Taj igrac je vec mutiran!");
if(Vreme < 1 || Vreme > 60) return SCM(playerid, -1, ""CRVENA"#GRESKA: "BELA"Ne mozete mutirati igraca manje od 1 minuta i vise od 60 minuta!");
if(!IsPlayerConnected(ID)) return SCM(playerid, -1, ""CRVENA"#GRESKA: "BELA"Pogresan ID!");
PlayerInfo[ID][pMutiran] = 1;
PlayerInfo[ID][pMutiranVreme] = Vreme*60;
format(str,sizeof str,""ZUTA"MUTE: "BELA"Mutirani ste od strane admina %s na %d | Razlog: %s!", GetName(playerid), Vreme, Razlog);
SCM(ID,-1,str);
format(str,sizeof str,""ZUTA"MUTE: "BELA"Mutirali ste igraca %s na %d | Razlog: %s!", GetName(ID), Vreme, Razlog);
SCM(playerid,-1,str);
return 1;
}
///////////////////////////////////////////////////////
CMD:unmute(playerid,params[])
{
if(UlogovanProvera[playerid] == 0) return Ulogovan(playerid);
new pid,str[128];
if(PlayerInfo[playerid][pAdmin] < 3) return Ovlasteni(playerid);
if(AdminDuty[playerid] == 0) return Duznost(playerid);
if(sscanf(params, "u", pid)) return SCM(playerid,-1,""ORANGE"[ARP - INFO] "BELA"/unmute [id]");
if(PlayerInfo[pid][pMutiran] == 0) return SCM(playerid,-1,""CRVENA"#GRESKA: "BELA"Taj igrac nije mutiran!");
if(!IsPlayerConnected(pid)) return SCM(playerid, -1, ""CRVENA"#GRESKA: "BELA"Pogresan ID!");
PlayerInfo[pid][pMutiran] = 0;
format(str,sizeof str,""ZUTA"UNMUTE: "BELA"Admin %s vas je unmutirao | Sada mozete ponovo pisati!", GetName(playerid));
SCM(pid,-1,str);
format(str,sizeof str,""ZUTA"UNMUTE: "BELA"Unmutirali ste %s | Sada moze ponovo pisati!", GetName(pid));
SCM(playerid,-1,str);
return 1;
}

