01.04.2014, 05:45
Anyone can me ?
Thanks
Thanks
new Mute[MAX_PLAYERS];
CMD:mute(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "USAGE: /mute [playerid]");
if(IsPlayerConnected(id))
{
switch(Mute[id])
{
case 0:
{
Mute[id] = 1;
SendClientMessage(id, -1, "You has been muted by Admin!");
}
case 1:
{
Mute[id] = 0;
SendClientMessage(id, -1, "You has been unmuted by Admin!");
}
}
}
else return SendClientMessage(playerid, -1, "Player not connected!");
}
else return SendClientMessage(playerid, -1, "You are not Admin!");
return 1;
}
public OnPlayerText(playerid, text[])
{
if(Mute[id] == 1) return SendClientMessage(playerid, -1, "You are muted!");
return 1;
}