19.04.2009, 07:17
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
new tmp[256];
new idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, " /unmute ", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, color, " Usage: /unmute [id] ");
new giveplayerid = strval(tmp);
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, color, " Player not connected ! ");
new name[24], name2[24], str[128];
GetPlayerName(playerid, name, 24);
GetPlayerName(giveplayerid, name2, 24);
format(str, sizeof str, " Administrator %s has unmuted %s ", name, name2);
SendClientMessageToAll(color, str);
Muted[giveplayerid] = 0;
return 1;
}
else return SendClientMessage(playerid, color, " Not an administrator! ");
}
return 0;
}