14.12.2010, 20:41
Thanks, That work ![Cheesy](images/smilies/biggrin.png)
and i got an other question: My mute is bugged - It mute me instead of the player i clicked on =/
![Cheesy](images/smilies/biggrin.png)
and i got an other question: My mute is bugged - It mute me instead of the player i clicked on =/
pawn Код:
new Mute[MAX_PLAYERS];
forward Unmute(playerid);
pawn Код:
else if(dialogid == 16)
{
if(response)
{
new playerwhogotmuted[MAX_PLAYER_NAME], string[128];
GetPlayerName(adminPlayer[playerid], playerwhogotmuted, sizeof(playerwhogotmuted));
format(string, sizeof(string), "**(ADMIN MUTE)** %s(%d) %s",playerwhogotmuted, playerid, inputtext);
SendClientMessageToAll(COLOR_ADMINORANGE, string);
adminPlayer[playerid] = 0;
//Mute
Mute[adminPlayer[playerid]] = 1;
adminPlayer[playerid] = 0;
//Timer
SetTimer("Unmute",120000 ,false);
} else return SendClientMessage(playerid, COLOR_ADMINRED, "Error: You have cancelled the Mute Menu.");
}
pawn Код:
public Unmute(playerid)
{
new playerwhogotmuted[MAX_PLAYER_NAME], string[128];
GetPlayerName(adminPlayer[playerid], playerwhogotmuted, sizeof(playerwhogotmuted));
format(string, sizeof(string), "**(ADMIN UNMUTE)** %s(%d), Read /rules /pc /commands",playerwhogotmuted, playerid);
SendClientMessageToAll(COLOR_ADMINORANGE, string);
Mute[adminPlayer[playerid]] = 0;
adminPlayer[playerid] = 0;
}
pawn Код:
public OnPlayerText(playerid, text[])
{
if(Mute[playerid] == 1)
{
SendClientMessage(playerid, COLOR_ADMINMUTE, "You Are Muted. You Cannot Chat");
return 0;
}
return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
Mute[playerid] = 0;
return 1;
}