Clan Chat
#1

My clan chat is not working.
i use strfind to check if the player has my clan tag '[iP]'

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '!' && strfind("[iP]", GetpName(playerid), true) == -1)
    {
        format(str, sizeof(str), "[iP] Clan Chat: %s: "white"%s", GetpName(playerid), text);
        SendToiPMember(COLOR_LIGHTGREEN, str);
        return 0;
    }
    return 0;
}

SendToiPMember(color, const str[])
{
    foreach(Player, i)
    {
        if(strfind("[iP]", GetpName(i), true) == -1)
        {
            SendClientMessage(i, color, str);
        }
    }
}
but the result is

Код:
Romel (0): !test
instead of

Код:
[iP] Clan Chat: Romel: test
Reply
#2

When it comes to say:
Код:
Romel (0): !test
Is it sent to all online players, or just the [iP] members?
Reply
#3

Never Mind Solved

How i solve it?

- I just put the code above OnPlayerText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)