21.08.2016, 10:43
Quote:
Код:
new LastMsg[MAX_PLAYERS]; public OnPlayerConnect(playerid) { LastMsg[playerid] = 0; } public OnPlayerText(playerid, text[]) { if(strfind(LastText[playerid], text, false) != -1) { LastMsg[playerid]++; if(LastMsg[playerid] >= 2) // If he repeats it twice { SendClientMessage(playerid, COLOR_RED, "Don't repeat your message."); return false; } else LastMsg[playerid] = 0; strmid(LastText[playerid], text, 0, strlen(text), sizeof(LastText[])); } } |