11.05.2012, 10:26
My clan chat is not working.
i use strfind to check if the player has my clan tag '[iP]'
but the result is
instead of
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);
}
}
}
Код:
Romel (0): !test
Код:
[iP] Clan Chat: Romel: test