13.07.2012, 01:59
I have made if a player chat then his id will show along with his name
At the same time i have made anti spam too, if a player type anything then others cant see that msg and send message to the player that" Stop repeating"
Here is the code of both
The problem is that if i put return 1;} at the end then anti spam will work where as i put return 0;} then this will work
Both will not work at the same time, i tried a lot but no use.
Can anyone please make this both work at the same time?
Thanks in advance
Quote:
Crazyboobs (ID): chat |
Here is the code of both
pawn Код:
public OnPlayerText(playerid, text[]){
new
msg[128],
tPlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, tPlayerName, MAX_PLAYER_NAME);
format(msg, sizeof(msg), "%s (%d): {FFFFFF}%s", tPlayerName, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), msg);
static pText[MAX_PLAYERS][128];
if(pText[playerid][0] != '\0' && !strcmp(text,pText[playerid],true)) return SendClientMessage(playerid,-1,"* Stop repeating!") & 0;
strcat((pText[playerid][0]='\0',pText[playerid]),text,128);
return 1;}
Quote:
Crazyboobs (ID): chat |
Can anyone please make this both work at the same time?
Thanks in advance