Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getchatline(Line, ByRef Output, timestamp=0, color=0){
- chatindex := 0
- FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- loop, Parse, file, `n, `r
- {
- if(A_LoopField)
- chatindex := A_Index
- }
- loop, Parse, file, `n, `r
- {
- if(A_Index = chatindex - line){
- output := A_LoopField
- break
- }
- }
- file := ""
- if(!timestamp)
- output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
- if(!color)
- output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement