Help Me I Have This Mute cmd look: if(strcmp(cmd,"mute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(IsMuted[plr] == 0)
{
IsMuted[plr];
new str[256];
format(str,sizeof(str),"ADMIN %s Muted %s for a long time...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"Stop talking or you will be kicked...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot mute him 2 times..");
}
}
}
return 1;
}
else if(strcmp(cmd,"unmute",true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new plr;
tmp = strtok(cmdtext, idx), plr = FindPlayerIDFromString(tmp);
if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c mute [Nick/ID]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else {
if(IsMuted[plr] == 1)
{
IsMuted[plr] = 0;
new str[256];
format(str,sizeof(str),"ADMIN %s unmuted %s...",gPlayers[playerid],gPlayers[plr]);
SendClientMessageToAll(COLOR_WHITE,str);
SendClientMessage(plr,COLOR_RED,"You are free to talk...");
}
else
{
SendClientMessage(playerid,COLOR_RED,"You cannot unmute him without being muted..");
}
}
}
return 1;
}
and onplayertext: if(IsMuted[playerid] == 1)
{
new str[256];
format(str,sizeof(str),"%s was been kicked for revealing the bannana from his mouth..",gPlayers[playerid]);
SendClientMessageToAll(COLOR_WHITE,str);
Kick(playerid);
return 0;
}
}
return 1;
but the problem is that the server does not kick him??? why???