/kick and admin chat
#8

Quote:
Originally Posted by xir
Посмотреть сообщение
Can I do this with onplayertext?

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(muted[playerid] == 1)
    {
    SendClientMessage(playerid, Red, "You are muted and cannot talk");
    return 1;
    }
    return 0;
}
I take it you have a /mute command which mutes the players and makes them unable to chat with the other players. You will be sending the "You are muted and cannot talk" message, but it will still send their message to the other players because you have "return 1;" underneath it. You need to "return 0" and if this isn't a role-play server, the last "return 0;" should be "return 1;".
Reply


Messages In This Thread
/kick and admin chat - by xir - 29.12.2010, 20:19
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:24
Re: /kick and admin chat - by xir - 29.12.2010, 20:28
Re: /kick and admin chat - by Scenario - 29.12.2010, 20:34
Re: /kick and admin chat - by xir - 29.12.2010, 20:36
Re: /kick and admin chat - by xir - 29.12.2010, 20:39
Re: /kick and admin chat - by _rAped - 29.12.2010, 21:26
Re: /kick and admin chat - by Scenario - 30.12.2010, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)