26.04.2018, 19:54
PHP код:
public OnPlayerText(playerid, text[])
{
new TColor[110], chatName[MAX_PLAYER_NAME];
GetPlayerName(playerid, chatName, sizeof(chatName));
static LastPrivmsg[MAX_PLAYERS][128];
if(strfind(LastPrivmsg[playerid], text, false) != -1) return ShowPlayerDialog(playerid, 84, DIALOG_STYLE_MSGBOX, " ", "{FF5F22}ERROR!, {FFFFFF}No escribas lo mismo repetitivamente.", "Ok", ""), 0;
strmid(LastPrivmsg[playerid], text, 0, strlen(text), sizeof(LastPrivmsg[]));
for(new i = 1; i < MAX_CHAT_LINES-1; i++) Chat[i] = Chat[i+1];
format(TColor, sizeof(TColor), "%s{%06x}%s {FFFFFF}(%d): {FFFFFF}%s", PlayerInfo[playerid][Level] >= 6 ? ("{ff0000}[Owner] ") : (""), GetPlayerColor(playerid) >>> 8, chatName, playerid, text);
SendClientMessageToAll(GetPlayerColor(playerid), TColor);
SetPlayerChatBubble(playerid,text,0xFFFFFFAA, 100.0, 10000);
return 0;
}