Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #Include, %A_ScriptDir%\AutoHotKey\includes\SAMP.UDF.ahk
  2.  
  3. global Array := []
  4.  
  5. Loop {
  6. if (RegExMatch(getChatLineEx(), "^\w+\[(\d{1,4})\]:\s\{FFCD00\}.*?(\d+).*?$", match)) {
  7. if (match2 <= 1000) {
  8. Array[match2] := match1
  9. }
  10. }
  11. }
  12.  
  13. $~vkD::
  14. {
  15. if (IsInChat() && !IsDialogOpen()) {
  16. Sleep, 170
  17. dwAddress := dwSAMP + 0x12D8F8
  18. chatInput := readString(hGTA, dwAddress, 256)
  19. Sleep, 30
  20. if (RegExMatch(chatInput, "^\/sp\s(\d{1,4})$", match)) {
  21. if (match1 <= 1000 && Array[match1] != "") {
  22. if (!pinfo := getPlayerNameById(match1)) {
  23. SendChat("/ans " Array[match1] " Здравствуйте, " RegExReplace(Array[match1], "^(\w+)_(\w+)$", "$1") ". К сожалению, данный игрок вышел из игры.")
  24. } else {
  25. SendChat("/ans " Array[match1] " Здравствуйте, " RegExReplace(Array[match1], "^(\w+)_(\w+)$", "$1") ". Спасибо за обращение, начал слежку за игроком!")
  26. }
  27. }
  28. }
  29. }
  30. }
  31. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement