View Single Post
  #6  
Old 10-29-2011, 02:19 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Gunderak View Post
bugger.
Is there any way to read from the rclog.txt file and load the last five lines excluding the date/time?
Something like this could work. This lists the "chat" of the other players, and adds something you will "chat".

PHP Code:
function onActionServerSide() {
  if (
params[0] == "AddText") {
    
temp.filename "logs/rclog.txt";
    
temp.lines = {params[1SPC "(" SPC params[2SPC "):" SPC params[3]};
    
temp.lines.savelines(temp.filename1);
    
temp.file.loadlines(filename);
    for (
temp.aallplayerstemp.a.triggerclient(name"ShowText"temp.file);
  }
}

//#CLIENTSIDE

//GUI stuff

function RC2_textedit01.onAction() {
  
triggerserver("gui"name"AddText"player.nickplayer.communitynameRC2_textedit01.text);
  
RC2_textedit01.text "";
}

function 
onActionClientSide() {
  if (
params[0] == "ShowText"RC2_chatlist_text.addrow(0temp.c[temp.cd]);

__________________
MEEP!
Reply With Quote