14.03.2011, 22:53
I have this command but when they mute you you can speak
I want to add a timer too.
I want to add a timer too.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/mute", true, 5))
{
new Muted[MAX_PLAYERS];
if(!strlen(cmdtext[6]))
{
SendClientMessage(playerid, COLOR_RED, "Usage: /mute [playerid]");
return 1;
}
new ID = strval(cmdtext[6]);
new pName[24], str[64];
if(IsPlayerConnected(ID))
{
GetPlayerName(ID, pName, 24);
format(str, 64, "%s has been muted", pName);
SendClientMessageToAll(COLOR_RED, str);
print(str);
Muted[playerid] = 1;
}
return 1;
}
return 0;
}