08.06.2013, 15:14
Well i made function wich will show me chat log ingame, but ingame its show only first line, i want it to show last 100 lines.
Код HTML:
forward ReadChatLog(playerid); public ReadChatLog(playerid) { new string[64]; new File:example = fopen("Logs/chat.log", io_read); fread(example, string, 15000); fclose(example); SendClientMessage(playerid, COLOR_GREEN, "CHAT LOGs:"); SendClientMessage(playerid, COLOR_GREEN, string); return 1; } if(strcmp(cmd, "/ccl", true) == 0) { if(PlayerInfo[playerid][pAdmin] >= 5) { ReadChatLog(playerid); } else { SendClientMessage(playerid, COLOR_GRAD1, "** You are not an admin!"); } return 1; }