If player is muted don't work
#1

pawn Код:
public OnPlayerText(playerid, text[])
{
new textv2[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(textv2, sizeof (textv2), "(id: %d) %s", playerid, text);
SendPlayerMessageToAll(playerid, textv2);
if(pInfo[playerid][Muted] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You are muted, you can not talk!");
}
return 0;
}

If you are muted you can still talk, maybe someone can help me?
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(pInfo[playerid][Muted] == 1) {
        SendClientMessage(playerid, COLOR_RED, "You are muted, you can not talk!");
        return 0;
    }
    new textv2[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof (name));
    format(textv2, sizeof (textv2), "(id: %d) %s", playerid, text);
    SendPlayerMessageToAll(playerid, textv2);
    return 0;
}
You must return 0 to prevent it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)