[Ajuda] io_read
#1

PHP Code:
stock readLog(playerid color filename []) {
    new
        
str 128 ],
        
readString 128 ],
        
FilelogFile;
    if(!
fexist(filename))
        return 
format(str 70 "Archive %s not found." filename) , SendClientMessage(playerid color str);
    
logFile fopen(filename io_read);
    while(
fread(logFile readString)) {
        
format(str sizeof str " {FF0000}%s"readString);
        
SendClientMessage(playerid color str);
    }
    return 
1;

como posso por pra ler somente as ultimas 10 linhas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)