30.11.2016, 15:44
Hey!,
So, We basically tried to add the gang tag before every chat msg of a person who's in a gang, but it somehows sends 2 messages, at once one with and one without the tag. Here's my piece of code.
And here's how it looks.
Any know-how on how to fix this?
Any help will be appreciated, thanks.
So, We basically tried to add the gang tag before every chat msg of a person who's in a gang, but it somehows sends 2 messages, at once one with and one without the tag. Here's my piece of code.
Код:
public OnPlayerText(playerid, text[]) { new i = Player[playerid][PlayerGang]; if(i != -1) { new nameS[MAX_PLAYER_NAME], string2[24+MAX_PLAYER_NAME]; GetPlayerName(playerid, nameS, sizeof(nameS)); format(string2, sizeof(string2), "[%s] %s: %s", Gang[i][GangTag],GetName(playerid),text); SendClientMessageToAll(0xC4C4C4FF, string2); return 1; } return 1; }
Any know-how on how to fix this?
Any help will be appreciated, thanks.