28.05.2013, 15:49
Try this:
pawn Код:
CMD:unmute(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new targetid, string[128];
{
if(sscanf(params, "ui", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /unmute [playerid]");
format(string, sizeof(string), "ADMIN: %s has been un-muted.", Name(targetid));
SendClientMessageToAll(C_YELLOW, string);
SendClientMessage(targetid, C_LGREEN, "You are un-muted!");
PlayerInfo[targetid][pMuted] = 0;
}
if(PlayerInfo[targetid][pMuted] == 1)
//{
SendClientMessage(playerid, C_RED, "Player muted!");
//}
else if(PlayerInfo[targetid][pMuted] == 0)
//{
SendClientMessage(playerid, C_RED, "Player not muted!");
//}
}
else SendClientMessage(playerid, C_RED, "You are not authorized to use this command!");
return 1;
}