Advertisement
Guest User

Untitled

a guest
May 25th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. getchatline(Line, ByRef Output, timestamp=0, color=0){
  2. chatindex := 0
  3. FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  4. loop, Parse, file, `n, `r
  5. {
  6. if(A_LoopField)
  7. chatindex := A_Index
  8. }
  9. loop, Parse, file, `n, `r
  10. {
  11. if(A_Index = chatindex - line){
  12. output := A_LoopField
  13. break
  14. }
  15. }
  16. file := ""
  17. if(!timestamp)
  18. output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
  19. if(!color)
  20. output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
  21. return
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement