Mute player.
#1

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.
Reply
#2

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;
}

Reply
#3

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;
}
Reply
#4

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.
Reply
#5

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

I would recommend happyface's code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)