Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :O?:/copstats::
- myarrests := 0
- doublearrests := 0
- kills := 0
- licenses := 0
- drugsReceived := 0
- drugsDelivered := 0
- username := "Lewis_Flow"
- FileRead, log, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog\weeks\%A_YWeek%.log
- if WinExist("GTA:SA:MP")
- {
- FileRead, chatlog, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- StringReplace, chatlog, chatlog, `r`n, `n, All
- log := log chatlog
- }
- log := StrSplit(log, "`n")
- for i, el in log
- {
- if InStr(el, "[ARREST]", true)
- {
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \*\[ARREST\] Офицер " username " посадил\(а\) на нары .*? \(срок\: \d+ мин\)")
- {
- myarrests++
- }
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \*\[ARREST\] Офицеры (.*?) и (.*?) посадили на нары .*? \(срок\: \d+ мин\)", match)
- {
- if (match1 == username || match2 == username)
- {
- doublearrests++
- }
- }
- }
- if InStr(el, "арестован и посажен", true)
- {
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \* Преступник .*? арестован и посажен на \d+ секунд\. Вы получили \$\d+\.")
- {
- kills++
- }
- }
- if InStr(el, "[LIC]", true)
- {
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \* \[LIC\] .* " username " изъял\(а\) .* у .*")
- {
- licenses++
- }
- }
- if InStr(el, "[DRUGS]", true)
- {
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \[DRUGS\] Сотрудник FBI " username " сдал\(а\) конфискованные наркотики \((.*) гр\)\.", match)
- {
- t := match1
- t += 0
- drugsDelivered += t
- }
- }
- if InStr(el, "Вы конфисковали", true)
- {
- if RegExMatch(el, "^\[\d{2}:\d{2}:\d{2}\] \* Вы конфисковали (.*?)г всех наркотиков у .*?\[\d+\]\. Доставьте конфискат в офис FBI\.", match)
- {
- t := match1
- t += 0
- drugsReceived += t
- }
- }
- }
- addBindMessage(COLOR_GREEN, "Статистика за " A_YWeek ":")
- addBindMessage(COLOR_WHITE, "Аресты(свои): " COLOR_ORANGE myarrests)
- addBindMessage(COLOR_WHITE, "Аресты(с напарниками): " COLOR_ORANGE doublearrests)
- addBindMessage(COLOR_WHITE, "Аресты(всего): " COLOR_ORANGE myarrests + doublearrests)
- addBindMessage(COLOR_WHITE, "НонРП аресты: " COLOR_ORANGE kills)
- addBindMessage(COLOR_WHITE, "Наркотики: " COLOR_ORANGE drugsDelivered COLOR_WHITE " / " COLOR_ORANGE drugsReceived)
- addBindMessage(COLOR_WHITE, "Лицензии: " COLOR_ORANGE licenses)
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement