SA-MP Forums Archive
Mute player. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mute player. (/showthread.php?tid=86002)



Mute player. - Abernethy - 11.07.2009

Hello again, I wanted to ask how you mute a player.
Eg, OnPlayerText you type, "Games" (Which will trigger my computer text (Project I'm working on)) it doesn't display the "Abernethy: Games". Thankszz.


Re: Mute player. - happyface - 11.07.2009

maybe something like this?

pawn Код:
new Mute[MAX_PLAYERS];
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(Mute[playerid] == 1)
    {
        return 0;
    }

    if(strcmp(text, "jobs", true) == 0)
    {
        Mute[playerid] = 1;
    }
   
    return 1;
}




Re: Mute player. - saiberfun - 11.07.2009

just return 0 on the text u want to mute like i already seen

pawn Код:
OnPlayerText(playerid,text[])
{
if(strcmp(text, "Games", true) == 0)
{
//ur function
return 0;
}
return 1;
}



Re: Mute player. - Abernethy - 11.07.2009

Quote:
Originally Posted by saiberfun
just return 0 on the text u want to mute like i already seen

pawn Код:
OnPlayerText(playerid,text[])
{
if(strcmp(text, "Games", true) == 0)
{
//ur function
return 0;
}
return 1;
}
invalid function or declaration.


Re: Mute player. - LarzI - 11.07.2009

just add 'public' before 'OnPlayerText(playerid,text[])'

I would recommend happyface's code