Automute for Swearing
#6

Quote:
Originally Posted by Puzi
It works but when I compile i get Windows Error =/ Please help.

//edit: I don't mean stars because its not good for me. Punishment is better I think =) Btw, I wanted a Time limit for it like 15/20 secs so it unmutes after that time automatically.
So it doesn't work xD

Fix i hope:
pawn Код:
new Muted[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
  if (Muted[playerid]) { SendClientMessage(playerid, 0xFF0000FF, "You are muted, you cannot speak!"); return 0; }
  if (strfind(text, "noob", true) != -1 ||
    strfind(text, "asshole", true) != -1 ||
    strfind(text, "n00b", true) != -1
  )
  {
    Muted[playerid] = true;
    SendClientMessage(playerid, 0xFF0000FF, "You got muted for swearing!");
    SetTimerEx("UnMuted", 20000, 0, "d", playerid);
  }
}

public UnMuted(playerid)
{
  Muted[playerid] = false;
  return 1;
}
This will work i hope. This also unmutes the player after 20 seconds (changeble, by changing the 20000 at SetTimerEx, to the miliseconds to wait till unmute
Reply


Messages In This Thread
Automute for Swearing - by Puzi - 28.06.2009, 13:09
Re: Automute for Swearing - by Donny_k - 28.06.2009, 13:14
Re: Automute for Swearing - by [nl]daplayer - 28.06.2009, 13:15
Re: Automute for Swearing - by Puzi - 28.06.2009, 13:18
Re: Automute for Swearing - by Puzi - 28.06.2009, 13:28
Re: Automute for Swearing - by [nl]daplayer - 28.06.2009, 13:30
Re: Automute for Swearing - by dice7 - 28.06.2009, 13:34
Re: Automute for Swearing - by Puzi - 28.06.2009, 13:34
Re: Automute for Swearing - by [nl]daplayer - 28.06.2009, 13:36
Re: Automute for Swearing - by Puzi - 28.06.2009, 13:49

Forum Jump:


Users browsing this thread: 2 Guest(s)