/mute /unmute Cmd
#4

pawn Код:
new bool:Muted[MAX_PLAYERS];
pawn Код:
COMMAND:mute(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return 1; // player is not admin
new id = strval(params);
if (!IsPlayerConnected(id)) return 1; // invalid player
if (Muted[id]) return 1; // already muted
Muted[id]=true;
}

COMMAND:unmute(playerid, params[])
{
if (!IsPlayerAdmin(playerid)) return 1; // player is not admin
new id = strval(params);
if (!IsPlayerConnected(id)) return 1; // invalid player id
if (!Muted[id]) return 1; // player not muted
Muted[id]=false;
}
OnPlayerText:


pawn Код:
if (Muted[playerid])
return SendClientMessage(playerid,-1,"You are muted."), 0;
OnPlayerConnect:
pawn Код:
Muted[playerid]=false;
Reply


Messages In This Thread
/mute /unmute Cmd - by Blackazur - 13.10.2012, 16:55
Re: /mute /unmute Cmd - by McFellow - 13.10.2012, 17:36
AW: /mute /unmute Cmd - by Blackazur - 13.10.2012, 17:40
Re: /mute /unmute Cmd - by ReVo_ - 13.10.2012, 17:56
Re: /mute /unmute Cmd - by gtakillerIV - 13.10.2012, 17:58
Re: /mute /unmute Cmd - by ReVo_ - 13.10.2012, 17:59
AW: /mute /unmute Cmd - by Blackazur - 13.10.2012, 18:23

Forum Jump:


Users browsing this thread: 1 Guest(s)