Advertisement
darksoor

Помощь по AHK

Aug 13th, 2018
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Include SAMP-UDF.ahk
  2. #IfWinActive GTA:SA:MP
  3.  
  4. $~Enter::
  5. if (isInChat() && !isDialogOpen())
  6. {
  7.     Sleep 170
  8.     dwAddress := dwSAMP + 0x12D8F8
  9.     chatInput := readString(hGTA, dwAddress, 256)
  10.     Sleep, 30
  11.     ;первая команда
  12.     if chatInput contains /vig
  13.     {
  14.          RegExMatch(chatInput, "i)^(.*)/vig", ps)
  15.          If (ps1!="")
  16.             {
  17.                 ps := []
  18.                 return
  19.             }
  20.             ps := []
  21.             RegExMatch(chatInput, "i)^/vig ([0-9]+) (.*)", p)
  22.             if p2 =
  23.             {
  24.                 AddChatMessageEx("{FFFFFF}", "Введите команду /vig {FFFF00}[id].")
  25.                 return
  26.             }
  27.             if p2 !=
  28.             {
  29.                 SendChat("/n LVPD to all: Выдал выговор жетону " p1 ". По причине: " p2)
  30.                 Return
  31.             }
  32.      }
  33.      ;вторая команда
  34.      if chatInput contains /nom
  35.      {
  36.          RegExMatch(chatInput, "i)^(.*)/nom", ps)
  37.          If (ps1!="")
  38.             {
  39.                 ps := []
  40.                 return
  41.             }
  42.             ps := []
  43.             RegExMatch(chatInput, "i)^/nom ([0-9]+)", p)
  44.             if p1 =
  45.             {
  46.                 AddChatMessageEx("{FFFFFF}", "Введите команду /nom {FFFF00}[id].")
  47.                 return
  48.             }
  49.             if p1 !=
  50.             {
  51.                  ;Тут код пиши
  52.             }  
  53.      }
  54.      ;остальные команды тут писать
  55. }
  56. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement