SHARE
TWEET

/givepas rp.gw

strozzac Apr 29th, 2019 (edited) 169 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FileEncoding, UTF-8
  2. URLDownloadToFile, https://docs.google.com/spreadsheets/d/1Hf3FcHZAEiKqJuNBMeXibnVOXQF_PpUlO_8GWjaGUa8/export?format=csv&id=1Hf3FcHZAEiKqJuNBMeXibnVOXQF_PpUlO_8GWjaGUa8&gid=365013835, %A_Temp%\blacklistbase.txt
  3. FileRead, blackl, %A_Temp%\blacklistbase.txt
  4. FileDelete, %A_Temp%\blacklistbase.txt
  5. URLDownloadToFile, https://docs.google.com/spreadsheets/d/1Hf3FcHZAEiKqJuNBMeXibnVOXQF_PpUlO_8GWjaGUa8/export?format=csv&id=1Hf3FcHZAEiKqJuNBMeXibnVOXQF_PpUlO_8GWjaGUa8&gid=1489322457, %A_Temp%\whitelistbase.txt
  6. FileRead, whitel, %A_Temp%\whitelistbase.txt
  7. FileDelete, %A_Temp%\whitelistbase.txt
  8. #SingleInstance, Force
  9. #Persistent
  10. #Include UDF.ahk
  11. #IfWinActive, GTA:SA:MP
  12. ~RButton & ~vk31::
  13. uname := getPlayerNameById(getIdByPed(getTargetPed()))
  14. rpname := RegExReplace(uname, "_",  " ")
  15. If (uname <> "")
  16. {
  17.     userscore := getPlayerScoreById(getIdByPed(getTargetPed()))
  18.     URLDownloadToFile, https://classic.rp-gameworld.ru/online/, %A_Temp%\online.txt
  19.     FileRead, checker, %A_Temp%\online.txt
  20.     If RegExMatch(checker, "gameworld")
  21.     {
  22.         Loop, read, %A_Temp%\online.txt
  23.         {
  24.             If RegExMatch(A_LoopReadLine, "iS)/profile/" uname "/")
  25.             {
  26.                 FileReadLine, fraction, %A_Temp%\online.txt, % A_Index+2
  27.                 RegExMatch(fraction, "<td>(.*)</td>", frac)
  28.                 If (frac1 <> "")
  29.                     userfraction := frac1
  30.                 break
  31.             }
  32.         }
  33.         FileDelete, %A_Temp%\online.txt
  34.         If (!RegExMatch(blackl, getUsername()) && !RegExMatch(bl, rpname))
  35.         {
  36.             If (!RegExMatch(whitel, getUsername()) && !RegExMatch(whitel, rpname))
  37.             {
  38.                 If (userscore >= 1 && userscore <= 3)
  39.                     pasprice := 1
  40.                 else if (userscore >= 4 && userscore <= 10)
  41.                     pasprice := 20000
  42.                 else
  43.                     pasprice := 40000
  44.             }
  45.             else
  46.             {
  47.                 pasprice := 1
  48.                 goto, giving
  49.             }
  50.         }
  51.         else
  52.         {
  53.             SendChat("Плохие новости. Вы состоите в БДН, в дальнейшем получении/продлении паспорта отказано!")
  54.             return
  55.         }
  56.         If RegExMatch(userfraction, "Ministry of Health|San Andreas Taxi Cab Company|Los Santos Police Department|Federal Bureau of Investigation|Cable News Network|Licenzers|National Guard of San Andreas")
  57.         {
  58.             pasmult := 1
  59.             If (userfraction == "Ministry of Health")
  60.                 pasprice := 1
  61.             If (userfraction == "San Andreas Taxi Cab Company")
  62.                 pasmult := 0.5     
  63.             If (userfraction == "Los Santos Police Department")
  64.                 pasprice := 1      
  65.             If (userfraction == "Federal Bureau of Investigation")
  66.                 pasprice := 1  
  67.             If (userfraction == "National Guard of San Andreas")
  68.                 pasmult := 0.5     
  69.             If (userfraction == "Cable News Network")
  70.                 pasmult := 0.5
  71.             If (userfraction == "Licenzers")
  72.                 pasmult := 0.5
  73.             addChatMessageEx("c0c0c0", "[PAS] Фракция: " userfraction "; Договор: Есть; Цена: $" pasprice "; Коэффициент: " pasmult ".")
  74.             If (pasprice > 1)
  75.                 pasprice *= pasmult
  76.         }
  77.         else
  78.             addChatMessageEx("c0c0c0", "[PAS] Фракция: " userfraction "; Договор: Отсутствует; Цена: $" pasprice ".")
  79.         giving:
  80.         SendChat("/givepas " getPlayerIdByName(uname) " " pasprice "")
  81.     }
  82. }
  83. return
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top