01.06.2011, 20:34
Need help how to make on mute command timer
Here are the commands that look sorry for my English
Here are the commands that look sorry for my English
Код:
if(strcmp(cmd, "/mute", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid/PartOfName]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
GiveNameSpace(giveplayer);
if(PlayerInfo[playerid][pAdmin] == 11) { sendername = "Hidden Admin"; }
if(Mute[playa] == 0)
{
Mute[playa] = 1;
format(string, sizeof(string), "AdmCmd: %s was silenced by %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
else
{
Mute[playa] = 0;
format(string, sizeof(string), "AdmCmd: %s was unsilenced by %s",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}

