Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Include, %A_ScriptDir%\AutoHotKey\includes\SAMP.UDF.ahk
- global Array := []
- Loop {
- if (RegExMatch(getChatLineEx(), "^\w+\[(\d{1,4})\]:\s\{FFCD00\}.*?(\d+).*?$", match)) {
- if (match2 <= 1000) {
- Array[match2] := match1
- }
- }
- }
- $~vkD::
- {
- if (IsInChat() && !IsDialogOpen()) {
- Sleep, 170
- dwAddress := dwSAMP + 0x12D8F8
- chatInput := readString(hGTA, dwAddress, 256)
- Sleep, 30
- if (RegExMatch(chatInput, "^\/sp\s(\d{1,4})$", match)) {
- if (match1 <= 1000 && Array[match1] != "") {
- if (!pinfo := getPlayerNameById(match1)) {
- SendChat("/ans " Array[match1] " Здравствуйте, " RegExReplace(Array[match1], "^(\w+)_(\w+)$", "$1") ". К сожалению, данный игрок вышел из игры.")
- } else {
- SendChat("/ans " Array[match1] " Здравствуйте, " RegExReplace(Array[match1], "^(\w+)_(\w+)$", "$1") ". Спасибо за обращение, начал слежку за игроком!")
- }
- }
- }
- }
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement