Advertisement
Guest User

Sourecode zum PIB Binder

a guest
Jan 23rd, 2019
922
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 126.48 KB | None | 0 0
  1. ; <COMPILER: v1.1.22.07>
  2. ; Sourcecode veröffentlichung nachdem Pokee der Meinung ist zu verbreiten das doch ein Virus drin wäre.
  3. ; Viel Spaß Finn
  4.  
  5.  
  6. #SingleInstance Force
  7. #IfWinActive, ahk_exe gta_sa.exe
  8. #MaxHotkeysPerInterval 900
  9. #NoEnv
  10. PATH_SAMP_API := PathCombine(A_ScriptDir, "bin/Open-SAMP-API.dll")
  11. hModule := DllCall("LoadLibrary", Str, PATH_SAMP_API)
  12. if(hModule == -1 || hModule == 0)
  13. {
  14. MsgBox, 48,, Die API konnte nicht gefunden werden. Sie wird gleich heruntergeladen.
  15. }
  16. Init_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "Init")
  17. SetParam_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetParam")
  18. GetGTACommandLine_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetGTACommandLine")
  19. IsMenuOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsMenuOpen")
  20. ScreenToWorld_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ScreenToWorld")
  21. WorldToScreen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "WorldToScreen")
  22. GetPlayerCPed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerCPed")
  23. GetPlayerHealth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerHealth")
  24. GetPlayerArmor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerArmor")
  25. GetPlayerMoney_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerMoney")
  26. GetPlayerSkinID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerSkinID")
  27. GetPlayerInterior_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerInterior")
  28. IsPlayerInAnyVehicle_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInAnyVehicle")
  29. IsPlayerDriver_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerDriver")
  30. IsPlayerPassenger_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerPassenger")
  31. IsPlayerInInterior_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInInterior")
  32. GetPlayerX_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerX")
  33. GetPlayerY_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerY")
  34. GetPlayerZ_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerZ")
  35. GetPlayerPosition_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerPosition")
  36. IsPlayerInRange2D_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInRange2D")
  37. IsPlayerInRange3D_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsPlayerInRange3D")
  38. GetCityName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetCityName")
  39. GetZoneName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetZoneName")
  40. TextCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextCreate")
  41. TextDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextDestroy")
  42. TextSetShadow_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetShadow")
  43. TextSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetShown")
  44. TextSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetColor")
  45. TextSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetPos")
  46. TextSetString_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextSetString")
  47. TextUpdate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "TextUpdate")
  48. BoxCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxCreate")
  49. BoxDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxDestroy")
  50. BoxSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetShown")
  51. BoxSetBorder_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetBorder")
  52. BoxSetBorderColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetBorderColor")
  53. BoxSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetColor")
  54. BoxSetHeight_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetHeight")
  55. BoxSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetPos")
  56. BoxSetWidth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "BoxSetWidth")
  57. LineCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineCreate")
  58. LineDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineDestroy")
  59. LineSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetShown")
  60. LineSetColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetColor")
  61. LineSetWidth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetWidth")
  62. LineSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "LineSetPos")
  63. ImageCreate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageCreate")
  64. ImageDestroy_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageDestroy")
  65. ImageSetShown_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetShown")
  66. ImageSetAlign_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetAlign")
  67. ImageSetPos_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetPos")
  68. ImageSetRotation_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ImageSetRotation")
  69. DestroyAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "DestroyAllVisual")
  70. ShowAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ShowAllVisual")
  71. HideAllVisual_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "HideAllVisual")
  72. GetFrameRate_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetFrameRate")
  73. GetScreenSpecs_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetScreenSpecs")
  74. SetCalculationRatio_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetCalculationRatio")
  75. SetOverlayPriority_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetOverlayPriority")
  76. SetOverlayCalculationEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SetOverlayCalculationEnabled")
  77. GetServerIP_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetServerIP")
  78. GetServerPort_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetServerPort")
  79. SendChat_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "SendChat")
  80. ShowGameText_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ShowGameText")
  81. AddChatMessage_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "AddChatMessage")
  82. ShowDialog_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "ShowDialog")
  83. GetPlayerNameByID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerNameByID")
  84. GetPlayerIDByName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerIDByName")
  85. GetPlayerName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerName")
  86. GetPlayerId_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerId")
  87. IsChatOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsChatOpen")
  88. IsDialogOpen_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsDialogOpen")
  89. GetVehiclePointer_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehiclePointer")
  90. GetVehicleSpeed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleSpeed")
  91. GetVehicleHealth_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleHealth")
  92. GetVehicleModelId_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelId")
  93. GetVehicleModelName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelName")
  94. GetVehicleModelNameById_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleModelNameById")
  95. GetVehicleType_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleType")
  96. GetVehicleFreeSeats_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleFreeSeats")
  97. GetVehicleFirstColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleFirstColor")
  98. GetVehicleSecondColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleSecondColor")
  99. GetVehicleColor_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetVehicleColor")
  100. IsVehicleSeatUsed_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleSeatUsed")
  101. IsVehicleLocked_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleLocked")
  102. IsVehicleHornEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleHornEnabled")
  103. IsVehicleSirenEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleSirenEnabled")
  104. IsVehicleAlternateSirenEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleAlternateSirenEnabled")
  105. IsVehicleEngineEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleEngineEnabled")
  106. IsVehicleLightEnabled_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleLightEnabled")
  107. IsVehicleCar_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleCar")
  108. IsVehiclePlane_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehiclePlane")
  109. IsVehicleBoat_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleBoat")
  110. IsVehicleTrain_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleTrain")
  111. IsVehicleBike_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "IsVehicleBike")
  112. HasWeaponIDClip_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "HasWeaponIDClip")
  113. GetPlayerWeaponID_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponID")
  114. GetPlayerWeaponType_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponType")
  115. GetPlayerWeaponSlot_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponSlot")
  116. GetPlayerWeaponName_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponName")
  117. GetPlayerWeaponClip_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponClip")
  118. GetPlayerWeaponTotalClip_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponTotalClip")
  119. GetPlayerWeaponState_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponState")
  120. GetPlayerWeaponAmmo_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponAmmo")
  121. GetPlayerWeaponAmmoInClip_func := DllCall("GetProcAddress", "UInt", hModule, "Str", "GetPlayerWeaponAmmoInClip")
  122. Init()
  123. {
  124. global Init_func
  125. return DllCall(Init_func)
  126. }
  127. SetParam(_szParamName, _szParamValue)
  128. {
  129. global SetParam_func
  130. return DllCall(SetParam_func, "Str", _szParamName, "Str", _szParamValue)
  131. }
  132. GetGTACommandLine(ByRef line, max_len)
  133. {
  134. global GetGTACommandLine_func
  135. VarSetCapacity(line, max_len, 0)
  136. return DllCall(GetGTACommandLine_func, "StrP", line, "Int", max_len)
  137. }
  138. IsMenuOpen()
  139. {
  140. global IsMenuOpen_func
  141. return DllCall(IsMenuOpen_func)
  142. }
  143. ScreenToWorld(x, y, ByRef worldX, ByRef worldY, ByRef worldZ)
  144. {
  145. global ScreenToWorld_func
  146. return DllCall(ScreenToWorld_func, "Float", x, "Float", y, "FloatP", worldX, "FloatP", worldY, "FloatP", worldZ)
  147. }
  148. WorldToScreen(x, y, z, ByRef screenX, ByRef screenY)
  149. {
  150. global WorldToScreen_func
  151. return DllCall(WorldToScreen_func, "Float", x, "Float", y, "Float", z, "FloatP", screenX, "FloatP", screenY)
  152. }
  153. GetPlayerCPed()
  154. {
  155. global GetPlayerCPed_func
  156. return DllCall(GetPlayerCPed_func)
  157. }
  158. GetPlayerHealth()
  159. {
  160. global GetPlayerHealth_func
  161. return DllCall(GetPlayerHealth_func)
  162. }
  163. GetPlayerArmor()
  164. {
  165. global GetPlayerArmor_func
  166. return DllCall(GetPlayerArmor_func)
  167. }
  168. GetPlayerMoney()
  169. {
  170. global GetPlayerMoney_func
  171. return DllCall(GetPlayerMoney_func)
  172. }
  173. GetPlayerSkinID()
  174. {
  175. global GetPlayerSkinID_func
  176. return DllCall(GetPlayerSkinID_func)
  177. }
  178. GetPlayerInterior()
  179. {
  180. global GetPlayerInterior_func
  181. return DllCall(GetPlayerInterior_func)
  182. }
  183. IsPlayerInAnyVehicle()
  184. {
  185. global IsPlayerInAnyVehicle_func
  186. return DllCall(IsPlayerInAnyVehicle_func)
  187. }
  188. IsPlayerDriver()
  189. {
  190. global IsPlayerDriver_func
  191. return DllCall(IsPlayerDriver_func)
  192. }
  193. IsPlayerPassenger()
  194. {
  195. global IsPlayerPassenger_func
  196. return DllCall(IsPlayerPassenger_func)
  197. }
  198. IsPlayerInInterior()
  199. {
  200. global IsPlayerInInterior_func
  201. return DllCall(IsPlayerInInterior_func)
  202. }
  203. GetPlayerX(ByRef posX)
  204. {
  205. global GetPlayerX_func
  206. return DllCall(GetPlayerX_func, "FloatP", posX)
  207. }
  208. GetPlayerY(ByRef posY)
  209. {
  210. global GetPlayerY_func
  211. return DllCall(GetPlayerY_func, "FloatP", posY)
  212. }
  213. GetPlayerZ(ByRef posZ)
  214. {
  215. global GetPlayerZ_func
  216. return DllCall(GetPlayerZ_func, "FloatP", posZ)
  217. }
  218. GetPlayerPosition(ByRef posX, ByRef posY, ByRef posZ)
  219. {
  220. global GetPlayerPosition_func
  221. return DllCall(GetPlayerPosition_func, "FloatP", posX, "FloatP", posY, "FloatP", posZ)
  222. }
  223. IsPlayerInRange2D(posX, posY, radius)
  224. {
  225. global IsPlayerInRange2D_func
  226. return DllCall(IsPlayerInRange2D_func, "Float", posX, "Float", posY, "Float", radius)
  227. }
  228. IsPlayerInRange3D(posX, posY, posZ, radius)
  229. {
  230. global IsPlayerInRange3D_func
  231. return DllCall(IsPlayerInRange3D_func, "Float", posX, "Float", posY, "Float", posZ, "Float", radius)
  232. }
  233. GetCityName(ByRef cityName, max_len)
  234. {
  235. global GetCityName_func
  236. VarSetCapacity(cityName, max_len, 0)
  237. return DllCall(GetCityName_func, "StrP", cityName, "Int", max_len)
  238. }
  239. GetZoneName(ByRef zoneName, max_len)
  240. {
  241. global GetZoneName_func
  242. VarSetCapacity(zoneName, max_len, 0)
  243. return DllCall(GetZoneName_func, "StrP", zoneName, "Int", max_len)
  244. }
  245. TextCreate(Font, FontSize, bBold, bItalic, x, y, color, text, bShadow, bShow)
  246. {
  247. global TextCreate_func
  248. return DllCall(TextCreate_func, "Str", Font, "Int", FontSize, "UChar", bBold, "UChar", bItalic, "Int", x, "Int", y, "UInt", color, "Str", text, "UChar", bShadow, "UChar", bShow)
  249. }
  250. TextDestroy(ID)
  251. {
  252. global TextDestroy_func
  253. return DllCall(TextDestroy_func, "Int", ID)
  254. }
  255. TextSetShadow(id, b)
  256. {
  257. global TextSetShadow_func
  258. return DllCall(TextSetShadow_func, "Int", id, "UChar", b)
  259. }
  260. TextSetShown(id, b)
  261. {
  262. global TextSetShown_func
  263. return DllCall(TextSetShown_func, "Int", id, "UChar", b)
  264. }
  265. TextSetColor(id, color)
  266. {
  267. global TextSetColor_func
  268. return DllCall(TextSetColor_func, "Int", id, "UInt", color)
  269. }
  270. TextSetPos(id, x, y)
  271. {
  272. global TextSetPos_func
  273. return DllCall(TextSetPos_func, "Int", id, "Int", x, "Int", y)
  274. }
  275. TextSetString(id, str)
  276. {
  277. global TextSetString_func
  278. return DllCall(TextSetString_func, "Int", id, "Str", str)
  279. }
  280. TextUpdate(id, Font, FontSize, bBold, bItalic)
  281. {
  282. global TextUpdate_func
  283. return DllCall(TextUpdate_func, "Int", id, "Str", Font, "Int", FontSize, "UChar", bBold, "UChar", bItalic)
  284. }
  285. BoxCreate(x, y, w, h, dwColor, bShow)
  286. {
  287. global BoxCreate_func
  288. return DllCall(BoxCreate_func, "Int", x, "Int", y, "Int", w, "Int", h, "UInt", dwColor, "UChar", bShow)
  289. }
  290. BoxDestroy(id)
  291. {
  292. global BoxDestroy_func
  293. return DllCall(BoxDestroy_func, "Int", id)
  294. }
  295. BoxSetShown(id, bShown)
  296. {
  297. global BoxSetShown_func
  298. return DllCall(BoxSetShown_func, "Int", id, "UChar", bShown)
  299. }
  300. BoxSetBorder(id, height, bShown)
  301. {
  302. global BoxSetBorder_func
  303. return DllCall(BoxSetBorder_func, "Int", id, "Int", height, "UChar", bShown)
  304. }
  305. BoxSetBorderColor(id, dwColor)
  306. {
  307. global BoxSetBorderColor_func
  308. return DllCall(BoxSetBorderColor_func, "Int", id, "UInt", dwColor)
  309. }
  310. BoxSetColor(id, dwColor)
  311. {
  312. global BoxSetColor_func
  313. return DllCall(BoxSetColor_func, "Int", id, "UInt", dwColor)
  314. }
  315. BoxSetHeight(id, height)
  316. {
  317. global BoxSetHeight_func
  318. return DllCall(BoxSetHeight_func, "Int", id, "Int", height)
  319. }
  320. BoxSetPos(id, x, y)
  321. {
  322. global BoxSetPos_func
  323. return DllCall(BoxSetPos_func, "Int", id, "Int", x, "Int", y)
  324. }
  325. BoxSetWidth(id, width)
  326. {
  327. global BoxSetWidth_func
  328. return DllCall(BoxSetWidth_func, "Int", id, "Int", width)
  329. }
  330. LineCreate(x1, y1, x2, y2, width, color, bShow)
  331. {
  332. global LineCreate_func
  333. return DllCall(LineCreate_func, "Int", x1, "Int", y1, "Int", x2, "Int", y2, "Int", width, "UInt", color, "UChar", bShow)
  334. }
  335. LineDestroy(id)
  336. {
  337. global LineDestroy_func
  338. return DllCall(LineDestroy_func, "Int", id)
  339. }
  340. LineSetShown(id, bShown)
  341. {
  342. global LineSetShown_func
  343. return DllCall(LineSetShown_func, "Int", id, "UChar", bShown)
  344. }
  345. LineSetColor(id, color)
  346. {
  347. global LineSetColor_func
  348. return DllCall(LineSetColor_func, "Int", id, "UInt", color)
  349. }
  350. LineSetWidth(id, width)
  351. {
  352. global LineSetWidth_func
  353. return DllCall(LineSetWidth_func, "Int", id, "Int", width)
  354. }
  355. LineSetPos(id, x1, y1, x2, y2)
  356. {
  357. global LineSetPos_func
  358. return DllCall(LineSetPos_func, "Int", id, "Int", x1, "Int", y1, "Int", x2, "Int", y2)
  359. }
  360. ImageCreate(path, x, y, rotation, align, bShow)
  361. {
  362. global ImageCreate_func
  363. return DllCall(ImageCreate_func, "Str", path, "Int", x, "Int", y, "Int", rotation, "Int", align, "UChar", bShow)
  364. }
  365. ImageDestroy(id)
  366. {
  367. global ImageDestroy_func
  368. return DllCall(ImageDestroy_func, "Int", id)
  369. }
  370. ImageSetShown(id, bShown)
  371. {
  372. global ImageSetShown_func
  373. return DllCall(ImageSetShown_func, "Int", id, "UChar", bShown)
  374. }
  375. ImageSetAlign(id, align)
  376. {
  377. global ImageSetAlign_func
  378. return DllCall(ImageSetAlign_func, "Int", id, "Int", align)
  379. }
  380. ImageSetPos(id, x, y)
  381. {
  382. global ImageSetPos_func
  383. return DllCall(ImageSetPos_func, "Int", id, "Int", x, "Int", y)
  384. }
  385. ImageSetRotation(id, rotation)
  386. {
  387. global ImageSetRotation_func
  388. return DllCall(ImageSetRotation_func, "Int", id, "Int", rotation)
  389. }
  390. DestroyAllVisual()
  391. {
  392. global DestroyAllVisual_func
  393. return DllCall(DestroyAllVisual_func)
  394. }
  395. ShowAllVisual()
  396. {
  397. global ShowAllVisual_func
  398. return DllCall(ShowAllVisual_func)
  399. }
  400. HideAllVisual()
  401. {
  402. global HideAllVisual_func
  403. return DllCall(HideAllVisual_func)
  404. }
  405. GetFrameRate()
  406. {
  407. global GetFrameRate_func
  408. return DllCall(GetFrameRate_func)
  409. }
  410. GetScreenSpecs(ByRef width, ByRef height)
  411. {
  412. global GetScreenSpecs_func
  413. return DllCall(GetScreenSpecs_func, "IntP", width, "IntP", height)
  414. }
  415. SetCalculationRatio(width, height)
  416. {
  417. global SetCalculationRatio_func
  418. return DllCall(SetCalculationRatio_func, "Int", width, "Int", height)
  419. }
  420. SetOverlayPriority(id, priority)
  421. {
  422. global SetOverlayPriority_func
  423. return DllCall(SetOverlayPriority_func, "Int", id, "Int", priority)
  424. }
  425. SetOverlayCalculationEnabled(id, enabled)
  426. {
  427. global SetOverlayCalculationEnabled_func
  428. return DllCall(SetOverlayCalculationEnabled_func, "Int", id, "UChar", enabled)
  429. }
  430. GetServerIP(ByRef ip, max_len)
  431. {
  432. global GetServerIP_func
  433. VarSetCapacity(ip, max_len, 0)
  434. return DllCall(GetServerIP_func, "StrP", ip, "Int", max_len)
  435. }
  436. GetServerPort()
  437. {
  438. global GetServerPort_func
  439. return DllCall(GetServerPort_func)
  440. }
  441. SendChat(msg)
  442. {
  443. global SendChat_func
  444. return DllCall(SendChat_func, "Str", msg)
  445. }
  446. ShowGameText(msg, time, style)
  447. {
  448. global ShowGameText_func
  449. return DllCall(ShowGameText_func, "Str", msg, "Int", time, "Int", style)
  450. }
  451. AddChatMessage(msg)
  452. {
  453. global AddChatMessage_func
  454. return DllCall(AddChatMessage_func, "Str", msg)
  455. }
  456. ShowDialog(id, style, caption, text, button, button2)
  457. {
  458. global ShowDialog_func
  459. return DllCall(ShowDialog_func, "Int", id, "Int", style, "Str", caption, "Str", text, "Str", button, "Str", button2)
  460. }
  461. GetPlayerNameByID(id, ByRef playername, max_len)
  462. {
  463. global GetPlayerNameByID_func
  464. VarSetCapacity(playername, max_len, 0)
  465. return DllCall(GetPlayerNameByID_func, "Int", id, "StrP", playername, "Int", max_len)
  466. }
  467. GetPlayerIDByName(name)
  468. {
  469. global GetPlayerIDByName_func
  470. return DllCall(GetPlayerIDByName_func, "Str", name)
  471. }
  472. GetPlayerName(ByRef playername, max_len)
  473. {
  474. global GetPlayerName_func
  475. VarSetCapacity(playername, max_len, 0)
  476. return DllCall(GetPlayerName_func, "StrP", playername, "Int", max_len)
  477. }
  478. GetPlayerId()
  479. {
  480. global GetPlayerId_func
  481. return DllCall(GetPlayerId_func)
  482. }
  483. IsChatOpen()
  484. {
  485. global IsChatOpen_func
  486. return DllCall(IsChatOpen_func)
  487. }
  488. IsDialogOpen()
  489. {
  490. global IsDialogOpen_func
  491. return DllCall(IsDialogOpen_func)
  492. }
  493. GetVehiclePointer()
  494. {
  495. global GetVehiclePointer_func
  496. return DllCall(GetVehiclePointer_func)
  497. }
  498. GetVehicleSpeed(factor)
  499. {
  500. global GetVehicleSpeed_func
  501. return DllCall(GetVehicleSpeed_func, "Float", factor)
  502. }
  503. GetVehicleHealth()
  504. {
  505. global GetVehicleHealth_func
  506. return DllCall(GetVehicleHealth_func, "Cdecl float")
  507. }
  508. GetVehicleModelId()
  509. {
  510. global GetVehicleModelId_func
  511. return DllCall(GetVehicleModelId_func)
  512. }
  513. GetVehicleModelName(ByRef name, max_len)
  514. {
  515. global GetVehicleModelName_func
  516. VarSetCapacity(name, max_len, 0)
  517. return DllCall(GetVehicleModelName_func, "StrP", name, "Int", max_len)
  518. }
  519. GetVehicleModelNameById(vehicleID, ByRef name, max_len)
  520. {
  521. global GetVehicleModelNameById_func
  522. VarSetCapacity(name, max_len, 0)
  523. return DllCall(GetVehicleModelNameById_func, "Int", vehicleID, "StrP", name, "Int", max_len)
  524. }
  525. GetVehicleType()
  526. {
  527. global GetVehicleType_func
  528. return DllCall(GetVehicleType_func)
  529. }
  530. GetVehicleFreeSeats(ByRef seatFL, ByRef seatFR, ByRef seatRL, ByRef seatRR)
  531. {
  532. global GetVehicleFreeSeats_func
  533. return DllCall(GetVehicleFreeSeats_func, "IntP", seatFL, "IntP", seatFR, "IntP", seatRL, "IntP", seatRR)
  534. }
  535. GetVehicleFirstColor()
  536. {
  537. global GetVehicleFirstColor_func
  538. return DllCall(GetVehicleFirstColor_func)
  539. }
  540. GetVehicleSecondColor()
  541. {
  542. global GetVehicleSecondColor_func
  543. return DllCall(GetVehicleSecondColor_func)
  544. }
  545. GetVehicleColor(ByRef color1, ByRef color2)
  546. {
  547. global GetVehicleColor_func
  548. return DllCall(GetVehicleColor_func, "IntP", color1, "IntP", color2)
  549. }
  550. IsVehicleSeatUsed(seat)
  551. {
  552. global IsVehicleSeatUsed_func
  553. return DllCall(IsVehicleSeatUsed_func, "Int", seat)
  554. }
  555. IsVehicleLocked()
  556. {
  557. global IsVehicleLocked_func
  558. return DllCall(IsVehicleLocked_func)
  559. }
  560. IsVehicleHornEnabled()
  561. {
  562. global IsVehicleHornEnabled_func
  563. return DllCall(IsVehicleHornEnabled_func)
  564. }
  565. IsVehicleSirenEnabled()
  566. {
  567. global IsVehicleSirenEnabled_func
  568. return DllCall(IsVehicleSirenEnabled_func)
  569. }
  570. IsVehicleAlternateSirenEnabled()
  571. {
  572. global IsVehicleAlternateSirenEnabled_func
  573. return DllCall(IsVehicleAlternateSirenEnabled_func)
  574. }
  575. IsVehicleEngineEnabled()
  576. {
  577. global IsVehicleEngineEnabled_func
  578. return DllCall(IsVehicleEngineEnabled_func)
  579. }
  580. IsVehicleLightEnabled()
  581. {
  582. global IsVehicleLightEnabled_func
  583. return DllCall(IsVehicleLightEnabled_func)
  584. }
  585. IsVehicleCar()
  586. {
  587. global IsVehicleCar_func
  588. return DllCall(IsVehicleCar_func)
  589. }
  590. IsVehiclePlane()
  591. {
  592. global IsVehiclePlane_func
  593. return DllCall(IsVehiclePlane_func)
  594. }
  595. IsVehicleBoat()
  596. {
  597. global IsVehicleBoat_func
  598. return DllCall(IsVehicleBoat_func)
  599. }
  600. IsVehicleTrain()
  601. {
  602. global IsVehicleTrain_func
  603. return DllCall(IsVehicleTrain_func)
  604. }
  605. IsVehicleBike()
  606. {
  607. global IsVehicleBike_func
  608. return DllCall(IsVehicleBike_func)
  609. }
  610. HasWeaponIDClip(weaponID)
  611. {
  612. global HasWeaponIDClip_func
  613. return DllCall(HasWeaponIDClip_func, "Int", weaponID)
  614. }
  615. GetPlayerWeaponID()
  616. {
  617. global GetPlayerWeaponID_func
  618. return DllCall(GetPlayerWeaponID_func)
  619. }
  620. GetPlayerWeaponType()
  621. {
  622. global GetPlayerWeaponType_func
  623. return DllCall(GetPlayerWeaponType_func)
  624. }
  625. GetPlayerWeaponSlot()
  626. {
  627. global GetPlayerWeaponSlot_func
  628. return DllCall(GetPlayerWeaponSlot_func)
  629. }
  630. GetPlayerWeaponName(dwWeapSlot, ByRef _szWeapName, max_len)
  631. {
  632. global GetPlayerWeaponName_func
  633. VarSetCapacity(_szWeapName, max_len, 0)
  634. return DllCall(GetPlayerWeaponName_func, "Int", dwWeapSlot, "StrP", _szWeapName, "Int", max_len)
  635. }
  636. GetPlayerWeaponClip(dwWeapSlot)
  637. {
  638. global GetPlayerWeaponClip_func
  639. return DllCall(GetPlayerWeaponClip_func, "Int", dwWeapSlot)
  640. }
  641. GetPlayerWeaponTotalClip(dwWeapSlot)
  642. {
  643. global GetPlayerWeaponTotalClip_func
  644. return DllCall(GetPlayerWeaponTotalClip_func, "Int", dwWeapSlot)
  645. }
  646. GetPlayerWeaponState()
  647. {
  648. global GetPlayerWeaponState_func
  649. return DllCall(GetPlayerWeaponState_func)
  650. }
  651. GetPlayerWeaponAmmo(weaponType)
  652. {
  653. global GetPlayerWeaponAmmo_func
  654. return DllCall(GetPlayerWeaponAmmo_func, "Int", weaponType)
  655. }
  656. GetPlayerWeaponAmmoInClip(weaponType)
  657. {
  658. global GetPlayerWeaponAmmoInClip_func
  659. return DllCall(GetPlayerWeaponAmmoInClip_func, "Int", weaponType)
  660. }
  661. PathCombine(abs, rel) {
  662. VarSetCapacity(dest, (A_IsUnicode ? 2 : 1) * 260, 1)
  663. DllCall("Shlwapi.dll\PathCombine", "UInt", &dest, "UInt", &abs, "UInt", &rel)
  664. Return, dest
  665. }
  666. WinHttpRequest( URL, ByRef In_POST__Out_Data="", ByRef In_Out_HEADERS="", Options="" )
  667. {
  668. static nothing := ComObjError(0)
  669. static oHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  670. static oADO := ComObjCreate("adodb.stream")
  671. If IsObject(URL)
  672. Return oHTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  673. If (In_POST__Out_Data != "") || InStr(Options, "Method: POST")
  674. oHTTP.Open("POST", URL, True)
  675. Else If InStr(Options, "Method: HEAD")
  676. oHTTP.Open("HEAD", URL, True)
  677. Else
  678. oHTTP.Open("GET", URL, True)
  679. If In_Out_HEADERS
  680. {
  681. In_Out_HEADERS := Trim(In_Out_HEADERS, " `t`r`n")
  682. Loop, Parse, In_Out_HEADERS, `n, `r
  683. {
  684. If !( _pos := InStr(A_LoopField, ":") )
  685. Continue
  686. Header_Name := SubStr(A_LoopField, 1, _pos-1)
  687. Header_Value := SubStr(A_LoopField, _pos+1)
  688. If ( Trim(Header_Value) != "" )
  689. oHTTP.SetRequestHeader( Header_Name, Header_Value )
  690. }
  691. }
  692. If (In_POST__Out_Data != "") && !InStr(In_Out_HEADERS, "Content-Type:")
  693. oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
  694. If Options
  695. {
  696. Loop, Parse, Options, `n, `r
  697. {
  698. If ( _pos := InStr(A_LoopField, "Timeout:") )
  699. Timeout := SubStr(A_LoopField, _pos+8)
  700. Else If ( _pos := InStr(A_LoopField, "Proxy:") )
  701. oHTTP.SetProxy( 2, SubStr(A_LoopField, _pos+6) )
  702. Else If ( _pos := InStr(A_LoopField, "Codepage:") )
  703. oHTTP.Option(2) := SubStr(A_LoopField, _pos+9)
  704. }
  705. oHTTP.Option(6) := InStr(Options, "NO_AUTO_REDIRECT") ? 0 : 1
  706. }
  707. oHTTP.Send(In_POST__Out_Data)
  708. ReturnCode := oHTTP.WaitForResponse(Timeout ? Timeout : -1)
  709. If InStr(Options, "SaveAs:")
  710. {
  711. RegExMatch(Options, "i)SaveAs:[ \t]*\K[^\r\n]+", SavePath)
  712. oADO.Type := 1
  713. oADO.Open()
  714. oADO.Write( oHTTP.ResponseBody )
  715. oADO.SaveToFile( SavePath, 2 )
  716. oADO.Close()
  717. In_POST__Out_Data := ""
  718. }
  719. Else If InStr(Options, "Charset:")
  720. {
  721. RegExMatch(Options, "i)Charset:[ \t]*\K[\w-]+", Encoding)
  722. oADO.Type := 1
  723. oADO.Mode := 3
  724. oADO.Open()
  725. oADO.Write( oHTTP.ResponseBody() )
  726. oADO.Position := 0
  727. oADO.Type := 2
  728. oADO.Charset := Encoding
  729. In_POST__Out_Data := IsByRef(In_POST__Out_Data) ? oADO.ReadText() : ""
  730. oADO.Close()
  731. }
  732. Else
  733. In_POST__Out_Data := IsByRef(In_POST__Out_Data) ? oHTTP.ResponseText : ""
  734. In_Out_HEADERS := "HTTP/1.1 " oHTTP.Status() "`n" oHTTP.GetAllResponseHeaders()
  735. Return, ReturnCode
  736. }
  737. #UseHook
  738. #InstallKeybdHook
  739. #HotString EndChars `n
  740. if(!A_IsAdmin) {
  741. Run *RunAs "%A_ScriptFullPath%"
  742. ExitApp
  743. }
  744. bgColor := "1C1C1C"
  745. textColor := "FFFF00"
  746. global version := "3.1"
  747. I_Icon = img/icon.ico
  748. ICON [I_Icon]
  749. if I_Icon <>
  750. IfExist, %I_Icon%
  751. Menu, Tray, Icon, %I_Icon%
  752. Gui, -dpiscale
  753. OnMessage(0x201, "WM_LBUTTONDOWN")
  754. Gui, Show, w1200 h769, Binder Binder
  755. Gui, Color, %bgColor%
  756. WinSet, Style, -0xC00000, a
  757. Gui, Add, Picture, x1170 y5 gCallbackClose, img/close.png
  758. Gui, Add, Picture, x1135 y5 gCallbackMinimize, img/minimize.png
  759. Gui, Add, Picture, x211 y40, img/menu/titlebarSeperator.png
  760. Gui, Add, Picture, x200 y0, img/menu/navbar.png
  761. Gui, Add, Picture, x1040 y623 w160 h160, img/iconTransparent.png
  762. font(40)
  763. Gui, Add, Text, x500 y400 vLoadingText cPurple, Ladevorgang..
  764. checkNewVersion()
  765. if(FileExist("updater.bat") != ""){
  766. FileDelete, updater.bat
  767. }
  768. global playerName:= "PLAYERNAMEPLAYERNAME"
  769. global apiKey:= "UNSETUNSETUNSETUNSETUNSETUNSET"
  770. global chatlogpath:= A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt"
  771. global currentGUI := "Home"
  772. global elements:= {home: [], keybinds: [], commands: [], overlays: [], updates: [], credits: [], login: [], textbinds: [], autonomous: []}
  773. global elementCounter:= 1
  774. global activeHotkeys:= []
  775. global keybindsEnabled:= 1
  776. global processedChatCount:= 0
  777. global processedMessages:= []
  778. global customCommands:= ["[ENTF]", "/cmds", "/setkills", "/setdeaths", "/kd", "/fkd", "/playerinfo", "/checkfrak", "/checkfrakid", "/membersall", "/plantinfo", "/showplant", "/biz", "/vs", "/togkb", "/togflagpos", "/funcinfo", "/killtest", "/kcall", "/ksms", "/kbl", "/kclearchat", "/kame", "/hwithdraw", "/showtextbinds", "/moveoverlay", "/customoverlay", "/timer", "/wpbinds"]
  779. global customCommandsDesc:= ["Keybinds ein- und ausschalten", "Befehle ingame anzeigen", "Kills des Killbinders setzen", "Tode des Killbinders setzen", "Eigene Stats anzeigen", "Heutige Stats im /f-Chat anzeigen", "Informationen eines Spielers abrufen", "Eingeloggte Spieler einer Fraktion anzeigen", "Eingeloggte SpielerIDs einer Fraktion anzeigen", "Alle Mitglieder einer Fraktion anzeigen", "Plantageninformationen anzeigen", "Plantagenposition als Overlay anzeigen", "Bizliste mit Farben anzeigen", "VS im /f-Chat anfordern", "Killbinder ein- und ausschalten", "Automatisches /getflagpos de- und aktivieren", "Funktionen des Binders anzeigen", "Killbinder testen", "Anruf anhand Name/ID initiieren", "SMS anhand Name/ID senden", "Blacklist mit SpielerIDs anzeigen", "Chat leeren", "Automatisch /ame alle 15 Sekunden", "Hauskasse automatisch leeren", "Aktive Textbinds ingame anzeigen", "Position eines Overlays ingame anpassen", "CustomOverlay einstellen", "Timerbefehle", "Die WP-Binds anzeigen"]
  780. global loginRunning:= 0
  781. global loggedIn:= 0
  782. global sendGangGang:= 1
  783. global sprayMessageSent:= 0
  784. global plantMessageSent:= 0
  785. global fingerprint:= ""
  786. global messagesKeys:= []
  787. global messagesValues:= []
  788. global recentKeypresses:= ""
  789. global textbindsKeys:= []
  790. global textbindsValues:= []
  791. global autonomousKeys:= []
  792. global autonomousValues:= []
  793. global wpbindKeys:= []
  794. global wpbindWPs:= []
  795. global wpbindReasons:= []
  796. global dialogID:= 20000
  797. global lastHP:= 100
  798. global lastAM:= 100
  799. FileRead, hitSound, *c img/hitsound.wav
  800. global overlayPlantImage:= -1
  801. global overlayEditMode:= 0
  802. global overlayEditWhich:= ""
  803. global overlayEditX:= 0
  804. global overlayEditY:= 0
  805. global overlayCardl:= -1
  806. global overlayCardlColor:= "FFFFFF"
  807. global overlayCardlSize:= 1
  808. global overlayCardlFont:= "Arial"
  809. global overlayCardlX:= 500
  810. global overlayCardlY:= 500
  811. global overlayLSD:= -1
  812. global overlayLSDColor:= "FFFFFF"
  813. global overlayLSDSize:= 1
  814. global overlayLSDFont:= "Arial"
  815. global overlayLSDX:= 500
  816. global overlayLSDY:= 500
  817. global overlayGold:= -1
  818. global overlayGoldColor:= "FFFFFF"
  819. global overlayGoldSize:= 1
  820. global overlayGoldFont:= "Arial"
  821. global overlayGoldX:= 500
  822. global overlayGoldY:= 500
  823. global overlayCustom:= -1
  824. global overlayCustomColor:= "FFFFFF"
  825. global overlayCustomSize:= 1
  826. global overlayCustomFont:= "Arial"
  827. global overlayCustomX:= 500
  828. global overlayCustomY:= 500
  829. global fraks:= {1: ["Los Santos Police Department","0099FF","pd","police","polizei","ls","lspd","cops","bullen","cadetten"],2: ["Federal Bureau of Investigation", "000066", "fbi", "federal", "bureau", "investigation", "nsa", "m4", "sprayer", "gps", "uc"],4: ["San Andreas Rettungsdienst", "B32400","medic", "medics", "sard", "sa:rd", "rettungsdienst", "nodm", "action", "feuer"],5: ["La Cosa Nostra", "404040", "lcn", "la", "cosa", "nostra", "seit november kaputt"],6: ["Yakuza", "FFFFFF","yakuza", "enton", "mustang"],7: ["Regierung", "FFFFFF", "regierung", "inaktiv", "gov", "government", "ott", "4 wochen invite"],9: ["San Andreas Media AG", "FF6600", "sekte", "sam:ag", "samag", "media", "news", "gelddrucker", "sam", "ag", "lucforce", "nikk", "ouro"],11: ["Scarfo Family", "3399FF","scarfo", "scooofo", "scooofoo", "schroff", "sil", "auto", "rennen", "schlumpf"],13: ["Binder Ballas", textColor, "ballas", "purple", "ice", "Binder", "gwfraktion", "macht", "4 dealzones"],14: ["Grove Street", "009933", "gs", "grove", "grove street", "fahrschule", "holzkopf", "wird den ballas deagleln beibringen", "sumpf", "sumpfneger"],18: ["Triaden", "991F00", "triaden", "shanghai", "penner", "gude bizwarspot", "schwuchteln"],19: ["Mara Salvatrucha", "ms13", "vagos", "lv", "mara", "mara salvatrucha", "los", "dumm", "hypefrak", "hype"]}
  830. global drivebyAlreadySet:= 0
  831. global engineAlreadySet:= 0
  832. global lichtAlreadySet:= 0
  833. global timeOnFriedhof:= 0
  834. global timeLSD:= 0
  835. global timeGold:= 0
  836. global timeCustomOverlay:= 0
  837. global debugVar:= 1
  838. global killsGlobalKills:= 0
  839. global killsDailyKills:= 0
  840. global killsGlobalDeaths:= 0
  841. global killsDailyDeaths:= 0
  842. global killsStreak:= 0
  843. global killsDay:= 1
  844. global automaticFlagposRunning:= 0
  845. global automaticCommandRunning:= 0
  846. global automaticCommandInterval:= 1000
  847. global automaticCommandCommand:= ""
  848. global customOverlayText:= ""
  849. global customOverlayTrigger:= ""
  850. global customOverlayTime:= 10
  851. global kameMessage:= ""
  852. global allowDownloadStrings:= 1
  853. downloadStrings()
  854. FileDelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  855. createINI()
  856. GuiControl, Hide, LoadingText
  857. Gui, Add, Text, x467 y230 cPurple vLoginText, Binder ~ Login
  858. font(14)
  859. Gui, Add, Text, x485 y340 cPurple vLoginUserLabel, Benutzername
  860. Gui, Add, Edit, x485 y370 w400 h33 vLoginUser
  861. Gui, Add, Text, x485 y430 cPurple vLoginPassLabel, Passwort
  862. Gui, Add, Edit, x485 y460 w400 h33 vLoginPass Password
  863. Gui, Add, Button, x0-50 y0-50 vLoginDefault gLogin +default +hidden, l
  864. Gui, Add, Picture, x485 y510 gLogin vLoginLogin, img/elements/login.png
  865. elements["login"].Push("LoginText")
  866. elements["login"].Push("LoginUserLabel")
  867. elements["login"].Push("LoginUser")
  868. elements["login"].Push("LoginPassLabel")
  869. elements["login"].Push("LoginPass")
  870. elements["login"].Push("LoginLogin")
  871. font(16)
  872. loginRememberMe:= new CheckBox(703, 510, "Namen merken", "LoginRememberName", "login")
  873. IniRead, RememberMe, %A_WorkingDir%\PurpleIceSettings.ini, Login, RememberMe, 0
  874. if(RememberMe == 0){
  875. GuiControl, Focus, LoginUser
  876. } else {
  877. GuiControl, Focus, LoginPass
  878. GuiControl,, LoginUser, %RememberMe%
  879. loginRememberMe.set(1)
  880. }
  881. return
  882. Initialization:
  883. Gui, Add, Picture, x0 y0 gCallbackMain vNavigationHome, img/menu/home.png
  884. Gui, Add, Picture, x0 y160 gCallbackKeybinds vNavigationKeybinds, img/menu/keybinds.png
  885. Gui, Add, Picture, x0 y320 gCallbackCommands vNavigationCommands, img/menu/commands.png
  886. Gui, Add, Picture, x0 y480 gCallbackOverlays vNavigationOverlays, img/menu/overlays.png
  887. Gui, Add, Picture, x0 y640 gCallbackUpdates vNavigationUpdates, img/menu/updates.png
  888. Gui, Add, Picture, x100 y640 gCallbackCredits vNavigationCredits, img/menu/credits.png
  889. font(12)
  890. Gui, Add, Text, x1145 y780 cPurple, v%version%
  891. font(16)
  892. Gui, Add, Text, x240 y5 cPurple vTitle, Binder aaaaaaaaaaaaaaaaaaaaaaaaa
  893. font(10)
  894. gangGang:= sendGangGang == 0 ? "deaktiviert" : "aktiviert"
  895. font(46)
  896. Gui, Add, Text, x240 y60 cPurple vHomeWelcome +hidden, Hey
  897. font(26)
  898. Gui, Add, Text, x350 y90 cPurple vHomeWelcomeUnderline +hidden, ______________________
  899. StringUpper, playerNameUpper, playerName
  900. Gui, Add, Text, x350 y90 cPurple vHomeWelcomeName +hidden, %playerNameUpper%
  901. Gui, Add, Picture, x810 y50 vHomeLeftSeperator +hidden, img/menu/navbar.png
  902. font(16)
  903. homePremiumAccount:= new CheckBox(240, 150, "Aktiver Nova-Premiumaccount?", "HomeActivePremium", "home")
  904. homeAkAvailable:= new CheckBox(240, 190, "AK-47 im Equip?", "HomeAkAvailable", "home")
  905. homeMFourOverAK:= new CheckBox(240, 230, "M4 statt AK-47 benutzen?", "HomeMFourOverAK", "home")
  906. homeRankFour:= new CheckBox(240, 270, "Rang 4+?", "HomeRankFour", "home")
  907. Gui, Add, Text, x240 y340 cPurple vHomeMainfunctions +hidden, Nebenfunktionen
  908. homeAutoDriveby:= new CheckBox(240, 380, "Automatisch /swapgun", "HomeAutoDriveby", "home")
  909. homeAutoTicket:= new CheckBox(240, 420, "Automatisch /gpayticket", "HomeAutoTicket", "home")
  910. homeAutoEngine:= new CheckBox(240, 460, "Automatisch Motor einschalten", "HomeAutoEngine", "home")
  911. homeAutoLicht:= new CheckBox(240, 500, "Automatisch Licht ab 21 Uhr einschalten", "HomeAutoLicht", "home")
  912. homeAutoWP:= new CheckBox(240, 540, "Automatisch WPs im /f-Chat", "HomeAutoWPs", "home")
  913. homeFriedhofCounter:= new CheckBox(240, 580, "Friedhofszeit im Chat", "HomeFriedhofCounter", "home")
  914. homeLSDCounter:= new CheckBox(240, 620, "LSD-Cooldown im Chat", "HomeLSDCounter", "home")
  915. homeAutoSound:= new CheckBox(240, 660, "Sound bei Schaden", "HomeAutoSound", "home")
  916. Gui, Add, Text, x240 y700 cPurple vHomeFunctionJoinCommand +hidden, Bind`, der beim Beitritt gefeuert wird
  917. font(9)
  918. Gui, Add, Edit, x240 y730 h33 w340 vHomeFunctionJoinInput -VScroll +hidden,
  919. font(16)
  920. Gui, Add, Picture, x590 y730 w190 vHomeFunctionJoinSave gCallbackSave +hidden, img/elements/btnSave_sm.png
  921. font(22)
  922. homeKillbinderEnabled:= new CheckBox(840, 60, "Killbinder", "HomeKillbinderEnabled", "home")
  923. font(9)
  924. GUI, Add, Edit, x840 y140 h33 w340 vHomeKillbinderSec1_1 -VScroll +hidden,
  925. GUI, Add, Edit, x840 y180 h33 w340 vHomeKillbinderSec1_2 -VScroll +hidden,
  926. GUI, Add, Edit, x840 y250 h33 w340 vHomeKillbinderSec2_1 -VScroll +hidden,
  927. GUI, Add, Edit, x840 y290 h33 w340 vHomeKillbinderSec2_2 -VScroll +hidden,
  928. GUI, Add, Edit, x840 y360 h33 w340 vHomeKillbinderSec3_1 -VScroll +hidden,
  929. GUI, Add, Edit, x840 y400 h33 w340 vHomeKillbinderSec3_2 -VScroll +hidden,
  930. GUI, Add, Edit, x840 y470 h33 w340 vHomeKillbinderSec4_1 -VScroll +hidden,
  931. GUI, Add, Edit, x840 y510 h33 w340 vHomeKillbinderSec4_2 -VScroll +hidden,
  932. font(16)
  933. Gui, Add, Text, x840 y110 cPurple vHomeKillbinderSec1 +hidden, Kombination 1
  934. Gui, Add, Text, x840 y220 cPurple vHomeKillbinderSec2 +hidden, Kombination 2
  935. Gui, Add, Text, x840 y330 cPurple vHomeKillbinderSec3 +hidden, Kombination 3
  936. Gui, Add, Text, x840 y440 cPurple vHomeKillbinderSec4 +hidden, Kombination 4
  937. Gui, Add, Picture, x840 y560 w340 vHomeKillbinderSave gCallbackSave +hidden, img/elements/btnSave_md.png
  938. Gui, Add, Text, x840 y620 cPurple vHomeKillbinderVariables +hidden, Variablen
  939. font(12)
  940. Gui, Add, Text, x840 y645 cPurple vHomeKillbinderVariablesVariables +hidden, [GKills] [DKills]`n Gesamte/Heutige Kills`n[GDeaths] [DDeaths]`n Gesamte/Heutige Tode`n[GKD] [DKD]`n Gesamte/Heutige K/D`n[Streak]`n Derzeitige Killstreak
  941. elements["home"].Push("HomeWelcome")
  942. elements["home"].Push("HomeWelcomeName")
  943. elements["home"].Push("HomeWelcomeUnderline")
  944. elements["home"].Push("HomeLeftSeperator")
  945. elements["home"].Push("HomeMainfunctions")
  946. elements["home"].Push("HomeFunctionJoinCommand")
  947. elements["home"].Push("HomeFunctionJoinInput")
  948. elements["home"].Push("HomeFunctionJoinSave")
  949. elements["home"].Push("HomeKillbinder")
  950. elements["home"].Push("HomeKillbinderSec1")
  951. elements["home"].Push("HomeKillbinderSec1_1")
  952. elements["home"].Push("HomeKillbinderSec1_2")
  953. elements["home"].Push("HomeKillbinderSec2")
  954. elements["home"].Push("HomeKillbinderSec2_1")
  955. elements["home"].Push("HomeKillbinderSec2_2")
  956. elements["home"].Push("HomeKillbinderSec3")
  957. elements["home"].Push("HomeKillbinderSec3_1")
  958. elements["home"].Push("HomeKillbinderSec3_2")
  959. elements["home"].Push("HomeKillbinderSec4")
  960. elements["home"].Push("HomeKillbinderSec4_1")
  961. elements["home"].Push("HomeKillbinderSec4_2")
  962. elements["home"].Push("HomeKillbinderSave")
  963. elements["home"].Push("HomeKillbinderVariables")
  964. elements["home"].Push("HomeKillbinderVariablesVariables")
  965. counter:= 1
  966. Loop, 2 {
  967. cIndex:= A_Index
  968. hotkeyX:= 240*cIndex + (A_Index > 1 ? 180 : 0)
  969. editX:= 420*cIndex
  970. Loop, 14 {
  971. if(counter < 22) {
  972. thisY:= 30+(50*A_Index)
  973. font(16)
  974. GUI, Add, Hotkey, x%hotkeyX% y%thisY% w170 vKeybindsKey%counter% +hidden,
  975. font(9)
  976. GUI, Add, Edit, x%editX% y%thisY% w170 h33 vKeybindsBind%counter% -VScroll +hidden,
  977. elements["keybinds"].Push("KeybindsKey" counter)
  978. elements["keybinds"].Push("KeybindsBind" counter)
  979. counter++
  980. } else if(counter == 22) {
  981. thisY:= 30+(50*A_Index)
  982. labelY:= thisY+5
  983. font(16)
  984. Gui, Add, Hotkey, x%hotkeyX% y%thisY% w170 vKeybindsKey22 +hidden
  985. font(14)
  986. Gui, Add, Text, x%editX% y%labelY% cPurple vKeybindsBind22 +hidden, Chat wiederholen
  987. elements["keybinds"].Push("KeybindsKey22")
  988. elements["keybinds"].Push("KeybindsBind22")
  989. counter++
  990. }
  991. }
  992. }
  993. font(18)
  994. Gui, Add, Text, x660 y480 cPurple vKeybindsMouseLabel +hidden, Mausbinds
  995. font(16)
  996. Gui, Add, Text, x660 y530 cPurple vKeybindsMouse4 +hidden, Maustaste 4
  997. Gui, Add, Text, x660 y580 cPurple vKeybindsMouse5 +hidden, Maustaste 5
  998. Gui, Add, Text, x660 y630 cPurple vKeybindsMouseLeft +hidden, Mausrad links
  999. Gui, Add, Text, x660 y680 cPurple vKeybindsMouseRight +hidden, Mausrad rechts
  1000. elements["keybinds"].Push("KeybindsMouseLabel")
  1001. elements["keybinds"].Push("KeybindsMouse4")
  1002. elements["keybinds"].Push("KeybindsMouse5")
  1003. elements["keybinds"].Push("KeybindsMouseLeft")
  1004. elements["keybinds"].Push("KeybindsMouseRight")
  1005. counter:= 23
  1006. Loop, 4 {
  1007. hotkeyX:= 660
  1008. thisY:= 480 + (50*A_Index)
  1009. font(9)
  1010. Gui, Add, Edit, x%editX% y%thisY% w170 h33 vKeybindsBind%counter% -VScroll +hidden,
  1011. elements["keybinds"].Push("KeybindsBind" counter)
  1012. counter++
  1013. }
  1014. font(16)
  1015. Gui, Add, Picture, x660 y730 gCallbackSave vKeybindsSave +hidden, img/elements/btnSave_md.png
  1016. elements["keybinds"].Push("KeybindsSave")
  1017. font(100)
  1018. Gui, Add, Text, x1070 y270 cPurple gCallbackTextbinds vKeybindsTextbinds +hidden, >
  1019. elements["keybinds"].Push("KeybindsTextbinds")
  1020. txtcounter:= 1
  1021. Loop, 2 {
  1022. cIndex:= A_Index
  1023. hotkeyX:= 240*cIndex + (A_Index > 1 ? 180 : 0)
  1024. editX:= 420*cIndex
  1025. Loop, 14 {
  1026. if(txtcounter < 28) {
  1027. thisY:= 30+(50*A_Index)
  1028. font(16)
  1029. GUI, Add, Edit, x%hotkeyX% y%thisY% w170 vTextbindsKey%txtcounter% +hidden,
  1030. font(9)
  1031. GUI, Add, Edit, x%editX% y%thisY% w170 h33 vTextbindsBind%txtcounter% -VScroll +hidden,
  1032. elements["textbinds"].Push("TextbindsKey" txtcounter)
  1033. elements["textbinds"].Push("TextbindsBind" txtcounter)
  1034. txtcounter++
  1035. }
  1036. }
  1037. }
  1038. Gui, Add, Picture, x660 y730 gCallbackSave vTextbindsSave +hidden, img/elements/btnSave_md.png
  1039. elements["textbinds"].Push("TextbindsSave")
  1040. font(100)
  1041. Gui, Add, Text, x1070 y270 cPurple gCallbackAutonomous vKeybindsAutonomous +hidden, >
  1042. elements["textbinds"].Push("KeybindsAutonomous")
  1043. Gui, Add, Picture, x660 y730 gCallbackSave vAutonomousSave +hidden, img/elements/btnSave_md.png
  1044. elements["autonomous"].Push("AutonomousSave")
  1045. font(100)
  1046. Gui, Add, Text, x1070 y270 cPurple gCallbackKeybinds vAutonomousKeybinds +hidden, <
  1047. elements["autonomous"].Push("AutonomousKeybinds")
  1048. txtcounter:= 1
  1049. Loop, 2 {
  1050. cIndex:= A_Index
  1051. hotkeyX:= 240*cIndex + (A_Index > 1 ? 180 : 0)
  1052. editX:= 420*cIndex
  1053. Loop, 14 {
  1054. if(txtcounter < 28) {
  1055. thisY:= 30+(50*A_Index)
  1056. font(16)
  1057. GUI, Add, Edit, x%hotkeyX% y%thisY% w170 vAutonomousKey%txtcounter% +hidden,
  1058. font(9)
  1059. GUI, Add, Edit, x%editX% y%thisY% w170 h33 vAutonomousBind%txtcounter% -VScroll +hidden,
  1060. elements["autonomous"].Push("AutonomousKey" txtcounter)
  1061. elements["autonomous"].Push("AutonomousBind" txtcounter)
  1062. txtcounter++
  1063. }
  1064. }
  1065. }
  1066. customCommandsLength:= customCommands.MaxIndex()
  1067. font(14)
  1068. Loop, %customCommandsLength% {
  1069. thisY:= 19 + (26*A_Index)
  1070. command:= customCommands[A_Index]
  1071. desc:= customCommandsDesc[A_Index]
  1072. Gui, Add, Text, x240 y%thisY% cPurple vCommandsCommand%A_Index% +hidden, %command%
  1073. Gui, Add, Text, x500 y%thisY% cPurple vCommandsLabel%A_Index% +hidden, %desc%
  1074. elements["commands"].Push("CommandsCommand" A_Index)
  1075. elements["commands"].Push("CommandsLabel" A_Index)
  1076. }
  1077. font(16)
  1078. overlaysCheckCardl:= new Checkbox(240, 80, "Car DL", "OverlaysCardl", "overlays")
  1079. overlaysCheckLSD:= new Checkbox(240, 120, "LSD Nebenwirkungen", "OverlaysLSD", "overlays")
  1080. overlaysCheckGold:= new Checkbox(240, 160, "Gold-Use Cooldown", "OverlaysGold", "overlays")
  1081. overlaysCheckCustom:= new Checkbox(240, 200, "Custom Cooldown", "OverlaysCustom", "overlays")
  1082. font(20)
  1083. Gui, Add, Text, x500 y80 w50 h30 cFFFFFF gOverlaysCallCardlColor vOverlaysCardlColor +BackgroundTrans +hidden, lllllll
  1084. Gui, Add, Text, x500 y120 w50 h30 cFFFFFF gOverlaysCallLSDColor vOverlaysLSDColor +BackgroundTrans +hidden, lllllll
  1085. Gui, Add, Text, x500 y160 w50 h30 cFFFFFF gOverlaysCallGoldColor vOverlaysGoldColor +BackgroundTrans +hidden, lllllll
  1086. Gui, Add, Text, x500 y200 w50 h30 cFFFFFF gOverlaysCallCustomColor vOverlaysCustomColor +BackgroundTrans +hidden, lllllll
  1087. font(14)
  1088. Gui, Add, Edit, x570 y80 w30 h30 vOverlaysCardlSize +hidden,
  1089. Gui, Add, Edit, x570 y120 w30 h30 vOverlaysLSDSize +hidden,
  1090. Gui, Add, Edit, x570 y160 w30 h30 vOverlaysGoldSize +hidden,
  1091. Gui, Add, Edit, x570 y200 w30 h30 vOverlaysCustomSize +hidden,
  1092. Gui, Add, DropdownList, x620 y80 h230 w150 vOverlaysCardlFont +hidden, Arial|Calibri|Comic Sans|Impact|Tahoma|T.N.R.|Verdana|Sansation
  1093. Gui, Add, DropdownList, x620 y120 h230 w150 vOverlaysLSDFont +hidden, Arial|Calibri|Comic Sans|Impact|Tahoma|T.N.R.|Verdana|Sansation
  1094. Gui, Add, DropdownList, x620 y160 h230 w150 vOverlaysGoldFont +hidden, Arial|Calibri|Comic Sans|Impact|Tahoma|T.N.R.|Verdana|Sansation
  1095. Gui, Add, DropdownList, x620 y200 h230 w150 vOverlaysCustomFont +hidden, Arial|Calibri|Comic Sans|Impact|Tahoma|T.N.R.|Verdana|Sansation
  1096. Gui, Add, Picture, x240 y240 gCallbackOverlaySave vOverlaysSave +hidden, img/elements/btnSave_md.png
  1097. elements["overlays"].Push("OverlaysCardlColor")
  1098. elements["overlays"].Push("OverlaysCardlSize")
  1099. elements["overlays"].Push("OverlaysCardlFont")
  1100. elements["overlays"].Push("OverlaysLSDColor")
  1101. elements["overlays"].Push("OverlaysLSDSize")
  1102. elements["overlays"].Push("OverlaysLSDFont")
  1103. elements["overlays"].Push("OverlaysGoldColor")
  1104. elements["overlays"].Push("OverlaysGoldSize")
  1105. elements["overlays"].Push("OverlaysGoldFont")
  1106. elements["overlays"].Push("OverlaysCustomColor")
  1107. elements["overlays"].Push("OverlaysCustomSize")
  1108. elements["overlays"].Push("OverlaysCustomFont")
  1109. elements["overlays"].Push("OverlaysText")
  1110. elements["overlays"].Push("OverlaysSave")
  1111. font(10, "Consolas")
  1112. Gui, Add, Edit, x240 y100 h480 w930 vUpdatesEdit cWhite +hidden +readonly,
  1113. font(16)
  1114. r:= WinHTTPRequest("https://finn.ovh/binder2/changelog.txt", changelog)
  1115. if(r != -1){
  1116. MsgBox, Es ist ein Fehler beim Laden der Changelog aufgetreten.
  1117. } else {
  1118. GuiControl,, UpdatesEdit, %changelog%
  1119. }
  1120. elements["updates"].Push("UpdatesEdit")
  1121. new CreditsElement(260, 80, "img/credits/finn.png", "Finn", "API und Crack", "credits")
  1122. new CreditsElement(260, 320, "img/credits/pokee.png", "Pokee", "Coder", "credits")
  1123. new CreditsElement(260, 560, "img/credits/ryano.png", "ryano", "Helper", "credits")
  1124. r:= WinHTTPRequest("https://finn.ovh/binder2/wpbinds.php", wpbinds)
  1125. if(r == -1){
  1126. wpbindsData:= StrSplit(wpbinds, "|||")
  1127. For, index, value in wpbindsData {
  1128. valueData:= StrSplit(value, "||")
  1129. wpbindKeys.Push("/" valueData[1])
  1130. wpbindWPs.Push(valueData[2])
  1131. wpbindReasons.Push(valueData[3])
  1132. }
  1133. }
  1134. readINI()
  1135. initHotkeys()
  1136. changeTab("Home")
  1137. initOverlays()
  1138. SetTimer, Timer100, 100
  1139. SetTimer, Timer150, 150
  1140. SetTimer, Timer200, 200
  1141. SetTimer, Timer300, 300
  1142. SetTimer, Timer500, 500
  1143. SetTimer, Timer1000, 1000
  1144. SetTimer, Timer3000, 3000
  1145. return
  1146. TestFunc:
  1147. AddChatMessage("")
  1148. return
  1149. RenameSAMP:
  1150. renameSAMP()
  1151. return
  1152. Timer100:
  1153. if(homeAutoSound.isChecked() == 1)
  1154. doAutoSound()
  1155. return
  1156. Timer150:
  1157. processChat()
  1158. return
  1159. Timer200:
  1160. if(homeAutoDriveby.isChecked() == 1)
  1161. doAutoDriveby()
  1162. return
  1163. Timer300:
  1164. updateOverlays()
  1165. return
  1166. Timer500:
  1167. if(homeAutoEngine.isChecked() == 1)
  1168. doAutoEngine()
  1169. return
  1170. Timer1000:
  1171. checkNewDay()
  1172. processFriedhofCounter()
  1173. processLSDCounter()
  1174. processGoldCounter()
  1175. processCustomCounter()
  1176. if(homeAutoLicht.isChecked())
  1177. doAutoLicht()
  1178. return
  1179. Timer3000:
  1180. checkSprayMessage()
  1181. checkPlantMessage()
  1182. return
  1183. TimerCustomCommand:
  1184. processCustomCommand()
  1185. return
  1186. OverlaysCardl:
  1187. overlaysCheckCardl.toggle()
  1188. initOverlays()
  1189. saveINI(4)
  1190. return
  1191. OverlaysLSD:
  1192. overlaysCheckLSD.toggle()
  1193. initOverlays()
  1194. saveINI(4)
  1195. return
  1196. OverlaysGold:
  1197. overlaysCheckGold.toggle()
  1198. initOverlays()
  1199. saveINI(4)
  1200. return
  1201. OverlaysCustom:
  1202. overlaysCheckCustom.toggle()
  1203. initOverlays()
  1204. saveINI(4)
  1205. return
  1206. OverlaysCallCardlColor:
  1207. changeOverlayColor("cardl")
  1208. return
  1209. OverlaysCallLSDColor:
  1210. changeOverlayColor("lsd")
  1211. return
  1212. OverlaysCallGoldColor:
  1213. changeOverlayColor("gold")
  1214. return
  1215. OverlaysCallCustomColor:
  1216. changeOverlayColor("custom")
  1217. return
  1218. HomeAutoDriveby:
  1219. homeAutoDriveby.toggle()
  1220. return
  1221. HomeActivePremium:
  1222. homePremiumAccount.toggle()
  1223. return
  1224. HomeAkAvailable:
  1225. homeAkAvailable.toggle()
  1226. return
  1227. HomeRankFour:
  1228. homeRankFour.toggle()
  1229. return
  1230. HomeMFourOverAK:
  1231. homeMFourOverAK.toggle()
  1232. return
  1233. HomeAutoEngine:
  1234. homeAutoEngine.toggle()
  1235. return
  1236. HomeAutoWPs:
  1237. homeAutoWP.toggle()
  1238. return
  1239. HomeKillbinderEnabled:
  1240. homeKillbinderEnabled.toggle()
  1241. return
  1242. HomeFriedhofCounter:
  1243. homeFriedhofCounter.toggle()
  1244. return
  1245. HomeLSDCounter:
  1246. homeLSDCounter.toggle()
  1247. return
  1248. HomeAutoTicket:
  1249. homeAutoTicket.toggle()
  1250. return
  1251. HomeAutoLicht:
  1252. homeAutoLicht.toggle()
  1253. return
  1254. HomeAutoSound:
  1255. homeAutoSound.toggle()
  1256. return
  1257. LoginRememberName:
  1258. loginRememberMe.toggle()
  1259. return
  1260. Login:
  1261. if(loggedIn == 1)
  1262. return
  1263. GuiControlGet, Username,, LoginUser
  1264. GuiControlGet, Password,, LoginPass
  1265. PCdata := EnvGet("COMPUTERNAME") EnvGet("HOMEPATH") EnvGet("USERNAME") EnvGet("PROCESSOR_ARCHITECTURE") EnvGet("PROCESSOR_IDENTIFIER") EnvGet("PROCESSOR_LEVEL") EnvGet("PROCESSOR_REVISION") A_OSType
  1266. fingerprint:= CalcStringHash("c" PCdata, 0x800c, "UTF-8")
  1267. hwid:= fingerprint
  1268. if(Username == "" or Password == "" or loginRunning == 1)
  1269. return
  1270. loginRunning:= 1
  1271. r:= WinHTTPRequest("https://finn.ovh/binder2/binderlogin.php?name=" Username "&pass=" Password "&hwid=" hwid, response)
  1272. loginRunning:= 0
  1273. if(r != -1){
  1274. Goto, Initialization
  1275. return
  1276. }
  1277. if(response == "NOPE"){
  1278. Goto, Initialization
  1279. return
  1280. }
  1281. playerName:= Username
  1282. sendGangGang:= response
  1283. loggedIn:= 1
  1284. Goto, Initialization
  1285. return
  1286. AutomaticFlagpos:
  1287. SendChat("/getflagpos")
  1288. return
  1289. Kame:
  1290. SendChat("/ame " kameMessage)
  1291. return
  1292. CallbackMain:
  1293. changeTab("Home")
  1294. return
  1295. CallbackKeybinds:
  1296. changeTab("Keybinds")
  1297. return
  1298. CallbackTextbinds:
  1299. changeTab("Textbinds")
  1300. return
  1301. CallbackAutonomous:
  1302. changeTab("Autonomous")
  1303. return
  1304. CallbackCommands:
  1305. changeTab("Commands")
  1306. return
  1307. CallbackOverlays:
  1308. changeTab("Overlays")
  1309. return
  1310. CallbackUpdates:
  1311. changeTab("Updates")
  1312. return
  1313. CallbackCredits:
  1314. changeTab("Credits")
  1315. return
  1316. CallbackMinimize:
  1317. WinMinimize
  1318. return
  1319. CallbackSave:
  1320. saveINI()
  1321. TrayTip, ~ Binder, Einstellungen wurden gespeichert, 4
  1322. initHotkeys()
  1323. return
  1324. CallbackOverlaySave:
  1325. saveINI(4)
  1326. TrayTip, ~ Binder, Overlays wurden gespeichert, 4
  1327. initOverlays()
  1328. return
  1329. CallbackClose:
  1330. GuiClose:
  1331. saveINI()
  1332. removeOverlays()
  1333. ExitApp
  1334. return
  1335. initHotkeys() {
  1336. global
  1337. For, index, value in activeHotkeys {
  1338. HotKey, *%value%, off
  1339. }
  1340. activeHotkeys:= []
  1341. textbindsKeys:= []
  1342. textbindsValues:= []
  1343. autonomousKeys:= []
  1344. autonomousValues:= []
  1345. Sleep, 100
  1346. Loop, 28 {
  1347. GuiControlGet, thisBind,, KeybindsBind%A_Index%
  1348. GuiControlGet, thisKey,, KeybindsKey%A_Index%
  1349. if(thisKey != ""){
  1350. HotKey, *%thisKey%, Keybind%A_Index%, on
  1351. activeHotkeys.Push(thisKey)
  1352. }
  1353. }
  1354. Loop, 27 {
  1355. GuiControlGet, txtKey,, TextbindsKey%A_Index%
  1356. GuiControlGet, txtVal,, TextbindsBind%A_Index%
  1357. if(txtKey != ""){
  1358. textbindsKeys.Push(txtKey)
  1359. textbindsValues.Push(txtVal)
  1360. }
  1361. }
  1362. Loop, 27 {
  1363. GuiControlGet, autKey,, AutonomousKey%A_Index%
  1364. GuiControlGet, autVal,, AutonomousBind%A_Index%
  1365. if(autKey != ""){
  1366. autonomousKeys.Push(autKey)
  1367. autonomousValues.Push(autVal)
  1368. }
  1369. }
  1370. return
  1371. }
  1372. changeTab(tabName:= "Home"){
  1373. StringLower, currentGUILower, currentGUI
  1374. GuiControl,, Navigation%currentGUI%, img/menu/%currentGUILower%.png
  1375. currentGUI:= tabName
  1376. GuiControl,, Title, Binder `>`> %tabName%
  1377. GuiControl,, Navigation%tabName%, img/menu/active%tabName%.png
  1378. Loop, 9 {
  1379. i:= A_Index
  1380. section:= (i == 1 ? "home" : (i == 2 ? "keybinds" : (i == 3 ? "commands" : (i == 4 ? "overlays" : (i == 5 ? "updates" : (i == 6 ? "credits" : (i == 7 ? "login" : (i == 8 ? "textbinds" : (i == 9 ? "autonomous" : "wtfahkduarsch")))))))))
  1381. For, index, element in elements[section] {
  1382. GuiControl, Hide, %element%
  1383. }
  1384. }
  1385. For, index, element in elements[tabName] {
  1386. GuiControl, Show, %element%
  1387. }
  1388. return
  1389. }
  1390. WM_LBUTTONDOWN(){
  1391. MouseGetPos, mouseX, mouseY
  1392. if(mouseX >= 207 and mouseY >= 0 and mouseY <= 40)
  1393. PostMessage, 0xA1, 2
  1394. }
  1395. renameSAMP() {
  1396. WinSetTitle, ahk_exe gta_sa.exe,, GTA:SA:MP
  1397. return
  1398. }
  1399. font(fontSize:= 10, fontName:= "Tahoma"){
  1400. sizeScaled:= round(96/A_ScreenDPI*fontSize)
  1401. Gui, Font, s%sizeScaled%, %fontName%
  1402. }
  1403. WTSEnumProcesses( Mode := 1 ) {
  1404. Local tPtr := 0, pPtr := 0, nTTL := 0, LIST := ""
  1405. If not DllCall( "Wtsapi32\WTSEnumerateProcesses", "Ptr",0, "Int",0, "Int",1, "PtrP",pPtr, "PtrP",nTTL )
  1406. Return "", DllCall( "SetLastError", "Int",-1 )
  1407. tPtr := pPtr
  1408. Loop % ( nTTL )
  1409. LIST .= ( Mode < 2 ? NumGet( tPtr + 4, "UInt" ) : "" )
  1410. . ( Mode = 1 ? A_Tab : "" )
  1411. . ( Mode > 0 ? StrGet( NumGet( tPtr + 8 ) ) ",,," : "," )
  1412. , tPtr += ( A_PtrSize = 4 ? 16 : 24 )
  1413. StringTrimRight, LIST, LIST, 1
  1414. DllCall( "Wtsapi32\WTSFreeMemory", "Ptr",pPtr )
  1415. Return LIST, DllCall( "SetLastError", "UInt",nTTL )
  1416. }
  1417. createINI() {
  1418. IfNotExist %A_WorkingDir%\PurpleIceSettings.ini
  1419. {
  1420. IniWrite, 1, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Enabled
  1421. IniWrite, "L", %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Hotkey1
  1422. IniWrite, "Hi! ~[Wait 1000]Mit Delay!", %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Bind1
  1423. IniWrite, "/f -1 Holzkopf [#[GKills]]", %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section1_1
  1424. IniWrite, "/c Machste Pause", %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section1_2
  1425. }
  1426. return
  1427. }
  1428. readINI() {
  1429. global
  1430. IniRead, Premium, %A_WorkingDir%\PurpleIceSettings.ini, Home, Premium, 0
  1431. homePremiumAccount.set(Premium)
  1432. IniRead, AkAvailable, %A_WorkingDir%\PurpleIceSettings.ini, Home, AkAvailable, 0
  1433. homeAkAvailable.set(AkAvailable)
  1434. IniRead, UseMFour, %A_WorkingDir%\PurpleIceSettings.ini, Home, UseMFour, 0
  1435. homeMFourOverAK.set(UseMFour)
  1436. IniRead, RankFour, %A_WorkingDir%\PurpleIceSettings.ini, Home, RankFour, 0
  1437. homeRankFour.set(RankFour)
  1438. IniRead, AutoTicket, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoTicket, 0
  1439. homeAutoTicket.set(AutoTicket)
  1440. IniRead, AutoDriveby, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoDriveby, 0
  1441. homeAutoDriveby.set(AutoDriveby)
  1442. IniRead, AutoWP, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoWP, 0
  1443. homeAutoWP.set(AutoWP)
  1444. IniRead, AutoLicht, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoLicht, 0
  1445. homeAutoLicht.set(AutoLicht)
  1446. IniRead, AutoEngine, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoEngine, 0
  1447. homeAutoEngine.set(AutoEngine)
  1448. IniRead, FriedhofCounter, %A_WorkingDir%\PurpleIceSettings.ini, Home, FriedhofCounter, 0
  1449. homeFriedhofCounter.set(FriedhofCounter)
  1450. IniRead, LSDCounter, %A_WorkingDir%\PurpleIceSettings.ini, Home, LSDCounter, 0
  1451. homeLSDCounter.set(LSDCounter)
  1452. IniRead, AutoSound, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoSound, 0
  1453. homeAutoSound.set(AutoSound)
  1454. IniRead, JoinCommand, %A_WorkingDir%\PurpleIceSettings.ini, Home, JoinCommand, 0
  1455. if(JoinCommand != 0)
  1456. GuiControl,, HomeFunctionJoinInput, %JoinCommand%
  1457. IniRead, KillbinderEnabled, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Enabled, 0
  1458. homeKillbinderEnabled.set(KillbinderEnabled)
  1459. IniRead, Day, %A_WorkingDir%\PurpleIceSettings.ini, Stats, Day, 1
  1460. killsDay:= Day
  1461. IniRead, GKills, %A_WorkingDir%\PurpleIceSettings.ini, Stats, KillsGlobal, 0
  1462. IniRead, DKills, %A_WorkingDir%\PurpleIceSettings.ini, Stats, KillsDaily, 0
  1463. IniRead, GDeaths, %A_WorkingDir%\PurpleIceSettings.ini, Stats, DeathsGlobal, 0
  1464. IniRead, DDeaths, %A_WorkingDir%\PurpleIceSettings.ini, Stats, DeathsDaily, 0
  1465. killsGlobalKills:= GKills
  1466. killsGlobalDeaths:= GDeaths
  1467. killsDailyKills:= DKills
  1468. killsDailyDeaths:= DDeaths
  1469. Loop, 28 {
  1470. IniRead, Hotkey, %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Hotkey%A_Index%, 0
  1471. IniRead, Bind, %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Bind%A_Index%, 0
  1472. if(Hotkey != 0){
  1473. GuiControl,, KeybindsKey%A_Index%, %Hotkey%
  1474. }
  1475. if(Bind != 0){
  1476. GuiControl,, KeybindsBind%A_Index%, %Bind%
  1477. }
  1478. }
  1479. Loop, 4 {
  1480. IniRead, Text1, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section%A_Index%_1, 0
  1481. IniRead, Text2, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section%A_Index%_2, 0
  1482. if(Text1 != 0){
  1483. GuiControl,, HomeKillbinderSec%A_Index%_1, %Text1%
  1484. }
  1485. if(Text2 != 0){
  1486. GuiControl,, HomeKillbinderSec%A_Index%_2, %Text2%
  1487. }
  1488. }
  1489. Loop, 27 {
  1490. IniRead, TextbindKey, %A_WorkingDir%\PurpleIceSettings.ini, Textbinds, TextbindKey%A_Index%, 0
  1491. IniRead, TextbindVal, %A_WorkingDir%\PurpleIceSettings.ini, Textbinds, TextbindVal%A_Index%, 0
  1492. if(TextbindKey != 0){
  1493. GuiControl,, TextbindsKey%A_Index%, %TextbindKey%
  1494. }
  1495. if(TextbindVal != 0){
  1496. GuiControl,, TextbindsBind%A_Index%, %TextbindVal%
  1497. }
  1498. }
  1499. Loop, 27 {
  1500. IniRead, AutonomousKey, %A_WorkingDir%\PurpleIceSettings.ini, Autonomous, AutonomousKey%A_Index%, 0
  1501. IniRead, AutonomousVal, %A_WorkingDir%\PurpleIceSettings.ini, Autonomous, AutonomousVal%A_Index%, 0
  1502. if(AutonomousKey != 0){
  1503. GuiControl,, AutonomousKey%A_Index%, %AutonomousKey%
  1504. }
  1505. if(AutonomousVal != 0){
  1506. GuiControl,, AutonomousBind%A_Index%, %AutonomousVal%
  1507. }
  1508. }
  1509. IniRead, CarDL, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDL, 0
  1510. overlaysCheckCardl.set(CarDL)
  1511. IniRead, overlayCardlColor, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLColor, 228822
  1512. GuiControl, +c%overlayCardlColor%, OverlaysCardlColor
  1513. IniRead, overlayCardlSize, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLSize, 16
  1514. GuiControl,, OverlaysCardlSize, %overlayCardlSize%
  1515. IniRead, overlayCardlFont, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLFont, Tahoma
  1516. GuiControl, ChooseString, OverlaysCardlFont, %overlayCardlFont%
  1517. IniRead, overlayCardlX, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLX, 500
  1518. IniRead, overlayCardlY, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLY, 500
  1519. IniRead, LSDEnabled, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSD, 0
  1520. overlaysCheckLSD.set(LSDEnabled)
  1521. IniRead, overlayLSDColor, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDColor, 228822
  1522. GuiControl, +c%overlayLSDColor%, OverlaysLSDColor
  1523. IniRead, overlayLSDSize, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDSize, 16
  1524. GuiControl,, OverlaysLSDSize, %overlayLSDSize%
  1525. IniRead, overlayLSDFont, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDFont, Tahoma
  1526. GuiControl, ChooseString, OverlaysLSDFont, %overlayLSDFont%
  1527. IniRead, overlayLSDX, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDX, 500
  1528. IniRead, overlayLSDY, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDY, 500
  1529. IniRead, GoldEnabled, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, Gold, 0
  1530. overlaysCheckGold.set(GoldEnabled)
  1531. IniRead, overlayGoldColor, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldColor, 228822
  1532. GuiControl, +c%overlayGoldColor%, OverlaysGoldColor
  1533. IniRead, overlayGoldSize, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldSize, 16
  1534. GuiControl,, OverlaysGoldSize, %overlayGoldSize%
  1535. IniRead, overlayGoldFont, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldFont, Tahoma
  1536. GuiControl, ChooseString, OverlaysGoldFont, %overlayGoldFont%
  1537. IniRead, overlayGoldX, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldX, 500
  1538. IniRead, overlayGoldY, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldY, 500
  1539. IniRead, CustomEnabled, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, Custom, 0
  1540. overlaysCheckCustom.set(CustomEnabled)
  1541. IniRead, overlayCustomColor, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomColor, 228822
  1542. GuiControl, +c%overlayCustomColor%, OverlaysCustomColor
  1543. IniRead, overlayCustomSize, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomSize, 16
  1544. GuiControl,, OverlaysCustomSize, %overlayCustomSize%
  1545. IniRead, overlayCustomFont, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomFont, Tahoma
  1546. GuiControl, ChooseString, OverlaysCustomFont, %overlayCustomFont%
  1547. IniRead, overlayCustomX, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomX, 500
  1548. IniRead, overlayCustomY, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomY, 500
  1549. IniRead, automaticCommandCommand, %A_WorkingDir%\PurpleIceSettings.ini, Timer, Command, Hallo
  1550. IniRead, automaticCommandInterval, %A_WorkingDir%\PurpleIceSettings.ini, Timer, Interval, 1000
  1551. IniRead, customOverlayText, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomText, Custom
  1552. IniRead, customOverlayTime, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomTime, 10
  1553. IniRead, customOverlayTrigger, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomTrigger, Triggernachricht
  1554. }
  1555. saveINI(fast:= 0) {
  1556. global
  1557. if(loggedIn != 1)
  1558. return
  1559. CardlEnabled:= overlaysCheckCardl.isChecked()
  1560. IniWrite, %CardlEnabled%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDL
  1561. IniWrite, %overlayCardlColor%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLColor
  1562. IniWrite, %overlayCardlX%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLX
  1563. IniWrite, %overlayCardlY%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLY
  1564. GuiControlGet, overlayCardlSize,, OverlaysCardlSize
  1565. IniWrite, %overlayCardlSize%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLSize
  1566. GuiControlGet, overlayCardlFont,, OverlaysCardlFont
  1567. IniWrite, %overlayCardlFont%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CarDLFont
  1568. LSDEnabled:= overlaysCheckLSD.isChecked()
  1569. IniWrite, %LSDEnabled%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSD
  1570. IniWrite, %overlayLSDColor%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDColor
  1571. IniWrite, %overlayLSDX%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDX
  1572. IniWrite, %overlayLSDY%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDY
  1573. GuiControlGet, overlayLSDSize,, OverlaysLSDSize
  1574. IniWrite, %overlayLSDSize%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDSize
  1575. GuiControlGet, overlayLSDFont,, OverlaysLSDFont
  1576. IniWrite, %overlayLSDFont%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, LSDFont
  1577. GoldEnabled:= overlaysCheckGold.isChecked()
  1578. IniWrite, %GoldEnabled%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, Gold
  1579. IniWrite, %overlayGoldColor%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldColor
  1580. IniWrite, %overlayGoldX%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldX
  1581. IniWrite, %overlayGoldY%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldY
  1582. GuiControlGet, overlayGoldSize,, OverlaysGoldSize
  1583. IniWrite, %overlayGoldSize%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldSize
  1584. GuiControlGet, overlayGoldFont,, OverlaysGoldFont
  1585. IniWrite, %overlayGoldFont%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, GoldFont
  1586. CustomEnabled:= overlaysCheckCustom.isChecked()
  1587. IniWrite, %CustomEnabled%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, Custom
  1588. IniWrite, %overlayCustomColor%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomColor
  1589. IniWrite, %overlayCustomX%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomX
  1590. IniWrite, %overlayCustomY%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomY
  1591. GuiControlGet, overlayCustomSize,, OverlaysCustomSize
  1592. IniWrite, %overlayCustomSize%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomSize
  1593. GuiControlGet, overlayCustomFont,, OverlaysCustomFont
  1594. IniWrite, %overlayCustomFont%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomFont
  1595. if(fast == 4)
  1596. return
  1597. IniWrite, %killsGlobalKills%, %A_WorkingDir%\PurpleIceSettings.ini, Stats, KillsGlobal
  1598. IniWrite, %killsDailyKills%, %A_WorkingDir%\PurpleIceSettings.ini, Stats, KillsDaily
  1599. IniWrite, %killsGlobalDeaths%, %A_WorkingDir%\PurpleIceSettings.ini, Stats, DeathsGlobal
  1600. IniWrite, %killsDailyDeaths%, %A_WorkingDir%\PurpleIceSettings.ini, Stats, DeathsDaily
  1601. IniWrite, %killsDay%, %A_WorkingDir%\PurpleIceSettings.ini, Stats, Day
  1602. if(fast == 2)
  1603. return
  1604. Premium:= homePremiumAccount.isChecked()
  1605. IniWrite, %Premium%, %A_WorkingDir%\PurpleIceSettings.ini, Home, Premium
  1606. AkAvailable:= homeAkAvailable.isChecked()
  1607. IniWrite, %AkAvailable%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AkAvailable
  1608. UseMFour:= homeMFourOverAK.isChecked()
  1609. IniWrite, %UseMFour%, %A_WorkingDir%\PurpleIceSettings.ini, Home, UseMFour
  1610. RankFour:= homeRankFour.isChecked()
  1611. IniWrite, %RankFour%, %A_WorkingDir%\PurpleIceSettings.ini, Home, RankFour
  1612. AutoTicket:= homeAutoTicket.isChecked()
  1613. IniWrite, %AutoTicket%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoTicket
  1614. AutoDriveby:= homeAutoDriveby.isChecked()
  1615. IniWrite, %AutoDriveby%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoDriveby
  1616. AutoWP:= homeAutoWP.isChecked()
  1617. IniWrite, %AutoWP%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoWP
  1618. AutoLicht:= homeAutoLicht.isChecked()
  1619. IniWrite, %AutoLicht%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoLicht
  1620. AutoEngine:= homeAutoEngine.isChecked()
  1621. IniWrite, %AutoDriveby%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoEngine
  1622. FriedhofCounter:= homeFriedhofCounter.isChecked()
  1623. IniWrite, %FriedhofCounter%, %A_WorkingDir%\PurpleIceSettings.ini, Home, FriedhofCounter
  1624. LSDCounter:= homeLSDCounter.isChecked()
  1625. IniWrite, %FriedhofCounter%, %A_WorkingDir%\PurpleIceSettings.ini, Home, LSDCounter
  1626. AutoSound:= homeAutoSound.isChecked()
  1627. IniWrite, %AutoSound%, %A_WorkingDir%\PurpleIceSettings.ini, Home, AutoSound
  1628. GuiControlGet, JoinCommand,, HomeFunctionJoinInput
  1629. if(JoinCommand == "")
  1630. JoinCommand:= 0
  1631. IniWrite, %JoinCommand%, %A_WorkingDir%\PurpleIceSettings.ini, Home, JoinCommand
  1632. KillbinderEnabled:= homeKillbinderEnabled.isChecked()
  1633. IniWrite, %KillbinderEnabled%, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Enabled
  1634. if(loginRememberMe.isChecked() == 1){
  1635. IniWrite, %playerName%, %A_WorkingDir%\PurpleIceSettings.ini, Login, RememberMe
  1636. } else {
  1637. IniWrite, 0, %A_WorkingDir%\PurpleIceSettings.ini, Login, RememberMe
  1638. }
  1639. if(fast == 0){
  1640. Loop, 28 {
  1641. GuiControlGet, thisBind,, KeybindsBind%A_Index%
  1642. GuiControlGet, thisKey,, KeybindsKey%A_Index%
  1643. if(thisBind == "")
  1644. thisBind:= 0
  1645. if(thisKey == "")
  1646. thisKey:= 0
  1647. IniWrite, %thisKey%, %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Hotkey%A_Index%
  1648. IniWrite, %thisBind%, %A_WorkingDir%\PurpleIceSettings.ini, Keybinds, Bind%A_Index%
  1649. }
  1650. Loop, 4 {
  1651. GuiControlGet, text1,, HomeKillbinderSec%A_Index%_1
  1652. GuiControlGet, text2,, HomeKillbinderSec%A_Index%_2
  1653. if(text1 == "")
  1654. text1:= 0
  1655. if(text2 == "")
  1656. text2:= 0
  1657. IniWrite, %text1%, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section%A_Index%_1
  1658. IniWrite, %text2%, %A_WorkingDir%\PurpleIceSettings.ini, Killbinder, Section%A_Index%_2
  1659. }
  1660. Loop, 27 {
  1661. GuiControlGet, textKey,, TextbindsKey%A_Index%
  1662. GuiControlGet, textVal,, TextbindsBind%A_Index%
  1663. if(textKey == "")
  1664. textKey:= 0
  1665. if(textVal == "")
  1666. textVal:= 0
  1667. IniWrite, %textKey%, %A_WorkingDir%\PurpleIceSettings.ini, Textbinds, TextbindKey%A_Index%
  1668. IniWrite, %textVal%, %A_WorkingDir%\PurpleIceSettings.ini, Textbinds, TextbindVal%A_Index%
  1669. }
  1670. Loop, 27 {
  1671. GuiControlGet, autoKey,, AutonomousKey%A_Index%
  1672. GuiControlGet, autoVal,, AutonomousBind%A_Index%
  1673. if(autoKey == "")
  1674. autoKey:= 0
  1675. if(autoVal == "")
  1676. autoVal:= 0
  1677. IniWrite, %autoKey%, %A_WorkingDir%\PurpleIceSettings.ini, Autonomous, AutonomousKey%A_Index%
  1678. IniWrite, %autoVal%, %A_WorkingDir%\PurpleIceSettings.ini, Autonomous, AutonomousVal%A_Index%
  1679. }
  1680. }
  1681. return
  1682. }
  1683. handleHotkey(id, customHotkey="") {
  1684. global
  1685. GuiControlGet, thisKey,, KeybindsKey%id%
  1686. if(!WinActive("ahk_exe gta_sa.exe")){
  1687. if(InStr(thisKey, "Numpad")) {
  1688. thisKey:= SubStr(thisKey, 7)
  1689. }
  1690. SendInput, %thisKey%
  1691. return
  1692. }
  1693. if(id == "JOIN_COMMAND"){
  1694. GuiControlGet, thisBind,, HomeFunctionJoinInput
  1695. if(thisBind == "")
  1696. return
  1697. } else if(id == 22) {
  1698. SendInput, {t}{up}{enter}
  1699. return
  1700. } else {
  1701. GuiControlGet, thisBind,, KeybindsBind%id%
  1702. if(keybindsEnabled == 0 or IsChatOpen() == 1 or IsDialogOpen() == 1 or IsMenuOpen() == 1){
  1703. SendLevel 1
  1704. Hotkey, *%thisKey%, off
  1705. thisKeyToSend:= thisKey
  1706. if(InStr(thisKeyToSend, "Numpad")){
  1707. thisKeyToSend:= SubStr(thisKeyToSend, 7)
  1708. }
  1709. if(GetKeyState("Shift") or GetKeyState("LShift") or GetKeyState("RShift") or (GetKeyState("Capslock", "T") and GetKeyState("RShift") == 0 and GetKeyState("LShift") == 0) )
  1710. SendEvent, +%thisKeyToSend%
  1711. else
  1712. if(GetKeyState("RALT") && GetKeyState("LCTRL"))
  1713. SendEvent, !^%thisKeyToSend%
  1714. else
  1715. SendEvent, %thisKeyToSend%
  1716. SendLevel 0
  1717. Hotkey, *%thisKey%, on
  1718. return
  1719. }
  1720. }
  1721. if(customHotkey != ""){
  1722. thisBind:= customHotkey
  1723. }
  1724. if(InStr(thisBind, "[Var]")){
  1725. StringReplace, thisBind, thisBind, [Var], [Var], UseErrorLevel
  1726. occurences:= ErrorLevel
  1727. Loop, %occurences% {
  1728. userInput:= playerInputText("Variable " A_Index ": ")
  1729. StringReplace, thisBind, thisBind, [Var], %userInput%
  1730. Sleep, 50
  1731. }
  1732. Sleep, 100
  1733. }
  1734. if(InStr(thisBind, "~") == 0) {
  1735. StringLower, thisBindLower, thisBind
  1736. if(thisBindLower == "/dl")
  1737. SendInput, {t}{/}{d}{l}{enter}
  1738. else if(hasValue(customCommands, thisBindLower)) {
  1739. SendLevel 1
  1740. SendEvent, t
  1741. SendLevel 0
  1742. Loop, Parse, thisBindLower
  1743. {
  1744. character:= A_LoopField
  1745. SendLevel 1
  1746. if(hasValue(activeHotkeys, character)){
  1747. Hotkey, *%character%, off
  1748. }
  1749. SendEvent, %character%
  1750. SendLevel 0
  1751. if(hasValue(activeHotkeys, character)){
  1752. Hotkey, *%character%, on
  1753. }
  1754. }
  1755. SendLevel 1
  1756. SendEvent, {enter}
  1757. SendLevel 0
  1758. } else {
  1759. if(InStr(thisBind, "[InputMode]") == 0) {
  1760. SendChat(thisBind)
  1761. } else {
  1762. Sleep, 200
  1763. SendInput, StrReplace(thisBind, "[InputMode]")
  1764. }
  1765. }
  1766. } else {
  1767. commandSplit:= StrSplit(thisBind, "~", " ")
  1768. For, index, value in commandSplit {
  1769. if(RegExMatch(value, "\[Wait (\d*?)\]", wait)){
  1770. thisCommand:= StrReplace(value, wait)
  1771. waitTime:= StrReplace(value, "[Wait ")
  1772. waitTime:= StrReplace(waitTime, "]")
  1773. Sleep, %waitTime%
  1774. StringLower, thisCommandLower, thisCommand
  1775. if(thisCommandLower == "/dl")
  1776. SendInput, {t}{/}{d}{l}{enter}
  1777. else if(hasValue(customCommands, thisCommandLower)) {
  1778. SendLevel 1
  1779. SendEvent, t
  1780. SendLevel 0
  1781. Loop, Parse, thisCommandLower
  1782. {
  1783. character:= A_LoopField
  1784. SendLevel 1
  1785. if(hasValue(activeHotkeys, character)){
  1786. Hotkey, *%character%, off
  1787. }
  1788. SendEvent, %character%
  1789. SendLevel 0
  1790. if(hasValue(activeHotkeys, character)){
  1791. Hotkey, *%character%, on
  1792. }
  1793. }
  1794. SendLevel 1
  1795. SendEvent, {enter}
  1796. SendLevel 0
  1797. } else {
  1798. if(InStr(thisCommand, "[InputMode]") == 0) {
  1799. SendChat(thisCommand)
  1800. } else {
  1801. Sleep, 200
  1802. command:= StrReplace(thisCommand, "[InputMode]")
  1803. SendInput, %command%
  1804. }
  1805. }
  1806. } else {
  1807. StringLower, valueLower, value
  1808. if(valueLower == "/dl")
  1809. SendInput, {t}{/}{d}{l}{enter}
  1810. else if(hasValue(customCommands, valueLower)) {
  1811. SendLevel 1
  1812. SendEvent, t
  1813. SendLevel 0
  1814. Loop, Parse, valueLower
  1815. {
  1816. character:= A_LoopField
  1817. SendLevel 1
  1818. if(hasValue(activeHotkeys, character)){
  1819. Hotkey, *%character%, off
  1820. }
  1821. SendEvent, %character%
  1822. SendLevel 0
  1823. if(hasValue(activeHotkeys, character)){
  1824. Hotkey, *%character%, on
  1825. }
  1826. }
  1827. SendLevel 1
  1828. SendEvent, {enter}
  1829. SendLevel 0
  1830. } else {
  1831. if(InStr(value, "[InputMode]") == 0) {
  1832. SendChat(value)
  1833. } else {
  1834. Sleep, 200
  1835. command:= StrReplace(value, "[InputMode]")
  1836. SendInput, %command%
  1837. }
  1838. }
  1839. }
  1840. }
  1841. }
  1842. }
  1843. handleKillbinder() {
  1844. global
  1845. if(homeKillbinderEnabled.isChecked() == 0)
  1846. return
  1847. sectionsEnabled:= []
  1848. Loop, 4 {
  1849. GuiControlGet, text1,, HomeKillbinderSec%A_Index%_1
  1850. GuiControlGet, text2,, HomeKillbinderSec%A_Index%_2
  1851. if(text1 != "" or text2 != "")
  1852. sectionsEnabled.Push(A_Index)
  1853. }
  1854. entry:= random(1, sectionsEnabled.MaxIndex())
  1855. GuiControlGet, text1,, HomeKillbinderSec%entry%_1
  1856. GuiControlGet, text2,, HomeKillbinderSec%entry%_2
  1857. globalDeathsForCalculation:= (killsGlobalDeaths == 0 ? 1 : killsGlobalDeaths)
  1858. dailyDeathsForCalculation:= (killsDailyDeaths == 0 ? 1 : killsDailyDeaths)
  1859. text1:= StrReplace(text1, "[GKills]", killsGlobalKills)
  1860. text1:= StrReplace(text1, "[DKills]", killsDailyKills)
  1861. text1:= StrReplace(text1, "[GDeaths]", killsGlobalDeaths)
  1862. text1:= StrReplace(text1, "[DDeaths]", killsDailyDeaths)
  1863. text1:= StrReplace(text1, "[Streak]", killsStreak)
  1864. text1:= StrReplace(text1, "[GKD]", floorDecimal((killsGlobalKills/globalDeathsForCalculation), 2))
  1865. text1:= StrReplace(text1, "[DKD]", floorDecimal((killsDailyKills/dailyDeathsForCalculation), 2))
  1866. text2:= StrReplace(text2, "[GKills]", killsGlobalKills)
  1867. text2:= StrReplace(text2, "[DKills]", killsDailyKills)
  1868. text2:= StrReplace(text2, "[GDeaths]", killsGlobalDeaths)
  1869. text2:= StrReplace(text2, "[DDeaths]", killsDailyDeaths)
  1870. text2:= StrReplace(text2, "[Streak]", killsStreak)
  1871. text2:= StrReplace(text2, "[GKD]", floorDecimal((killsGlobalKills/globalDeathsForCalculation), 2))
  1872. text2:= StrReplace(text2, "[DKD]", floorDecimal((killsDailyKills/dailyDeathsForCalculation), 2))
  1873. if(text1 != "") {
  1874. if(InStr(text1, "~") == 0)
  1875. SendChat(text1)
  1876. else {
  1877. text1Parts:= StrSplit(text1, "~", " ")
  1878. For, index, value in text1Parts {
  1879. SendChat(value)
  1880. }
  1881. }
  1882. }
  1883. if(text2 != "") {
  1884. if(InStr(text2, "~") == 0)
  1885. SendChat(text2)
  1886. else {
  1887. text2Parts:= StrSplit(text2, "~", " ")
  1888. For, index, value in text2Parts {
  1889. SendChat(value)
  1890. }
  1891. }
  1892. }
  1893. return
  1894. }
  1895. handleWPs(wpindex) {
  1896. global
  1897. if(wpindex < 0 or wpindex > wpbindKeys.MaxIndex())
  1898. return
  1899. Sleep, 40
  1900. playerID:= playerInputText("Gebe einen Spieler an: ")
  1901. Sleep, 40
  1902. SendChat("/su " playerID " " wpbindWPs[wpindex] " " wpbindReasons[wpindex])
  1903. return
  1904. }
  1905. processFriedhofCounter() {
  1906. global
  1907. if(timeOnFriedhof == 0 or homeFriedhofCounter.isChecked() == 0)
  1908. return
  1909. if(timeOnFriedhof == 240 or timeOnFriedhof == 120 or timeOnFriedhof == 60 or timeOnFriedhof == 30 or timeOnFriedhof == 15 or (timeOnFriedhof > -1 and timeOnFriedhof <= 5))
  1910. AddChatMessage("Du bist noch {0099FF}" timeOnFriedhof " Sekunden {FFFFFF}auf dem Friedhof.")
  1911. timeOnFriedhof--
  1912. }
  1913. processLSDCounter() {
  1914. global
  1915. if(timeLSD == 0)
  1916. return
  1917. timeLSD--
  1918. if(homeLSDCounter.isChecked() == 0)
  1919. return
  1920. tempLSD:= timeLSD + 1
  1921. if(tempLSD == 89 or tempLSD == 60 or tempLSD == 30 or tempLSD == 15 or (tempLSD > -1 and tempLSD <= 5)) {
  1922. if(tempLSD == 89)
  1923. AddChatMessage("Der LSD-Rausch endet in {0099FF}90 Sekunden{FFFFFF}.")
  1924. else
  1925. AddChatMessage("Der LSD-Rausch endet in {0099FF}" tempLSD " Sekunden{FFFFFF}.")
  1926. }
  1927. }
  1928. processGoldCounter() {
  1929. global
  1930. if(timeGold == 0)
  1931. return
  1932. timeGold--
  1933. }
  1934. processCustomCounter() {
  1935. global
  1936. if(timeCustomOverlay == 0)
  1937. return
  1938. timeCustomOverlay--
  1939. }
  1940. processChat() {
  1941. global
  1942. count:= GetChatLineCount()
  1943. if(!WinExist("ahk_exe gta_sa.exe")) {
  1944. processedChatCount:= 1
  1945. return
  1946. }
  1947. if(count < processedChatCount)
  1948. return
  1949. if(count < processedChatCount)
  1950. processedChatCount:= 0
  1951. while((count-processedChatCount) > -1){
  1952. GetChatLine((count-processedChatCount), chat0)
  1953. processedChatCount++
  1954. if(hasValue(processedMessages, chat0)) {
  1955. continue
  1956. }
  1957. processedMessages.Push(chat0)
  1958. if(chat0 == "" or chat0 == 0)
  1959. return
  1960. if(RegStr(chat0, "hushushsushusu123123123")){
  1961. AddChatMessage("{" textColor "}[BinderRemote] {0099FF}Kontaktiere das CP nach neuen Nachrichten..")
  1962. Sleep, 1000
  1963. downloadStrings()
  1964. Sleep, 500
  1965. AddChatMessage("{" textColor "}[BinderRemote] {0099FF}Routine beendet.")
  1966. }
  1967. For, index, key in messagesKeys {
  1968. keySplit:= StrSplit(key, "__")
  1969. if(keySplit[2] == "0" or keySplit[2] == 0){
  1970. if(InStr(chat0, keySplit[1])){
  1971. SendChat(messagesValues[index])
  1972. }
  1973. } else {
  1974. if(InStr(chat0, keySplit[1]) and !InStr(chat0, ": " keySplit[1])){
  1975. SendChat(messagesValues[index])
  1976. }
  1977. }
  1978. }
  1979. GetPlayerName(playerNameProcess, 100)
  1980. if(RegStr(chat0, "INFO: " playerNameProcess " ") and !InStr(chat0, ": INFO: ")){
  1981. AddChatMessage("{" textColor "}[Binder] {0099FF}Kontaktiere das CP..")
  1982. GuiControlGet, Username,, LoginUser
  1983. GuiControlGet, Password,, LoginPass
  1984. GetPlayerPosition(x, y, z)
  1985. r:= WinHTTPRequest("https://finn.ovh/binder2/createplant.php?user=" Username "&pass=" Password "&type=1&x=" Floor(x) "&y=" Floor(y), response)
  1986. if(r != -1){
  1987. AddChatMessage("{" textColor "}[Binder] {FF0000}Der Server hat einen Fehler gemeldet.")
  1988. return
  1989. }
  1990. if(response != "DONE"){
  1991. AddChatMessage("{" textColor "}[Binder] {FF0000}Die Plantage konnte nicht eingetragen werden.")
  1992. return
  1993. }
  1994. AddChatMessage("{" textColor "}[Binder] {00FF00}Die Plantage wurde erfolgreich eingetragen.")
  1995. }
  1996. if(RegStr(chat0, "INFO: " playerNameProcess " hurensohn123123123.") and !InStr(chat0, ": INFO: ")){
  1997. AddChatMessage("{" textColor "}[Binder] {0099FF}Kontaktiere das CP..")
  1998. GuiControlGet, Username,, LoginUser
  1999. GuiControlGet, Password,, LoginPass
  2000. GetPlayerPosition(x, y, z)
  2001. r:= WinHTTPRequest("https://finn.ovh/binder2/createplant.php?user=" Username "&pass=" Password "&type=0&x=" Floor(x) "&y=" Floor(y), response)
  2002. if(r != -1){
  2003. AddChatMessage("{" textColor "}[Binder] {FF0000}Es ist ein Fehler bei der Verarbeitung aufgetreten.")
  2004. return
  2005. }
  2006. if(response != "DONE"){
  2007. AddChatMessage("{" textColor "}[Binder] {FF0000}Die Plantage konnte nicht eingetragen werden.")
  2008. return
  2009. }
  2010. AddChatMessage("{" textColor "}[Binder] {00FF00}Die Plantage wurde erfolgreich eingetragen.")
  2011. }
  2012. if(RegStr(chat0, "Du hast ein Verbrechen begangen ( Vors") OR RegStr(chat0, "SERVER: Du hast gerade einen Mord begangen. Achtung!") OR RegStr(chat0, "GANGWAR: Du hast einen Feind ausgeschaltet.") OR RegStr(chat0, "CASINO-EROBERUNG: Du hast einen Feind ausgeschaltet.") OR RegStr(chat0, "CRACK FESTUNG: Du hast einen Feind ausgeschaltet.") OR (InStr(chat0, "[ ") AND InStr(chat0, "tet | Grund: Blacklisted]"))) {
  2013. killsDailyKills++
  2014. killsGlobalKills++
  2015. killsStreak++
  2016. saveINI(2)
  2017. handleKillbinder()
  2018. dailyDeathsForCalculation:= (killsDailyDeaths == 0 ? 1 : killsDailyDeaths)
  2019. dailyKD:= floorDecimal((killsDailyKills/dailyDeathsForCalculation), 2)
  2020. AddChatMessage("{" textColor "}[Heutige] {0099FF}Kills: {FFFFFF}" killsDailyKills " {0099FF}Tode: {FFFFFF}" killsDailyDeaths " {0099FF}K/D: {FFFFFF}" dailyKD)
  2021. }
  2022. if(RegStr(chat0, "INFO: Mit /quiz kannst du ein Quizduell starten oder mit /newquiz neue Fragen erstellen.")){
  2023. killsDailyDeaths++
  2024. killsGlobalDeaths++
  2025. killsStreak:= 0
  2026. timeLSD:= 0
  2027. timeGold:= 0
  2028. saveINI(2)
  2029. SendChat("/friedhof")
  2030. Sleep, 200
  2031. GetChatLine(0, chat, 0)
  2032. chat:= SubStr(chat, 12)
  2033. RegExMatch(chat, "\d+", friedhofTimeFound)
  2034. timeOnFriedhof:= friedhofTimeFound
  2035. }
  2036. if(RegStr(chat0, "Du hast LSD Pillen eingenommen")){
  2037. timeLSD:= 89
  2038. }
  2039. if(RegStr(chat0, "Du hast 20g Acapulco Gold benutzt!")){
  2040. timeGold:= 59
  2041. }
  2042. if(RegStr(chat0, "Du hast 2g Hawaiian Green benutzt!")) {
  2043. timeGold:= 44
  2044. }
  2045. if(InStr(chat0, "SA-MP 0.3.7 Started")){
  2046. keybindsEnabled:= 0
  2047. }
  2048. if(InStr(chat0, customOverlayTrigger)) {
  2049. timeCustomOverlay:= customOverlayTime
  2050. }
  2051. if(InStr(chat0, "SERVER: Willkommen ")){
  2052. keybindsEnabled:= 1
  2053. AddChatMessage("Der {71176B}Binder {FFFFFF}Binder wurde {00FF00}aktiviert")
  2054. handleHotkey("JOIN_COMMAND")
  2055. }
  2056. if(RegStr(chat0, "sup boryaa12123: ")) {
  2057. if(sendGangGang == 0)
  2058. return
  2059. Sleep, 100
  2060. }
  2061. }
  2062. if(RegStr(chat0, "ERFOLGREICH: Die Nachricht wurde gesendet.")){
  2063. keybindsEnabled:= 1
  2064. }
  2065. if(RegStr(chat0, "Zum entfernen der Parkkralle kannst du /gpayticket eingeben")){
  2066. if(homeRankFour.isChecked() == 0)
  2067. return
  2068. SendChat("/glfcar")
  2069. Sleep, 200
  2070. if(homeAutoTicket.isChecked() == 0)
  2071. return
  2072. SendChat("/gpayticket")
  2073. Sleep, 200
  2074. SendChat("/cveh motor")
  2075. }
  2076. if(RegStr(chat0, "Momentanes Wantedlevel: ") and InStr(chat0, "| Wantedpunkte: ")){
  2077. if(homeAutoWP.isChecked() == 0)
  2078. return
  2079. GetChatLine(1, chat11)
  2080. if(InStr(chat11, "Du hast ein Verbrechen begangen")){
  2081. after:= StrSplit(chat11, "(", " ")
  2082. reasonFiltered:= StrSplit(after[2], ")", " ")
  2083. reason:= reasonFiltered[1]
  2084. } else {
  2085. reason:= -1
  2086. }
  2087. parts:= StrSplit(SubStr(chat0, 11), "|")
  2088. RegExMatch(parts[1], "\d+", number1)
  2089. RegExMatch(parts[2], "\d+", number2)
  2090. if(reason == -1){
  2091. SendChat("/f Wantedpunkte: " number2)
  2092. } else {
  2093. SendChat("/f Wantedpunkte: " number2 " | Grund: " reason)
  2094. }
  2095. }
  2096. autonomousCount:= autonomousKeys.MaxIndex()
  2097. if(autonomousCount) {
  2098. Loop, %autonomousCount% {
  2099. if(InStr(chat0, autonomousKeys[A_Index])){
  2100. handleHotkey(1, autonomousValues[A_Index])
  2101. }
  2102. }
  2103. }
  2104. }
  2105. processCustomCommand() {
  2106. global
  2107. if(!WinActive("ahk_exe gta_sa.exe")){
  2108. return
  2109. }
  2110. thisBind:= automaticCommandCommand
  2111. if(InStr(thisBind, "[Var]")){
  2112. StringReplace, thisBind, thisBind, [Var], [Var], UseErrorLevel
  2113. occurences:= ErrorLevel
  2114. Loop, %occurences% {
  2115. userInput:= playerInputText("Variable " A_Index ": ")
  2116. StringReplace, thisBind, thisBind, [Var], %userInput%
  2117. Sleep, 50
  2118. }
  2119. Sleep, 100
  2120. }
  2121. if(InStr(thisBind, "~") == 0) {
  2122. StringLower, thisBindLower, thisBind
  2123. if(thisBindLower == "/dl")
  2124. SendInput, {t}{/}{d}{l}{enter}
  2125. else if(hasValue(customCommands, thisBindLower)) {
  2126. SendLevel 1
  2127. SendEvent, t
  2128. SendLevel 0
  2129. Loop, Parse, thisBindLower
  2130. {
  2131. character:= A_LoopField
  2132. SendLevel 1
  2133. if(hasValue(activeHotkeys, character)){
  2134. Hotkey, *%character%, off
  2135. }
  2136. SendEvent, %character%
  2137. SendLevel 0
  2138. if(hasValue(activeHotkeys, character)){
  2139. Hotkey, *%character%, on
  2140. }
  2141. }
  2142. SendLevel 1
  2143. SendEvent, {enter}
  2144. SendLevel 0
  2145. } else {
  2146. if(InStr(thisBind, "[InputMode]") == 0) {
  2147. SendChat(thisBind)
  2148. } else {
  2149. Sleep, 200
  2150. SendInput, StrReplace(thisBind, "[InputMode]")
  2151. }
  2152. }
  2153. } else {
  2154. commandSplit:= StrSplit(thisBind, "~", " ")
  2155. For, index, value in commandSplit {
  2156. if(RegExMatch(value, "\[Wait (\d*?)\]", wait)){
  2157. thisCommand:= StrReplace(value, wait)
  2158. waitTime:= StrReplace(value, "[Wait ")
  2159. waitTime:= StrReplace(waitTime, "]")
  2160. Sleep, %waitTime%
  2161. StringLower, thisCommandLower, thisCommand
  2162. if(thisCommandLower == "/dl")
  2163. SendInput, {t}{/}{d}{l}{enter}
  2164. else if(hasValue(customCommands, thisCommandLower)) {
  2165. SendLevel 1
  2166. SendEvent, t
  2167. SendLevel 0
  2168. Loop, Parse, thisCommandLower
  2169. {
  2170. character:= A_LoopField
  2171. SendLevel 1
  2172. if(hasValue(activeHotkeys, character)){
  2173. Hotkey, *%character%, off
  2174. }
  2175. SendEvent, %character%
  2176. SendLevel 0
  2177. if(hasValue(activeHotkeys, character)){
  2178. Hotkey, *%character%, on
  2179. }
  2180. }
  2181. SendLevel 1
  2182. SendEvent, {enter}
  2183. SendLevel 0
  2184. } else {
  2185. if(InStr(thisCommand, "[InputMode]") == 0) {
  2186. SendChat(thisCommand)
  2187. } else {
  2188. Sleep, 200
  2189. command:= StrReplace(thisCommand, "[InputMode]")
  2190. SendInput, %command%
  2191. }
  2192. }
  2193. } else {
  2194. StringLower, valueLower, value
  2195. if(valueLower == "/dl")
  2196. SendInput, {t}{/}{d}{l}{enter}
  2197. else if(hasValue(customCommands, valueLower)) {
  2198. SendLevel 1
  2199. SendEvent, t
  2200. SendLevel 0
  2201. Loop, Parse, valueLower
  2202. {
  2203. character:= A_LoopField
  2204. SendLevel 1
  2205. if(hasValue(activeHotkeys, character)){
  2206. Hotkey, *%character%, off
  2207. }
  2208. SendEvent, %character%
  2209. SendLevel 0
  2210. if(hasValue(activeHotkeys, character)){
  2211. Hotkey, *%character%, on
  2212. }
  2213. }
  2214. SendLevel 1
  2215. SendEvent, {enter}
  2216. SendLevel 0
  2217. } else {
  2218. if(InStr(value, "[InputMode]") == 0) {
  2219. SendChat(value)
  2220. } else {
  2221. Sleep, 200
  2222. command:= StrReplace(value, "[InputMode]")
  2223. SendInput, %command%
  2224. }
  2225. }
  2226. }
  2227. }
  2228. }
  2229. }
  2230. checkNewDay() {
  2231. global
  2232. if(killsDay == A_YDay)
  2233. return
  2234. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Es ist ein neuer Tag! Deine Tagesstats wurden resetted.")
  2235. killsDay:= A_YDay
  2236. killsDailyKills:= 0
  2237. killsDailyDeaths:= 0
  2238. saveINI(2)
  2239. }
  2240. checkSprayMessage() {
  2241. global
  2242. if(sendGangGang == 0)
  2243. return
  2244. if(A_Min != 45) {
  2245. sprayMessageSent:= 0
  2246. return
  2247. }
  2248. if(sprayMessageSent == 1) {
  2249. return
  2250. }
  2251. if(A_Min == 45){
  2252. sprayMessageSent:= 1
  2253. AddChatMessage("{" textColor "}[Binder] {FFFFFF}OB8! Es ist {0099FF}" A_Hour ":" A_Min "{FFFFFF}! Bitte die Sprays machen!")
  2254. }
  2255. }
  2256. checkPlantMessage() {
  2257. global
  2258. if(A_Min != 10){
  2259. plantMessageSent:= 0
  2260. return
  2261. }
  2262. if(plantMessageSent == 1) {
  2263. return
  2264. }
  2265. if(A_Min == 10){
  2266. plantMessageSent:= 1
  2267. GuiControlGet, Username,, LoginUser
  2268. GuiControlGet, Password,, LoginPass
  2269. r:= WinHTTPRequest("https://finn.ovh/binder2/plantmessage.php?user=" Username "&pass=" Password, response)
  2270. if(r != -1){
  2271. AddChatMessage("{" textColor "}[Binder] {FF0000}Es ist ein Fehler beim Abrufen der Plantagen aufgetreten.")
  2272. Sleep, 20
  2273. AddChatMessage("{404040}------------------------------")
  2274. return
  2275. }
  2276. if(response == "NOPE"){
  2277. return
  2278. }
  2279. if(response == "EMPTY"){
  2280. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Warum zum Fick liegen keine Plants? Kack nns.")
  2281. return
  2282. }
  2283. AddChatMessage("{404040}------------------------------")
  2284. Sleep, 40
  2285. infoSplit:= StrSplit(response, "|||")
  2286. For, index, value in infoSplit {
  2287. thisInfo:= StrSplit(value, "||")
  2288. plantType:= thisInfo[1] == 0 ? "{29A329}Green" : "{E6E600}Gold"
  2289. AddChatMessage(plantType " {404040}>> {0099FF}Reif in: {FFFFFF}" thisInfo[3] " Stunden {404040}| {0099FF}Von: {FFFFFF}" thisInfo[2])
  2290. Sleep, 200
  2291. }
  2292. AddChatMessage("{404040}------------------------------")
  2293. }
  2294. }
  2295. login() {
  2296. global
  2297. GuiControlGet, Username,, LoginUser
  2298. GuiControlGet, Password,, LoginPass
  2299. hwid:= "abc"
  2300. if(Username == "" or Password == "" or loginRunning == 1)
  2301. return
  2302. loginRunning:= 1
  2303. r:= WinHTTPRequest("https://finn.ovh/binder2/binderlogin.php?name=" Username "&pass=" Password "&hwid=" hwid, response)
  2304. loginRunning:= 0
  2305. if(r != -1){
  2306. MsgBox, Es ist ein Fehler beim Login aufgetreten.
  2307. return
  2308. }
  2309. if(response == "NOPE"){
  2310. MsgBox, 16, Binder ~ Login, Login fehlgeschlagen.,
  2311. return
  2312. }
  2313. playerName:= Username
  2314. apiKey:= response
  2315. if(loginRememberMe.isChecked() == 1){
  2316. IniWrite, %Username%, %A_WorkingDir%\PurpleIceSettings.ini, Login, RememberMe
  2317. } else {
  2318. IniWrite, 0, %A_WorkingDir%\PurpleIceSettings.ini, Login, RememberMe
  2319. }
  2320. }
  2321. changeOverlayColor(overlayName) {
  2322. CmnDlg_Color(color, hgui)
  2323. RegExMatch(color, "0x(.*)",color)
  2324. if(color == "" or color == 0)
  2325. color = "0099FF"
  2326. if(overlayName == "cardl"){
  2327. overlayCardlColor:= SubStr(color, 3)
  2328. GuiControl, +c%color%, OverlaysCardlColor
  2329. GuiControl, Hide, OverlaysCardlColor
  2330. GuiControl, Show, OverlaysCardlColor
  2331. }
  2332. if(overlayName == "lsd"){
  2333. overlayLSDColor:= SubStr(color, 3)
  2334. GuiControl, +c%color%, OverlaysLSDColor
  2335. GuiControl, Hide, OverlaysLSDColor
  2336. GuiControl, Show, OverlaysLSDColor
  2337. }
  2338. if(overlayName == "gold"){
  2339. overlayGoldColor:= SubStr(color, 3)
  2340. GuiControl, +c%color%, OverlaysGoldColor
  2341. GuiControl, Hide, OverlaysGoldColor
  2342. GuiControl, Show, OverlaysGoldColor
  2343. }
  2344. if(overlayName == "custom"){
  2345. overlayCustomColor:= SubStr(color, 3)
  2346. GuiControl, +c%color%, OverlaysCustomColor
  2347. GuiControl, Hide, OverlaysCustomColor
  2348. GuiControl, Show, OverlaysCustomColor
  2349. }
  2350. return
  2351. }
  2352. changeOverlayPosition(x, y){
  2353. if(overlayEditMode == 0)
  2354. return
  2355. overlayEditX:= overlayEditX + x
  2356. overlayEditY:= overlayEditY + y
  2357. if(overlayEditWhich == "cardl"){
  2358. TextSetPos(overlayCardl, overlayEditX, overlayEditY)
  2359. }
  2360. if(overlayEditWhich == "lsd"){
  2361. TextSetPos(overlayLSD, overlayEditX, overlayEditY)
  2362. }
  2363. if(overlayEditWhich == "gold"){
  2364. TextSetPos(overlayGold, overlayEditX, overlayEditY)
  2365. }
  2366. if(overlayEditWhich == "custom"){
  2367. TextSetPos(overlayCustom, overlayEditX, overlayEditY)
  2368. }
  2369. return
  2370. }
  2371. initOverlays() {
  2372. global
  2373. DestroyAllVisual()
  2374. overlayCardl:= -1
  2375. if(overlaysCheckCardl.isChecked() == 1 or (overlayEditMode == 1 and overlayEditWhich == "cardl")) {
  2376. overlayCardl:= TextCreate(overlayCardlFont, overlayCardlSize, 1, 0, overlayCardlX, overlayCardlY, 0xFF "" overlayCardlColor, "DL: Loading..", 1, 1)
  2377. }
  2378. overlayLSD:= -1
  2379. if(overlaysCheckLSD.isChecked() == 1 or (overlayEditMode == 1 and overlayEditWhich == "lsd")) {
  2380. overlayLSD:= TextCreate(overlayLSDFont, overlayLSDSize, 1, 0, overlayLSDX, overlayLSDY, 0xFF "" overlayLSDColor, "LSD: Loading..", 1, 1)
  2381. }
  2382. overlayGold:= -1
  2383. if(overlaysCheckGold.isChecked() == 1 or (overlayEditMode == 1 and overlayEditWhich == "gold")) {
  2384. overlayGold:= TextCreate(overlayGoldFont, overlayGoldSize, 1, 0, overlayGoldX, overlayGoldY, 0xFF "" overlayGoldColor, "Gold: Loading..", 1, 1)
  2385. }
  2386. overlayCustom:= -1
  2387. if(overlaysCheckCustom.isChecked() == 1 or (overlayEditMode == 1 and overlayEditWhich == "custom")) {
  2388. overlayCustom:= TextCreate(overlayCustomFont, overlayCustomSize, 1, 0, overlayCustomX, overlayCustomY, 0xFF "" overlayCustomColor, "Custom: Loading..", 1, 1)
  2389. }
  2390. return
  2391. }
  2392. updateOverlays() {
  2393. global
  2394. if(!WinExist("ahk_exe gta_sa.exe")){
  2395. DestroyAllVisual()
  2396. overlayCardl := -1
  2397. return
  2398. }
  2399. if(overlaysCheckCardl.isChecked() == 1 or overlayEditMode == 1) {
  2400. if(overlayCardl == -1){
  2401. initOverlays()
  2402. return
  2403. }
  2404. dl:= GetVehicleHealth()
  2405. if(dl < 0 and overlayEditMode != 1){
  2406. TextSetShown(overlayCardl, false)
  2407. } else {
  2408. TextSetShown(overlayCardl, true)
  2409. TextSetString(overlayCardl, "DL: " floorDecimal(GetVehicleHealth(), 2))
  2410. }
  2411. }
  2412. if(overlaysCheckLSD.isChecked() == 1 or overlayEditMode == 1) {
  2413. if(overlayLSD == -1){
  2414. initOverlays()
  2415. return
  2416. }
  2417. if(timeLSD < 1 and overlayEditMode != 1){
  2418. TextSetShown(overlayLSD, false)
  2419. } else {
  2420. TextSetShown(overlayLSD, true)
  2421. TextSetString(overlayLSD, "LSD: " timeLSD)
  2422. }
  2423. }
  2424. if(overlaysCheckGold.isChecked() == 1 or overlayEditMode == 1) {
  2425. if(overlayGold == -1){
  2426. initOverlays()
  2427. return
  2428. }
  2429. if(timeGold < 1 and overlayEditMode != 1){
  2430. TextSetShown(overlayGold, false)
  2431. } else {
  2432. TextSetShown(overlayGold, true)
  2433. TextSetString(overlayGold, "Gold: " timeGold)
  2434. }
  2435. }
  2436. if(overlaysCheckCustom.isChecked() == 1 or overlayEditMode == 1) {
  2437. if(overlayCustom == -1){
  2438. initOverlays()
  2439. return
  2440. }
  2441. if(timeCustomOverlay < 1 and overlayEditMode != 1){
  2442. TextSetShown(overlayCustom, false)
  2443. } else {
  2444. TextSetShown(overlayCustom, true)
  2445. TextSetString(overlayCustom, customOverlayText ": " timeCustomOverlay)
  2446. }
  2447. }
  2448. return
  2449. }
  2450. removeOverlays() {
  2451. if(overlayCardl != -1)
  2452. TextDestroy(overlayCardl)
  2453. if(overlayLSD != -1)
  2454. TextDestroy(overlayLSD)
  2455. if(overlayGold != -1)
  2456. TextDestroy(overlayGold)
  2457. if(overlayCustom != -1)
  2458. TextDestroy(overCustom)
  2459. return
  2460. }
  2461. doAutoSound() {
  2462. global
  2463. nowHP:= GetPlayerHealth()
  2464. nowAM:= GetPlayerArmor()
  2465. sumDif:= (lastHP - nowHP) + (lastAM - nowAM)
  2466. if(sumDif >= 5) {
  2467. PlaySound(hitSound)
  2468. }
  2469. lastHP:= nowHP
  2470. lastAM:= nowAM
  2471. return
  2472. }
  2473. doAutoDriveby() {
  2474. global
  2475. if(drivebyAlreadySet and IsPlayerInAnyVehicle() == 0){
  2476. drivebyAlreadySet:= 0
  2477. return
  2478. }
  2479. if(IsPlayerPassenger() and drivebyAlreadySet == 0){
  2480. drivebyAlreadySet:= 1
  2481. Sleep, 100
  2482. SendChat("/swapgun")
  2483. Sleep, 200
  2484. if(homeMFourOverAK.isChecked() == 1) {
  2485. SendInput, {down 2}{enter}
  2486. } else {
  2487. if(homePremiumAccount.isChecked() == 1 and homeAkAvailable.isChecked() == 1) {
  2488. SendInput, {down 3}{enter}
  2489. } else {
  2490. SendInput, {down}{enter}
  2491. }
  2492. }
  2493. }
  2494. return
  2495. }
  2496. doAutoEngine() {
  2497. global
  2498. if(engineAlreadySet and IsPlayerInAnyVehicle() == 0){
  2499. engineAlreadySet:= 0
  2500. return
  2501. }
  2502. if(IsPlayerDriver() and engineAlreadySet == 0 and IsVehicleEngineEnabled() == 0){
  2503. engineAlreadySet:= 1
  2504. Sleep, 100
  2505. SendChat("/cveh motor")
  2506. } else if(IsPlayerDriver() and engineAlreadySet == 0 and IsVehicleEngineEnabled() == 1)
  2507. engineAlreadySet:= 1
  2508. return
  2509. }
  2510. doAutoLicht() {
  2511. global
  2512. if(lichtAlreadySet and IsPlayerInAnyVehicle() == 0){
  2513. lichtAlreadySet:= 0
  2514. return
  2515. }
  2516. if(IsPlayerDriver() and lichtAlreadySet == 0 and IsVehicleLightEnabled() == 0 and (A_Hour >= 21 or A_Hour <= 6)){
  2517. lichtAlreadySet:= 1
  2518. Sleep, 100
  2519. SendChat("/cveh licht")
  2520. } else if(IsPlayerDriver() and lichtAlreadySet == 0 and IsVehicleLightEnabled() == 1)
  2521. lichtAlreadySet:= 1
  2522. return
  2523. }
  2524. hasValue(haystack, needle) {
  2525. if(!isObject(haystack))
  2526. return false
  2527. if(haystack.Length()==0)
  2528. return false
  2529. for k,v in haystack
  2530. if(v==needle)
  2531. return true
  2532. return false
  2533. }
  2534. GetChatLineCount(){
  2535. global chatlogpath
  2536. FileRead, file, %chatlogpath%
  2537. StringReplace, file, file, `n, `n, UseErrorLevel
  2538. return ErrorLevel
  2539. }
  2540. GetChatLine(Line, ByRef Output, timestamp=0, color=0){
  2541. chatindex := 0
  2542. FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  2543. loop, Parse, file, `n, `r
  2544. {
  2545. if(A_LoopField)
  2546. chatindex := A_Index
  2547. }
  2548. loop, Parse, file, `n, `r
  2549. {
  2550. if(A_Index = chatindex - line){
  2551. output := A_LoopField
  2552. break
  2553. }
  2554. }
  2555. file := ""
  2556. if(!timestamp)
  2557. output := RegExReplace(output, "U)^[\d{2}:\d{2}:\d{2}]")
  2558. if(!color)
  2559. output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
  2560. return
  2561. }
  2562. random(min, max){
  2563. Random, outputRandom, %min%, %max%
  2564. return %outputRandom%
  2565. }
  2566. floorDecimal(num,dec) {
  2567. return RegExReplace(num,"(?<=\.\d{" dec "}).*$")
  2568. }
  2569. playerInputText(text) {
  2570. s := A_IsSuspended
  2571. Suspend On
  2572. KeyWait Enter
  2573. SendInput t^a{backspace}%text%
  2574. Input, var, v, {enter}
  2575. SendInput ^a{backspace 100}{enter}
  2576. Sleep, 20
  2577. if(!s)
  2578. Suspend Off
  2579. return var
  2580. }
  2581. playerInput(text, requireNumber:=0) {
  2582. AddChatMessage("{71176B}[Input] {FFFFFF}Akzeptieren mit {0099FF}[ENTER]{FFFFFF}, abbrechen mit {0099FF}[ESC]")
  2583. dialogID:= dialogID + 1
  2584. ShowDialog(dialogID, 1, "{" textColor "}[Binder] {FFFFFF}" text ":", "", "", "")
  2585. Input, value, V, {enter}{esc},
  2586. if(InStr(ErrorLevel, "Escape"))
  2587. return "-1"
  2588. if(requireNumber == 1 and (value is number))
  2589. return value
  2590. else
  2591. return "NaN"
  2592. }
  2593. CmnDlg_Color(ByRef pColor, hGui=0){
  2594. clr := ((pColor & 0xFF) << 16) + (pColor & 0xFF00) + ((pColor >> 16) & 0xFF)
  2595. VarSetCapacity(sCHOOSECOLOR, 0x24, 0)
  2596. VarSetCapacity(aChooseColor, 64, 0)
  2597. NumPut(0x24, sCHOOSECOLOR, 0)
  2598. NumPut(hGui, sCHOOSECOLOR, 4)
  2599. NumPut(clr, sCHOOSECOLOR, 12)
  2600. NumPut(&aChooseColor,sCHOOSECOLOR, 16)
  2601. NumPut(0x00000103, sCHOOSECOLOR, 20)
  2602. nRC := DllCall("comdlg32\ChooseColorA", str, sCHOOSECOLOR)
  2603. if (errorlevel <> 0) || (nRC = 0)
  2604. return false
  2605. clr := NumGet(sCHOOSECOLOR, 12)
  2606. oldFormat := A_FormatInteger
  2607. SetFormat, integer, hex
  2608. pColor := (clr & 0xff00) + ((clr & 0xff0000) >> 16) + ((clr & 0xff) << 16)
  2609. StringTrimLeft, pColor, pColor, 2
  2610. loop, % 6-strlen(pColor)
  2611. pColor=0%pColor%
  2612. pColor=0x%pColor%
  2613. SetFormat, integer, %oldFormat%
  2614. return true
  2615. }
  2616. checkNewVersion(){
  2617. global
  2618. r:= WinHTTPRequest("https://finn.ovh/binder2/version.txt", newestVersion)
  2619. if(r != -1){
  2620. MsgBox, Es ist ein Fehler beim Update-Check aufgetreten.
  2621. return
  2622. }
  2623. if(newestVersion != version){
  2624. GuiControl,, LoadingText, Update...
  2625. Sleep, 2000
  2626. URLDownloadToFile, http://finn.ovh/binder2/PIB.exe, %A_ScriptName%.new
  2627. BatchFile=
  2628. (
  2629. Ping 127.0.0.1
  2630. Del "%A_ScriptName%"
  2631. Rename "%A_ScriptName%.new" "%A_ScriptName%"
  2632. cd "%A_WorkingDir%"
  2633. "%A_ScriptName%"
  2634. Echo Fertig!
  2635. )
  2636. FileDelete, updater.bat
  2637. FileAppend, %BatchFile%, updater.bat
  2638. Run *RunAs updater.bat
  2639. ExitApp
  2640. return
  2641. }
  2642. if(!FileExist("bin/Open-SAMP-API.dll")){
  2643. URLDownloadToFile, http://finn.ovh/binder2/Open-SAMP-API.dll, bin/Open-SAMP-API.dll
  2644. MsgBox, Die neue API wurde heruntergeladen. Bitte den Binder neustarten!
  2645. ExitApp
  2646. }
  2647. if(!FileExist("img/hitsound.wav")){
  2648. URLDownloadToFile, http://finn.ovh/binder2/hitsound.wav, img/hitsound.wav
  2649. MsgBox, Der Standard-Hitsound wurde heruntergeladen. Bitte den Binder neustarten!
  2650. ExitApp
  2651. }
  2652. }
  2653. downloadStrings() {
  2654. global
  2655. r:= WinHTTPRequest("https://finn.ovh/binder2/strings.php", stringSet)
  2656. if(r != -1){
  2657. MsgBox, Es ist ein Fehler beim Herunterladen der benutzerdefinierten Trigger-Nachrichten aufgetreten.
  2658. return
  2659. }
  2660. stringSetValues:= StrSplit(stringSet, "|||")
  2661. valueFound:= 0
  2662. For, index, element in stringSetValues {
  2663. thisValues:= StrSplit(element, "||")
  2664. if(!hasValue(messagesValues, thisValues[2]) and messagesValues.MaxIndex() > 1)
  2665. valueFound:= 1
  2666. }
  2667. oldLength:= messagesKeys.MaxIndex()
  2668. messagesKeys:= []
  2669. messagesValues:= []
  2670. For, index, element in stringSetValues {
  2671. thisValues:= StrSplit(element, "||")
  2672. messagesKeys.Push(thisValues[1])
  2673. messagesValues.Push(thisValues[2])
  2674. }
  2675. if(loggedIn == 1) {
  2676. if(valueFound == 1 or oldLength != messagesValues.MaxIndex()){
  2677. AddChatMessage("{" textColor "}[BinderRemote] {FFFFFF}Es wurden {00FF00}neue {FFFFFF}Nachrichten gefunden.")
  2678. } else {
  2679. AddChatMessage("{" textColor "}[BinderRemote] {FFFFFF}Es wurden {FF0000}keine {FFFFFF}neuen Nachrichten gefunden.")
  2680. }
  2681. }
  2682. return
  2683. }
  2684. CalcAddrHash(addr, length, algid, byref hash = 0, byref hashlength = 0)
  2685. {
  2686. static h := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f"]
  2687. static b := h.minIndex()
  2688. hProv := hHash := o := ""
  2689. if (DllCall("advapi32\CryptAcquireContext", "Ptr*", hProv, "Ptr", 0, "Ptr", 0, "UInt", 24, "UInt", 0xf0000000))
  2690. {
  2691. if (DllCall("advapi32\CryptCreateHash", "Ptr", hProv, "UInt", algid, "UInt", 0, "UInt", 0, "Ptr*", hHash))
  2692. {
  2693. if (DllCall("advapi32\CryptHashData", "Ptr", hHash, "Ptr", addr, "UInt", length, "UInt", 0))
  2694. {
  2695. if (DllCall("advapi32\CryptGetHashParam", "Ptr", hHash, "UInt", 2, "Ptr", 0, "UInt*", hashlength, "UInt", 0))
  2696. {
  2697. VarSetCapacity(hash, hashlength, 0)
  2698. if (DllCall("advapi32\CryptGetHashParam", "Ptr", hHash, "UInt", 2, "Ptr", &hash, "UInt*", hashlength, "UInt", 0))
  2699. {
  2700. loop % hashlength
  2701. {
  2702. v := NumGet(hash, A_Index - 1, "UChar")
  2703. o .= h[(v >> 4) + b] h[(v & 0xf) + b]
  2704. }
  2705. }
  2706. }
  2707. }
  2708. DllCall("advapi32\CryptDestroyHash", "Ptr", hHash)
  2709. }
  2710. DllCall("advapi32\CryptReleaseContext", "Ptr", hProv, "UInt", 0)
  2711. }
  2712. return o
  2713. }
  2714. EnvGet(envname) {
  2715. EnvGet, tempOutput, %envname%
  2716. return tempOutput
  2717. }
  2718. PlayerIsFBI() {
  2719. if(playerName == "SchreibTiscH" or playerName == "Sichelmann")
  2720. return 1
  2721. else
  2722. return 0
  2723. }
  2724. RegStr(String, Needle, Needle2="", Needle3="") {
  2725. StringLower, String, String
  2726. StringLower, Needle, Needle
  2727. StringLower, Needle2, Needle2
  2728. StringLower, Needle3, Needle3
  2729. Pos := RegExMatch(String, "U)^\[\d{2}:\d{2}:\d{2}\].*:.*\Q" . Needle . "\E", output)
  2730. if(output)
  2731. return 0
  2732. if(!Needle2 AND !Needle3) {
  2733. if(InStr(String, Needle))
  2734. return 1
  2735. }
  2736. if(Needle2 AND !Needle3) {
  2737. if(InStr(String, Needle) AND InStr(String, Needle2))
  2738. return 1
  2739. }
  2740. if(Needle2 AND Needle3) {
  2741. if(InStr(String, Needle) AND InStr(String, Needle2) AND InStr(String, Needle3))
  2742. return 1
  2743. }
  2744. return 0
  2745. }
  2746. CalcStringHash(string, algid, encoding = "UTF-8", byref hash = 0, byref hashlength = 0) {
  2747. chrlength := (encoding = "CP1200" || encoding = "UTF-16") ? 2 : 1
  2748. length := (StrPut(string, encoding) - 1) * chrlength
  2749. VarSetCapacity(data, length, 0)
  2750. StrPut(string, &data, floor(length / chrlength), encoding)
  2751. return CalcAddrHash(&data, length, algid, hash, hashlength)
  2752. }
  2753. PlaySound( ByRef Sound ) {
  2754. Return DllCall( "winmm.dll\PlaySound" ( A_IsUnicode ? "W" : "A" ), UInt,&Sound, UInt,0
  2755. , UInt, ((SND_MEMORY:=0x4)|(SND_NODEFAULT:=0x2)) )
  2756. }
  2757. Class CheckBox {
  2758. __New(x, y, text, callbackName, wherePushElems){
  2759. this.x:= x
  2760. this.y:= y
  2761. this.callbackName:= callbackName
  2762. this.wherePushElems:= wherePushElems
  2763. this.text:= text
  2764. this.checked:= 0
  2765. this.elemName1 := "Element" elementCounter
  2766. elementCounter+=1
  2767. this.elemName2 := "Element" elementCounter
  2768. elementCounter+=1
  2769. this.draw()
  2770. }
  2771. draw(){
  2772. global
  2773. font(16)
  2774. thisX:= this.x
  2775. thisY:= this.y
  2776. textX:= this.x+40
  2777. textY:= this.y+2
  2778. callbackName:= this.callbackName
  2779. elemName1:= this.elemName1
  2780. elemName2:= this.elemName2
  2781. elemText:= this.text
  2782. sectionToPush:= this.wherePushElems
  2783. elements[sectionToPush].Push(elemName1)
  2784. elements[sectionToPush].Push(elemName2)
  2785. if(sectionToPush != "login") {
  2786. Gui, Add, Picture, x%thisX% y%thisY% v%elemName1% g%callbackName% +hidden, img/elements/checkUnchecked.png
  2787. Gui, Add, Text, x%textX% y%textY% cPurple v%elemName2% g%callbackName% +hidden, %elemText%
  2788. } else {
  2789. Gui, Add, Picture, x%thisX% y%thisY% v%elemName1% g%callbackName%, img/elements/checkUnchecked.png
  2790. Gui, Add, Text, x%textX% y%textY% cPurple v%elemName2% g%callbackName%, %elemText%
  2791. }
  2792. }
  2793. updateBox() {
  2794. path:= (this.checked = 0 ? "img/elements/checkUnchecked.png" : "img/elements/checkChecked.png")
  2795. elemName:= this.elemName1
  2796. GuiControl,, %elemName%, %path%
  2797. return
  2798. }
  2799. toggle(){
  2800. if(this.checked > 0)
  2801. this.checked:= 0
  2802. else
  2803. this.checked:= 1
  2804. if(sectionToPush != "login")
  2805. saveINI(1)
  2806. this.updateBox()
  2807. return
  2808. }
  2809. set(newVal){
  2810. if(newVal == "")
  2811. newVal:= 0
  2812. this.checked:= newVal
  2813. this.updateBox()
  2814. return
  2815. }
  2816. isChecked(){
  2817. return this.checked
  2818. }
  2819. }
  2820. Class CreditsElement {
  2821. __New(x, y, img, text, subtext, wherePushElems){
  2822. this.x:= x
  2823. this.y:= y
  2824. this.img:= img
  2825. this.text:= text
  2826. this.subtext:= subtext
  2827. this.wherePushElems:= wherePushElems
  2828. this.elemName1:= "Element" elementCounter
  2829. elementCounter+=1
  2830. this.elemName2:= "Element" elementCounter
  2831. elementCounter+=1
  2832. this.elemName3:= "Element" elementCounter
  2833. elementCounter+=1
  2834. this.draw()
  2835. }
  2836. draw(){
  2837. global
  2838. font(16)
  2839. thisX:= this.x
  2840. thisY:= this.y
  2841. textX:= this.x+220
  2842. textY:= this.y+65
  2843. subtextX:= this.x+280
  2844. subtextY:= this.y+130
  2845. thisImg:= this.img
  2846. elemName1:= this.elemName1
  2847. elemName2:= this.elemName2
  2848. elemName3:= this.elemName3
  2849. thisText:= this.text
  2850. thisSubtext:= this.subtext
  2851. sectionToPush:= this.wherePushElems
  2852. elements[sectionToPush].Push(elemName1)
  2853. elements[sectionToPush].Push(elemName2)
  2854. elements[sectionToPush].Push(elemName3)
  2855. Gui, Add, Picture, x%thisX% y%thisY% v%elemName1% +hidden, %thisImg%
  2856. font(40)
  2857. Gui, Add, Text, x%textX% y%textY% v%elemName2% cPurple +hidden, %thisText%
  2858. font(20)
  2859. Gui, Add, Text, x%subtextX% y%subtextY% v%elemName3% cPurple +hidden, %thisSubtext%
  2860. }
  2861. }
  2862. :?:/debug::
  2863. if(!WinActive("ahk_exe gta_sa.exe")){
  2864. return
  2865. }
  2866. Suspend Permit
  2867. KeyWait, Enter
  2868. Sleep, 20
  2869. Goto, TestFunc
  2870. return
  2871. :?:/setkills::
  2872. if(!WinActive("ahk_exe gta_sa.exe")){
  2873. return
  2874. }
  2875. Suspend Permit
  2876. KeyWait, Enter
  2877. Sleep, 20
  2878. newKills:= playerInputText("Killanzahl: ")
  2879. if(newKills < 0 or newKills == "NaN"){
  2880. AddChatMessage("{" textColor "}[Input] {FFFFFF}Die Zahl muss mindestens 1 betragen.")
  2881. return
  2882. }
  2883. killsGlobalKills:= newKills
  2884. saveINI(2)
  2885. AddChatMessage("{" textColor "}[Input] {FFFFFF}Die Killanzahl wurde auf {0099FF}" newKills " {FFFFFF}gesetzt.")
  2886. return
  2887. :?:/setdeaths::
  2888. if(!WinActive("ahk_exe gta_sa.exe")){
  2889. return
  2890. }
  2891. Suspend Permit
  2892. KeyWait, Enter
  2893. Sleep, 20
  2894. newDeaths:= playerInputText("Todanzahl: ")
  2895. if(newDeaths < 0 or newDeaths == "NaN"){
  2896. AddChatMessage("{" textColor "}[Input] {FFFFFF}Die Zahl muss mindestens 1 betragen.")
  2897. return
  2898. }
  2899. killsGlobalDeaths:= newDeaths
  2900. saveINI(2)
  2901. AddChatMessage("{" textColor "}[Input] {FFFFFF}Die Todanzahl wurde auf {0099FF}" newDeaths " {FFFFFF}gesetzt.")
  2902. return
  2903. :?:/killtest::
  2904. if(!WinActive("ahk_exe gta_sa.exe")){
  2905. return
  2906. }
  2907. Suspend Permit
  2908. KeyWait, Enter
  2909. Sleep, 20
  2910. handleKillbinder()
  2911. return
  2912. :?:/kd::
  2913. if(!WinActive("ahk_exe gta_sa.exe")){
  2914. return
  2915. }
  2916. Suspend Permit
  2917. KeyWait, Enter
  2918. Sleep, 20
  2919. globalDeathsForCalculation:= (killsGlobalDeaths == 0 ? 1 : killsGlobalDeaths)
  2920. dailyDeathsForCalculation:= (killsDailyDeaths == 0 ? 1 : killsDailyDeaths)
  2921. globalKD:= floorDecimal((killsGlobalKills/globalDeathsForCalculation), 2)
  2922. dailyKD:= floorDecimal((killsDailyKills/dailyDeathsForCalculation), 2)
  2923. AddChatMessage("{" textColor "}[AllTime] {0099FF}Kills: {FFFFFF}" killsGlobalKills " {0099FF}Tode: {FFFFFF}" killsGlobalDeaths " {0099FF}K/D: {FFFFFF}" globalKD)
  2924. AddChatMessage("{" textColor "}[Heutige] {0099FF}Kills: {FFFFFF}" killsDailyKills " {0099FF}Tode: {FFFFFF}" killsDailyDeaths " {0099FF}K/D: {FFFFFF}" dailyKD)
  2925. return
  2926. :?:/fkd::
  2927. if(!WinActive("ahk_exe gta_sa.exe")){
  2928. return
  2929. }
  2930. Suspend Permit
  2931. KeyWait, Enter
  2932. Sleep, 20
  2933. dailyDeathsForCalculation:= (killsDailyDeaths == 0 ? 1 : killsDailyDeaths)
  2934. dailyKD:= floorDecimal((killsDailyKills/dailyDeathsForCalculation), 2)
  2935. SendChat("/f Kills: " killsDailyKills " Tode: " killsDailyDeaths " K/D: " dailyKD)
  2936. return
  2937. :?:/vs::
  2938. if(!WinActive("ahk_exe gta_sa.exe")){
  2939. return
  2940. }
  2941. Suspend Permit
  2942. KeyWait, Enter
  2943. Sleep, 20
  2944. GetCityName(cityName, 50)
  2945. GetZoneName(zoneName, 50)
  2946. vehicleString:= ""
  2947. if(IsPlayerInAnyVehicle())
  2948. vehicleString:= "in einem Fahrzeug!"
  2949. else
  2950. if(IsPlayerInInterior())
  2951. vehicleString:= "in einem Interior!"
  2952. else
  2953. vehicleString:= "zu Fuss!"
  2954. chatToSend:= "/f "
  2955. if(PlayerIsFBI() == 1){
  2956. chatToSend:= "/d "
  2957. }
  2958. SendChat(chatToSend "!! VS !!")
  2959. SendChat(chatToSend cityName " - " zoneName " > " vehicleString)
  2960. SendChat(chatToSend GetPlayerHealth() "HP und " GetPlayerArmor() " Armor!")
  2961. return
  2962. :?:/funcinfo::
  2963. if(!WinActive("ahk_exe gta_sa.exe")){
  2964. return
  2965. }
  2966. Suspend Permit
  2967. KeyWait, Enter
  2968. Sleep, 20
  2969. AddChatMessage("{" textColor "}--= Binder - Funktionen =--")
  2970. Sleep, 40
  2971. AddChatMessage("{" textColor "}[Binds] " (keybindsEnabled ? "{00FF00}" : "{FF0000}") "Keybinds")
  2972. Sleep, 40
  2973. AddChatMessage("{" textColor "}[Home] " (homeKillbinderEnabled.isChecked() ? "{00FF00}" : "{FF0000}") "Killbinder")
  2974. Sleep, 40
  2975. AddChatMessage("{" textColor "}[Home] " (homeAutoDriveby.isChecked() ? "{00FF00}" : "{FF0000}") "Automatisch /swapgun")
  2976. Sleep, 40
  2977. AddChatMessage("{" textColor "}[Home] " (homeAutoTicket.isChecked() ? "{00FF00}" : "{FF0000}") "Automatisch /gpayticket")
  2978. Sleep, 40
  2979. AddChatMessage("{" textColor "}[Home] " (homeAutoEngine.isChecked() ? "{00FF00}" : "{FF0000}") "Automatisch Motor einschalten")
  2980. Sleep, 40
  2981. AddChatMessage("{" textColor "}[Home] " (homeAutoLicht.isChecked() ? "{00FF00}" : "{FF0000}") "Automatisch Licht einschalten")
  2982. Sleep, 40
  2983. AddChatMessage("{" textColor "}[Home] " (homeAutoWP.isChecked() ? "{00FF00}" : "{FF0000}") "Automatisch WPs im /f-Chat")
  2984. Sleep, 40
  2985. AddChatMessage("{" textColor "}[Home] " (homeFriedhofCounter.isChecked() ? "{00FF00}" : "{FF0000}") "Friedhofszeit im Chat")
  2986. Sleep, 40
  2987. AddChatMessage("{" textColor "}[Home] " (homeLSDCounter.isChecked() ? "{00FF00}" : "{FF0000}") "LSD-Cooldown im Chat")
  2988. Sleep, 40
  2989. AddChatMessage("{" textColor "}[Overlays] " (overlaysCheckCardl.isChecked() ? "{00FF00}" : "{FF0000}") "CarDL")
  2990. Sleep, 40
  2991. AddChatMessage("{" textColor "}[Overlays] " (overlaysCheckLSD.isChecked() ? "{00FF00}" : "{FF0000}") "LSD Nebenwirkungen")
  2992. Sleep, 40
  2993. AddChatMessage("{" textColor "}[Overlays] " (overlaysCheckGold.isChecked() ? "{00FF00}" : "{FF0000}") "Gold-Use Cooldown")
  2994. Sleep, 40
  2995. AddChatMessage("{" textColor "}[Overlays] " (overlaysCheckCustom.isChecked() ? "{00FF00}" : "{FF0000}") "Custom Cooldown")
  2996. return
  2997. :?:/togkb::
  2998. if(!WinActive("ahk_exe gta_sa.exe")){
  2999. return
  3000. }
  3001. Suspend Permit
  3002. KeyWait, Enter
  3003. Sleep, 20
  3004. homeKillbinderEnabled.toggle()
  3005. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Killbinder " (homeKillbinderEnabled.isChecked() ? "{00FF00}aktiviert" : "{FF0000}deaktiviert"))
  3006. return
  3007. :?:/checkfrak::
  3008. :?:/checkfrakid::
  3009. :?:/checkfrak id::
  3010. if(!WinActive("ahk_exe gta_sa.exe")){
  3011. return
  3012. }
  3013. Suspend Permit
  3014. KeyWait, Enter
  3015. Sleep, 20
  3016. frakID:= -1
  3017. frak:= playerInputText("Fraktionsname: ")
  3018. For, key, value in fraks {
  3019. StringLower, frak, frak
  3020. if(hasValue(value, frak))
  3021. frakID:= key
  3022. }
  3023. if(frakID == -1){
  3024. AddChatMessage("{" textColor "}[Input] {FFFFFF}Dies ist kein valider Fraktionsname!")
  3025. return
  3026. }
  3027. Sleep, 20
  3028. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Lade Daten..")
  3029. Sleep, 40
  3030. r:= WinHTTPRequest("http://pib.pke6.de/binder/checkfrak.php?id=" frakID, html)
  3031. if(r != -1){
  3032. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Kann Webspace nicht erreichen, bitte Finn kontaktieren")
  3033. return
  3034. }
  3035. htmlData:= StrSplit(html, "|||")
  3036. statsCountMembers:= 0
  3037. statsCountOnline:= 0
  3038. For, index, value in htmlData {
  3039. valueData:= StrSplit(value, "||")
  3040. if(valueData[4] != "0" and valueData[4] != "1")
  3041. continue
  3042. statsCountMembers++
  3043. if(valueData[4] != "1")
  3044. continue
  3045. statsCountOnline++
  3046. }
  3047. AddChatMessage("{" textColor "}Daten der Fraktion {" fraks[frakID][2] "}[ " fraks[frakID][1] " ] {FFFFFF}[" statsCountOnline "/" statsCountMembers " online]")
  3048. Sleep, 40
  3049. AddChatMessage("{404040}------------------------------")
  3050. printID:= InStr(SubStr(A_ThisLabel, 14), "id") ? 1 : 0
  3051. For, index, value in htmlData {
  3052. valueData:= StrSplit(value, "||")
  3053. if(valueData[4] != "1")
  3054. continue
  3055. if(printID == 1) {
  3056. SendChat("/id " valueData[1])
  3057. Sleep, 200
  3058. } else {
  3059. RegExMatch(valueData[3], "\(([^)]+)\)", valueRank)
  3060. AddChatMessage(valueData[1] " {808080}[Rang " SubStr(valueRank, 2, 1) "`; Level " valueData[2] "]")
  3061. Sleep, 40
  3062. }
  3063. }
  3064. AddChatMessage("{404040}------------------------------")
  3065. return
  3066. :?:/membersall::
  3067. if(!WinActive("ahk_exe gta_sa.exe")){
  3068. return
  3069. }
  3070. Suspend Permit
  3071. KeyWait, Enter
  3072. Sleep, 20
  3073. frakID:= -1
  3074. frak:= playerInputText("Fraktionsname: ")
  3075. For, key, value in fraks {
  3076. StringLower, frak, frak
  3077. if(hasValue(value, frak))
  3078. frakID:= key
  3079. }
  3080. if(frakID == -1){
  3081. AddChatMessage("{" textColor "}[Input] {FFFFFF}Dies ist kein valider Fraktionsname!")
  3082. return
  3083. }
  3084. Sleep, 40
  3085. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Lade Daten..")
  3086. Sleep, 40
  3087. r:= WinHTTPRequest("http://pib.pke6.de/binder/checkfrak.php?id=" frakID, html)
  3088. if(r != -1){
  3089. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Kann Webspace nicht erreichen, bitte Finn kontaktieren")
  3090. return
  3091. }
  3092. htmlData:= StrSplit(html, "|||")
  3093. statsCountMembers:= 0
  3094. For, index, value in htmlData {
  3095. valueData:= StrSplit(value, "||")
  3096. if(valueData[4] != "0" and valueData[4] != "1")
  3097. continue
  3098. statsCountMembers++
  3099. }
  3100. Sleep, 40
  3101. AddChatMessage("{" textColor "}Daten der Fraktion {" fraks[frakID][2] "}[ " fraks[frakID][1] " ] {FFFFFF}[Mitglieder: " statsCountMembers "]")
  3102. Sleep, 40
  3103. AddChatMessage("{404040}------------------------------")
  3104. For, index, value in htmlData {
  3105. valueData:= StrSplit(value, "||")
  3106. if(valueData[4] != "0" and valueData[4] != "1")
  3107. continue
  3108. RegExMatch(valueData[3], "\(([^)]+)\)", valueRank)
  3109. firstLetter:= SubStr(valueData[1], 1, 1)
  3110. lastLetters:= SubStr(valueData[1], 2)
  3111. AddChatMessage((valueData[4] == 1 ? "{00FF00}" : "{FF0000}") valueData[1] " {808080}[Rang " SubStr(valueRank, 2, 1) "`; Level " valueData[2] "]")
  3112. Sleep, 40
  3113. }
  3114. AddChatMessage("{404040}------------------------------")
  3115. return
  3116. :?:/playerinfo::
  3117. if(!WinActive("ahk_exe gta_sa.exe")){
  3118. return
  3119. }
  3120. Suspend Permit
  3121. KeyWait, Enter
  3122. Sleep, 20
  3123. name:= playerInputText("ID/Name des Spielers: ")
  3124. if name is integer
  3125. {
  3126. GetPlayerNameByID(name, name, 50)
  3127. if(name == ""){
  3128. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Es ist kein Spieler mit dieser ID online.")
  3129. return
  3130. }
  3131. }
  3132. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Lade Daten.. ")
  3133. Sleep, 40
  3134. r:= WinHTTPRequest("http://pib.pke6.de/binder/playerinfo.php?name=" name, html)
  3135. if(r != -1){
  3136. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Webspace kann nicht erreicht werden, bitte Finn kontaktieren")
  3137. return
  3138. }
  3139. if(html == -1 or html == "-1"){
  3140. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Es wurde kein Spieler mit diesem Namen gefunden. (Level 1er?)")
  3141. return
  3142. }
  3143. AddChatMessage("{" textColor "}--= Spieler-Informationen =-- ")
  3144. Sleep, 20
  3145. htmlData:= StrSplit(html, "||")
  3146. AddChatMessage("{0099FF}Name: {FFFFFF}" htmlData[1] " {0099FF}Status: {FFFFFF}" (htmlData[3] == 1 ? "online" : "offline"))
  3147. Sleep, 40
  3148. AddChatMessage("{0099FF}Level: {FFFFFF}" htmlData[2] " {0099FF}Fraktion: {FFFFFF}" htmlData[6] (htmlData[6] != "Zivilisten" ? " [Rang " htmlData[7] "]" : ""))
  3149. Sleep, 40
  3150. AddChatMessage("{0099FF}Alter: {FFFFFF}" htmlData[4] " {0099FF}Handynummer: {FFFFFF}" htmlData[5])
  3151. Sleep, 40
  3152. if(htmlData[8] != "-1" or htmlData[8] != -1)
  3153. AddChatMessage("{0099FF}Partner: {FFFFFF}" htmlData[8])
  3154. SendChat("/id " name)
  3155. return
  3156. :?:/kcall::
  3157. if(!WinActive("ahk_exe gta_sa.exe")){
  3158. return
  3159. }
  3160. Suspend Permit
  3161. KeyWait, Enter
  3162. Sleep, 20
  3163. name:= playerInputText("ID/Name des Spielers: ")
  3164. SendChat("/nummer " name)
  3165. Sleep, 200
  3166. mobile:= "-1"
  3167. Loop, 3 {
  3168. GetChatLine(3-A_Index, chat, 0)
  3169. if(InStr(chat, "Name: ") and InStr(chat, "Ph: ")){
  3170. RegExMatch(chat, "Ph: (.+)", mobile)
  3171. mobile:= SubStr(mobile, 5)
  3172. }
  3173. if(InStr(chat, "Spieler nicht gefunden")){
  3174. mobile:= "-1"
  3175. break
  3176. }
  3177. }
  3178. if(mobile == "-1")
  3179. return
  3180. SendChat("/call")
  3181. Sleep, 200
  3182. Loop, Parse, mobile
  3183. {
  3184. SendInput, {%A_LoopField%}
  3185. }
  3186. SendInput, {enter}
  3187. return
  3188. :?:/ksms::
  3189. if(!WinActive("ahk_exe gta_sa.exe")){
  3190. return
  3191. }
  3192. Suspend Permit
  3193. KeyWait, Enter
  3194. Sleep, 20
  3195. name:= playerInputText("ID/Name des Spielers: ")
  3196. SendChat("/nummer " name)
  3197. Sleep, 200
  3198. mobile:= "-1"
  3199. Loop, 3 {
  3200. GetChatLine(3-A_Index, chat, 0)
  3201. if(InStr(chat, "Name: ") and InStr(chat, "Ph: ")){
  3202. RegExMatch(chat, "Ph: (.+)", mobile)
  3203. mobile:= SubStr(mobile, 5)
  3204. }
  3205. if(InStr(chat, "Spieler nicht gefunden")){
  3206. mobile:= "-1"
  3207. break
  3208. }
  3209. }
  3210. if(mobile == "-1")
  3211. return
  3212. keybindsEnabled:= 0
  3213. SendChat("/sms")
  3214. Sleep, 200
  3215. Loop, Parse, mobile
  3216. {
  3217. SendInput, {%A_LoopField%}
  3218. }
  3219. SendInput, {enter}
  3220. return
  3221. :?:/kbl::
  3222. if(!WinActive("ahk_exe gta_sa.exe")){
  3223. return
  3224. }
  3225. Suspend Permit
  3226. KeyWait, Enter
  3227. Sleep, 20
  3228. SendChat("/bl")
  3229. Sleep, 200
  3230. GetChatLine(0, chat, 0)
  3231. if(InStr(chat, "Blacklist Spieler Online"))
  3232. return
  3233. chat1:= SubStr(chat, 12)
  3234. chat2:= SubStr(chat1, 1, StrLen(chat1)-2)
  3235. bler:= StrSplit(chat2, ",", " ")
  3236. For, index, value in bler {
  3237. SendChat("/id " value)
  3238. Sleep, 150
  3239. }
  3240. return
  3241. :?:/kclearchat::
  3242. if(!WinActive("ahk_exe gta_sa.exe")){
  3243. return
  3244. }
  3245. Suspend Permit
  3246. KeyWait, Enter
  3247. Sleep, 20
  3248. Loop, 25 {
  3249. AddChatMessage(" ")
  3250. Sleep, 20
  3251. }
  3252. return
  3253. :?:/cmds::
  3254. if(!WinActive("ahk_exe gta_sa.exe")){
  3255. return
  3256. }
  3257. Suspend Permit
  3258. KeyWait, Enter
  3259. Sleep, 20
  3260. AddChatMessage("{" textColor "}--= Binder ~ Commands =--")
  3261. Sleep, 20
  3262. AddChatMessage("{404040}------------------------------")
  3263. Sleep, 50
  3264. customCommandsLength:= customCommands.MaxIndex()
  3265. Loop, %customCommandsLength% {
  3266. thisY:= 30 + (40*A_Index)
  3267. command:= customCommands[A_Index]
  3268. desc:= customCommandsDesc[A_Index]
  3269. AddChatMessage("{0099FF}" command " {FFFFFF}-> " desc)
  3270. Sleep, 100
  3271. }
  3272. AddChatMessage("{404040}------------------------------")
  3273. return
  3274. :?:/togflagpos::
  3275. if(!WinActive("ahk_exe gta_sa.exe")){
  3276. return
  3277. }
  3278. Suspend Permit
  3279. KeyWait, Enter
  3280. Sleep, 20
  3281. if(automaticFlagposRunning == 1){
  3282. automaticFlagposRunning:= 0
  3283. SetTimer, AutomaticFlagpos, off
  3284. } else {
  3285. automaticFlagposRunning:= 1
  3286. SetTimer, AutomaticFlagpos, 10500
  3287. SendChat("/getflagpos")
  3288. }
  3289. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Automatisches /getflagpos " (automaticFlagposRunning == 1 ? "{00FF00}aktiviert" : "{FF0000}deaktiviert"))
  3290. return
  3291. :?:/hwithdraw::
  3292. if(!WinActive("ahk_exe gta_sa.exe")){
  3293. return
  3294. }
  3295. Suspend Permit
  3296. KeyWait, Enter
  3297. Sleep, 20
  3298. SendChat("/housewithdraw")
  3299. Sleep, 200
  3300. GetChatLine(0, chat, 0)
  3301. chat0:= SubStr(chat, 10)
  3302. chat00:= StrSplit(chat0, "-")
  3303. if(RegExMatch(chat00[2], "\d+((.|,)\d+)?", houseValue) == 0){
  3304. return
  3305. }
  3306. SendChat("/housewithdraw " StrReplace(houseValue, "."))
  3307. return
  3308. :?:/kame::
  3309. if(!WinActive("ahk_exe gta_sa.exe")){
  3310. return
  3311. }
  3312. Suspend Permit
  3313. KeyWait, Enter
  3314. Sleep, 20
  3315. if(kameMessage != ""){
  3316. kameMessage:= ""
  3317. SetTimer, Kame, Off
  3318. AddChatMessage("{" textColor "}[Binder] {FFFFFF}/kame {FF0000}deaktiviert")
  3319. return
  3320. }
  3321. msg:= playerInputText("Gebe eine Nachricht ein: ")
  3322. kameMessage:= msg
  3323. AddChatMessage("{" textColor "}[Binder] {FFFFFF}/kame {00FF00}aktiviert{FFFFFF}: " kameMessage)
  3324. SendChat("/ame " kameMessage)
  3325. SetTimer, Kame, 15000
  3326. return
  3327. :?:/biz::
  3328. if(!WinActive("ahk_exe gta_sa.exe")){
  3329. return
  3330. }
  3331. Suspend Permit
  3332. KeyWait, Enter
  3333. Sleep, 20
  3334. AddChatMessage("{" textColor "}--= Binder ~ Bizliste =--")
  3335. Sleep, 100
  3336. AddChatMessage("{66B3FF}[9: BSN Tanke] >> {FFFFFF}AP Tanke {404040}|{FFFFFF} LV Stadion {404040}|{FFFFFF} LV Kuh")
  3337. Sleep, 100
  3338. AddChatMessage("{" textColor "}[10: GS Tanke] >> {FFFFFF}Fort Carson {404040}|{FFFFFF} LV Arena {404040}|{FFFFFF} SF Kraftwerk")
  3339. Sleep, 100
  3340. AddChatMessage("{4DFF4D}[11: Truckstop] >> {FFFFFF}Grube Prison {404040}|{FFFFFF} SnowTigers Schuppen {404040}|{FFFFFF} Schuppen SF Tunnel")
  3341. Sleep, 100
  3342. AddChatMessage("{019FFE}[12: Dillimore] >> {FFFFFF}Shady Cabin (AP) {404040}|{FFFFFF} LV Rockhotel {404040}|{FFFFFF} BS Campingplatz")
  3343. Sleep, 100
  3344. AddChatMessage("{333300}[13: SF Bahnhof] >> {FFFFFF}Staudamm {404040}|{FFFFFF} LS Airport (Helis) {404040}|{FFFFFF} OC Friedhof")
  3345. Sleep, 100
  3346. AddChatMessage("{FF99CC}[14: SFPD Tanke] >> {FFFFFF}Alte FBI Base (Parkplatz) {404040}|{FFFFFF} BS Helipad {404040}|{FFFFFF} ehem. KF Base")
  3347. Sleep, 100
  3348. AddChatMessage("{006622}[15: Carshop Tanke] >> {FFFFFF}Toter Flughafen {404040}|{FFFFFF} Fort Carson Steg {404040}|{FFFFFF} Weisses Haus")
  3349. Sleep, 100
  3350. AddChatMessage("{FF6600}[16: Army Tanke] >> {FFFFFF}LCN Hotel {404040}|{FFFFFF} Playa (Steg) {404040}|{FFFFFF} SF Airport Hangar")
  3351. Sleep, 100
  3352. AddChatMessage("{E6E600}[17: AP Tanke] >> {FFFFFF}SF Airport Landebahn {404040}|{FFFFFF} LV Ost (PB) {404040}|{FFFFFF} LV Erzmine")
  3353. Sleep, 100
  3354. AddChatMessage("{1A1AFF}[21: BS Tanke] >> {FFFFFF}SF Baustelle {404040}|{FFFFFF} Farmgebiet (Bergschuppen) {404040}|{FFFFFF} Montgomery Dach")
  3355. Sleep, 100
  3356. AddChatMessage("{404040}------------------------------")
  3357. return
  3358. :?:/bpos::
  3359. if(!WinActive("ahk_exe gta_sa.exe")){
  3360. return
  3361. }
  3362. Suspend Permit
  3363. KeyWait, Enter
  3364. Sleep, 20
  3365. GetPlayerPosition(x,y,z)
  3366. AddChatMessage(x)
  3367. AddChatMessage(y)
  3368. AddChatMessage(z)
  3369. return
  3370. :?:/plantinfo::
  3371. if(!WinActive("ahk_exe gta_sa.exe")){
  3372. return
  3373. }
  3374. Suspend Permit
  3375. KeyWait, Enter
  3376. Sleep, 20
  3377. AddChatMessage("{" textColor "}[Binder] {0099FF}Kontaktiere das CP..")
  3378. GuiControlGet, Username,, LoginUser
  3379. GuiControlGet, Password,, LoginPass
  3380. r:= WinHTTPRequest("https://finn.ovh/binder2/plantinfo.php?user=" Username "&pass=" Password, response)
  3381. if(r != -1){
  3382. AddChatMessage("{" textColor "}[Binder] {FF0000}Es ist ein Fehler beim Download aufgetreten.")
  3383. Sleep, 20
  3384. AddChatMessage("{404040}------------------------------")
  3385. return
  3386. }
  3387. if(response == "NOPE"){
  3388. AddChatMessage("{" textColor "}[Binder] {FF0000}Dein Account ist nicht berechtigt die Plantagen anzuzeigen!")
  3389. Sleep, 20
  3390. AddChatMessage("{404040}------------------------------")
  3391. return
  3392. }
  3393. AddChatMessage("{404040}------------------------------")
  3394. Sleep, 40
  3395. infoSplit:= StrSplit(response, "|||")
  3396. For, index, value in infoSplit {
  3397. thisInfo:= StrSplit(value, "||")
  3398. plantType:= thisInfo[1] == 0 ? "{29A329}Green" : "{E6E600}Gold"
  3399. AddChatMessage(plantType " {404040}>> {0099FF}Reif: {FFFFFF}" thisInfo[3] " {404040}| {0099FF}Von: {FFFFFF}" thisInfo[2])
  3400. Sleep, 500
  3401. }
  3402. AddChatMessage("{404040}------------------------------")
  3403. return
  3404. :?:/showplant::
  3405. if(!WinActive("ahk_exe gta_sa.exe")){
  3406. return
  3407. }
  3408. Suspend Permit
  3409. KeyWait, Enter
  3410. Sleep, 20
  3411. plantID:= playerInputText("Plantagennummer: ")
  3412. if(plantID == "" or plantID < 1 or plantID > 4){
  3413. AddChatMessage("{" textColor "}[Binder] {FF0000}Bitte gebe eine Zahl im Bereich [1-4] ein!")
  3414. return
  3415. }
  3416. AddChatMessage("{" textColor "}[Binder] {0099FF}Kontaktiere das CP..")
  3417. GuiControlGet, Username,, LoginUser
  3418. GuiControlGet, Password,, LoginPass
  3419. r:= WinHTTPRequest("https://finn.ovh/binder2/checkplant.php?user=" Username "&pass=" Password "&id=" plantID, response)
  3420. if(r != -1){
  3421. AddChatMessage("{" textColor "}[Binder] {FF0000}Es ist ein Fehler beim Download aufgetreten.")
  3422. Sleep, 20
  3423. AddChatMessage("{404040}------------------------------")
  3424. return
  3425. }
  3426. if(response == "NOPE"){
  3427. AddChatMessage("{" textColor "}[Binder] {FF0000}Dein Account ist nicht berechtigt die Plantagen anzuzeigen!")
  3428. Sleep, 20
  3429. AddChatMessage("{404040}------------------------------")
  3430. return
  3431. }
  3432. if(response == "NO_PLANT"){
  3433. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Es liegt keine {FF0000}" plantID ". {FFFFFF}Plantage!")
  3434. Sleep, 20
  3435. AddChatMessage("{404040}------------------------------")
  3436. return
  3437. }
  3438. thisInfo:= StrSplit(response, "||")
  3439. plantType:= thisInfo[1] == 0 ? "{29A329}Green" : "{E6E600}Gold"
  3440. AddChatMessage(plantType " {404040}>> {0099FF}Reif: {FFFFFF}" thisInfo[3] " {404040}| {0099FF}Von: {FFFFFF}" thisInfo[2])
  3441. Sleep, 200
  3442. AddChatMessage("{404040}------------------------------")
  3443. if(FileExist("temp.png") != ""){
  3444. FileDelete, temp.png
  3445. }
  3446. URLDownloadToFile, http://finn.ovh/binder2/plantimage.php?id=%plantID%&user=%Username%&pass=%Password%, temp.png
  3447. if(overlayPlantImage != -1){
  3448. ImageDestroy(overlayPlantImage)
  3449. overlayPlantImage:= -1
  3450. }
  3451. overlayPlantImage:= ImageCreate("temp.png", 400, 40, 0, 1, 1)
  3452. Sleep, 7000
  3453. ImageDestroy(overlayPlantImage)
  3454. overlayPlantImage:= -1
  3455. FileDelete, temp.png
  3456. return
  3457. :?:/showtextbinds::
  3458. if(!WinActive("ahk_exe gta_sa.exe")){
  3459. return
  3460. }
  3461. Suspend Permit
  3462. KeyWait, Enter
  3463. Sleep, 20
  3464. AddChatMessage("{" textColor "}--= Binder Binder - Textbinds =--")
  3465. Sleep, 40
  3466. textbindsCount:= textbindsKeys.MaxIndex()
  3467. if(!textbindsCount) {
  3468. return
  3469. }
  3470. Loop, %textbindsCount% {
  3471. AddChatMessage("{0099FF}" textbindsKeys[A_Index] " {FFFFFF}-> " textbindsValues[A_Index])
  3472. }
  3473. return
  3474. :?:/moveoverlay::
  3475. Suspend Permit
  3476. KeyWait, Enter
  3477. Sleep, 20
  3478. AddChatMessage("{" textColor "}[Binder] {0099FF}/movecardl {FFFFFF}-> CarDL verschieben")
  3479. Sleep, 40
  3480. AddChatMessage("{" textColor "}[Binder] {0099FF}/movelsd {FFFFFF}-> LSD Nebenwirkungen verschieben")
  3481. Sleep, 40
  3482. AddChatMessage("{" textColor "}[Binder] {0099FF}/movegold {FFFFFF}-> Gold-Use Cooldown verschieben")
  3483. Sleep, 40
  3484. AddChatMessage("{" textColor "}[Binder] {0099FF}/movecustom {FFFFFF}-> Custom Cooldown verschieben")
  3485. return
  3486. :?:/movecardl::
  3487. :?:/movelsd::
  3488. :?:/movegold::
  3489. :?:/movecustom::
  3490. if(!WinActive("ahk_exe gta_sa.exe")){
  3491. return
  3492. }
  3493. Suspend Permit
  3494. KeyWait, Enter
  3495. Sleep, 20
  3496. if(overlayEditMode == 1){
  3497. AddChatMessage("{" textColor "}[Binder] {FF0000}Du verschiebst bereits ein Overlay!")
  3498. return
  3499. }
  3500. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Nutze {0099FF}[ENTER] {FFFFFF}um die neue Position zu speichern.")
  3501. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Nutze {0099FF}[SHIFT] {FFFFFF}um es schneller zu bewegen.")
  3502. overlayEditWhich:= SubStr(A_ThisLabel, 9)
  3503. if(overlayEditWhich == "cardl") {
  3504. overlayEditX:= overlayCardlX
  3505. overlayEditY:= overlayCardlY
  3506. }
  3507. if(overlayEditWhich == "lsd") {
  3508. overlayEditX:= overlayLSDX
  3509. overlayEditY:= overlayLSDY
  3510. }
  3511. if(overlayEditWhich == "gold") {
  3512. overlayEditX:= overlayGoldX
  3513. overlayEditY:= overlayGoldY
  3514. }
  3515. if(overlayEditWhich == "custom") {
  3516. overlayEditX:= overlayCustomX
  3517. overlayEditY:= overlayCustomY
  3518. }
  3519. overlayEditMode:= 1
  3520. initOverlays()
  3521. return
  3522. :?:/timer::
  3523. if(!WinActive("ahk_exe gta_sa.exe")){
  3524. return
  3525. }
  3526. Suspend Permit
  3527. KeyWait, Enter
  3528. Sleep, 20
  3529. AddChatMessage("{" textColor "}[Binder] {0099FF}/timer toggle {FFFFFF}-> Timer starten/stoppen")
  3530. Sleep, 40
  3531. AddChatMessage("{" textColor "}[Binder] {0099FF}/timer command {FFFFFF}-> Command einstellen")
  3532. Sleep, 40
  3533. AddChatMessage("{" textColor "}[Binder] {0099FF}/timer interval {FFFFFF}-> Intervall einstellen")
  3534. Sleep, 40
  3535. AddChatMessage("{404040}------------------------------")
  3536. Sleep, 40
  3537. AddChatMessage("{" textColor "}[Binder] {0099FF}Command: {FFFFFF}" automaticCommandCommand)
  3538. Sleep, 40
  3539. AddChatMessage("{" textColor "}[Binder] {0099FF}Intervall: {FFFFFF}" automaticCommandInterval)
  3540. Sleep, 40
  3541. AddChatMessage("{" textColor "}[Binder] {0099FF}Status: {FFFFFF}" (automaticCommandRunning == 1 ? "{00FF00}aktiviert" : "{FF0000}deaktiviert"))
  3542. return
  3543. :?:/timer command::
  3544. if(!WinActive("ahk_exe gta_sa.exe")){
  3545. return
  3546. }
  3547. Suspend Permit
  3548. KeyWait, Enter
  3549. Sleep, 20
  3550. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Gebe nun den Command ein. (~ [Wait] etc. erlaubt)")
  3551. Sleep, 40
  3552. automaticCommandCommand:= playerInputText("Command: ")
  3553. IniWrite, %automaticCommandCommand%, %A_WorkingDir%\PurpleIceSettings.ini, Timer, Command
  3554. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Befehl gespeichert. {0099FF}" automaticCommandCommand)
  3555. return
  3556. :?:/timer interval::
  3557. if(!WinActive("ahk_exe gta_sa.exe")){
  3558. return
  3559. }
  3560. Suspend Permit
  3561. KeyWait, Enter
  3562. Sleep, 20
  3563. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Gebe nun den Intervall ein. (in Millisekunden, also 1000 = 1 Sekunde)")
  3564. Sleep, 40
  3565. automaticCommandInterval:= playerInputText("Intervall (in ms): ")
  3566. IniWrite, %automaticCommandInterval%, %A_WorkingDir%\PurpleIceSettings.ini, Timer, Interval
  3567. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Intervall gespeichert. {0099FF}" automaticCommandInterval)
  3568. return
  3569. *~End::
  3570. :?:/timer toggle::
  3571. if(!WinActive("ahk_exe gta_sa.exe")){
  3572. return
  3573. }
  3574. Suspend Permit
  3575. KeyWait, Enter
  3576. Sleep, 20
  3577. if(automaticCommandRunning == 1){
  3578. automaticCommandRunning:= 0
  3579. SetTimer, TimerCustomCommand, off
  3580. } else {
  3581. automaticCommandRunning:= 1
  3582. SetTimer, TimerCustomCommand, %automaticCommandInterval%
  3583. }
  3584. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Timer " (automaticCommandRunning == 1 ? "{00FF00}aktiviert" : "{FF0000}deaktiviert"))
  3585. return
  3586. :?:/customoverlay::
  3587. if(!WinActive("ahk_exe gta_sa.exe")){
  3588. return
  3589. }
  3590. Suspend Permit
  3591. KeyWait, Enter
  3592. Sleep, 20
  3593. AddChatMessage("{" textColor "}[Binder] {0099FF}/customoverlay text {FFFFFF}-> Text im Overlay einstellen")
  3594. Sleep, 40
  3595. AddChatMessage("{" textColor "}[Binder] {0099FF}/customoverlay trigger {FFFFFF}-> Trigger im Chat einstellen")
  3596. Sleep, 40
  3597. AddChatMessage("{" textColor "}[Binder] {0099FF}/customoverlay time {FFFFFF}-> Countdownzeit einstellen")
  3598. Sleep, 40
  3599. AddChatMessage("{404040}------------------------------")
  3600. Sleep, 40
  3601. AddChatMessage("{" textColor "}[Binder] {0099FF}Text: {FFFFFF}" customOverlayText)
  3602. Sleep, 40
  3603. AddChatMessage("{" textColor "}[Binder] {0099FF}Zeit: {FFFFFF}" customOverlayTime)
  3604. Sleep, 40
  3605. AddChatMessage("{" textColor "}[Binder] {0099FF}Trigger: {FFFFFF}" customOverlayTrigger)
  3606. return
  3607. :?:/customoverlay text::
  3608. if(!WinActive("ahk_exe gta_sa.exe")){
  3609. return
  3610. }
  3611. Suspend Permit
  3612. KeyWait, Enter
  3613. Sleep, 20
  3614. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Gebe nun den Text vor dem ':' im Overlay ein")
  3615. Sleep, 40
  3616. customOverlayText:= playerInputText("Text: ")
  3617. IniWrite, %customOverlayText%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomText
  3618. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Text gespeichert. {0099FF}" customOverlayText)
  3619. return
  3620. :?:/customoverlay time::
  3621. if(!WinActive("ahk_exe gta_sa.exe")){
  3622. return
  3623. }
  3624. Suspend Permit
  3625. KeyWait, Enter
  3626. Sleep, 20
  3627. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Gebe nun die Zeit in Sekunden an")
  3628. Sleep, 40
  3629. customOverlayTime:= playerInputText("Zeit: ")
  3630. IniWrite, %customOverlayTime%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomTime
  3631. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Zeit gespeichert. {0099FF}" customOverlayTime)
  3632. return
  3633. :?:/customoverlay trigger::
  3634. if(!WinActive("ahk_exe gta_sa.exe")){
  3635. return
  3636. }
  3637. Suspend Permit
  3638. KeyWait, Enter
  3639. Sleep, 20
  3640. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Gebe nun die Nachricht im Chat an, die den Timer triggern soll")
  3641. Sleep, 40
  3642. customOverlayTrigger:= playerInputText("Trigger: ")
  3643. IniWrite, %customOverlayTrigger%, %A_WorkingDir%\PurpleIceSettings.ini, Overlays, CustomTrigger
  3644. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Trigger gespeichert. {0099FF}" customOverlayTrigger)
  3645. return
  3646. :?:/wpbinds::
  3647. if(!WinActive("ahk_exe gta_sa.exe"))
  3648. return
  3649. Suspend Permit
  3650. KeyWait, Enter
  3651. Sleep, 20
  3652. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Binder ~ WP-Textbinds")
  3653. Sleep, 20
  3654. For, index, value in wpbindKeys {
  3655. AddChatMessage("{0099FF}" value " {FFFFFF}-> " wpbindWPs[index] " -> " wpbindReasons[index])
  3656. Sleep, 40
  3657. }
  3658. return
  3659. Keybind1:
  3660. Keybind2:
  3661. Keybind3:
  3662. Keybind4:
  3663. Keybind5:
  3664. Keybind6:
  3665. Keybind7:
  3666. Keybind8:
  3667. Keybind9:
  3668. Keybind10:
  3669. Keybind11:
  3670. Keybind12:
  3671. Keybind13:
  3672. Keybind14:
  3673. Keybind15:
  3674. Keybind16:
  3675. Keybind17:
  3676. Keybind18:
  3677. Keybind19:
  3678. Keybind20:
  3679. Keybind21:
  3680. Keybind22:
  3681. Keybind23:
  3682. Keybind24:
  3683. Keybind25:
  3684. Keybind26:
  3685. Keybind27:
  3686. Keybind28:
  3687. handleHotkey(SubStr(A_ThisLabel, 8))
  3688. return
  3689. *XButton1::
  3690. GuiControlGet, thisBind,, KeybindsBind23
  3691. if(thisBind != "" and keybindsEnabled == 1){
  3692. handleHotkey(23)
  3693. }
  3694. return
  3695. *XButton2::
  3696. GuiControlGet, thisBind,, KeybindsBind24
  3697. if(thisBind != "" and keybindsEnabled == 1){
  3698. handleHotkey(24)
  3699. }
  3700. return
  3701. *WheelLeft::
  3702. if(A_TimeSincePriorHotkey < 600)
  3703. return
  3704. GuiControlGet, thisBind,, KeybindsBind25
  3705. if(thisBind != "" and keybindsEnabled == 1){
  3706. handleHotkey(25)
  3707. }
  3708. return
  3709. *WheelRight::
  3710. if(A_TimeSincePriorHotkey < 600)
  3711. return
  3712. GuiControlGet, thisBind,, KeybindsBind26
  3713. if(thisBind != "" and keybindsEnabled == 1){
  3714. handleHotkey(26)
  3715. }
  3716. return
  3717. *Delete::
  3718. if(keybindsEnabled == 0) {
  3719. keybindsEnabled:= 1
  3720. SoundPlay, *64
  3721. } else {
  3722. keybindsEnabled:= 0
  3723. }
  3724. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Keybinds " (keybindsEnabled == 1 ? "{00FF00}aktiviert" : "{FF0000}deaktiviert"))
  3725. return
  3726. *~Up::
  3727. y:= -1
  3728. if(GetKeyState("Shift"))
  3729. y:= -10
  3730. changeOverlayPosition(0, y)
  3731. return
  3732. *~Down::
  3733. y:= 1
  3734. if(GetKeyState("Shift"))
  3735. y:= 10
  3736. changeOverlayPosition(0, y)
  3737. return
  3738. *~Left::
  3739. x:= -1
  3740. if(GetKeyState("Shift"))
  3741. x:= -10
  3742. changeOverlayPosition(x, 0)
  3743. return
  3744. *~Right::
  3745. x:= 1
  3746. if(GetKeyState("Shift"))
  3747. x:= 10
  3748. changeOverlayPosition(x, 0)
  3749. return
  3750. *~/::
  3751. recentKeypresses:= recentKeypresses . "/"
  3752. return
  3753. *~0::
  3754. recentKeypresses:= recentKeypresses . "0"
  3755. return
  3756. *~1::
  3757. recentKeypresses:= recentKeypresses . "1"
  3758. return
  3759. *~2::
  3760. recentKeypresses:= recentKeypresses . "2"
  3761. return
  3762. *~3::
  3763. recentKeypresses:= recentKeypresses . "3"
  3764. return
  3765. *~4::
  3766. recentKeypresses:= recentKeypresses . "4"
  3767. return
  3768. *~5::
  3769. recentKeypresses:= recentKeypresses . "5"
  3770. return
  3771. *~6::
  3772. recentKeypresses:= recentKeypresses . "6"
  3773. return
  3774. *~7::
  3775. recentKeypresses:= recentKeypresses . "7"
  3776. return
  3777. *~8::
  3778. recentKeypresses:= recentKeypresses . "8"
  3779. return
  3780. *~9::
  3781. recentKeypresses:= recentKeypresses . "9"
  3782. return
  3783. *~a::
  3784. recentKeypresses:= recentKeypresses . "a"
  3785. return
  3786. *~b::
  3787. recentKeypresses:= recentKeypresses . "b"
  3788. return
  3789. *~c::
  3790. recentKeypresses:= recentKeypresses . "c"
  3791. return
  3792. *~d::
  3793. recentKeypresses:= recentKeypresses . "d"
  3794. return
  3795. *~e::
  3796. recentKeypresses:= recentKeypresses . "e"
  3797. return
  3798. *~f::
  3799. recentKeypresses:= recentKeypresses . "f"
  3800. return
  3801. *~g::
  3802. recentKeypresses:= recentKeypresses . "g"
  3803. return
  3804. *~h::
  3805. recentKeypresses:= recentKeypresses . "h"
  3806. return
  3807. *~i::
  3808. recentKeypresses:= recentKeypresses . "i"
  3809. return
  3810. *~j::
  3811. recentKeypresses:= recentKeypresses . "j"
  3812. return
  3813. *~k::
  3814. recentKeypresses:= recentKeypresses . "k"
  3815. return
  3816. *~l::
  3817. recentKeypresses:= recentKeypresses . "l"
  3818. return
  3819. *~m::
  3820. recentKeypresses:= recentKeypresses . "m"
  3821. return
  3822. *~n::
  3823. recentKeypresses:= recentKeypresses . "n"
  3824. return
  3825. *~o::
  3826. recentKeypresses:= recentKeypresses . "o"
  3827. return
  3828. *~p::
  3829. recentKeypresses:= recentKeypresses . "p"
  3830. return
  3831. *~q::
  3832. recentKeypresses:= recentKeypresses . "q"
  3833. return
  3834. *~r::
  3835. recentKeypresses:= recentKeypresses . "r"
  3836. return
  3837. *~s::
  3838. recentKeypresses:= recentKeypresses . "s"
  3839. return
  3840. *~t::
  3841. recentKeypresses:= recentKeypresses . "t"
  3842. return
  3843. *~u::
  3844. recentKeypresses:= recentKeypresses . "u"
  3845. return
  3846. *~v::
  3847. recentKeypresses:= recentKeypresses . "v"
  3848. return
  3849. *~w::
  3850. recentKeypresses:= recentKeypresses . "w"
  3851. return
  3852. *~x::
  3853. recentKeypresses:= recentKeypresses . "x"
  3854. return
  3855. *~y::
  3856. recentKeypresses:= recentKeypresses . "y"
  3857. return
  3858. *~z::
  3859. recentKeypresses:= recentKeypresses . "z"
  3860. return
  3861. ~enter::
  3862. if(!WinActive("ahk_exe gta_sa.exe")){
  3863. return
  3864. }
  3865. if(overlayEditMode == 1){
  3866. if(overlayEditWhich == "cardl"){
  3867. overlayCardlX:= overlayEditX
  3868. overlayCardlY:= overlayEditY
  3869. }
  3870. if(overlayEditWhich == "lsd"){
  3871. overlayLSDX:= overlayEditX
  3872. overlayLSDY:= overlayEditY
  3873. }
  3874. if(overlayEditWhich == "gold"){
  3875. overlayGoldX:= overlayEditX
  3876. overlayGoldY:= overlayEditY
  3877. }
  3878. if(overlayEditWhich == "custom"){
  3879. overlayCustomX:= overlayEditX
  3880. overlayCustomY:= overlayEditY
  3881. }
  3882. overlayEditMode:= 0
  3883. overlayEditWhich:= ""
  3884. saveINI(4)
  3885. AddChatMessage("{" textColor "}[Binder] {FFFFFF}Das Overlay wurde gespeichert.")
  3886. initOverlays()
  3887. }
  3888. For, index, value in customCommands {
  3889. if(InStr(recentKeypresses, value)){
  3890. recentKeypresses:= ""
  3891. return
  3892. }
  3893. }
  3894. BlockInput On
  3895. KeyWait, Enter
  3896. recentKeypressesTemp:= recentKeypresses
  3897. recentKeypresses:= ""
  3898. For, index, value in wpbindKeys {
  3899. if(InStr(recentKeypressesTemp, value)){
  3900. SendInput, ^a{backspace}{enter}
  3901. Sleep, 40
  3902. BlockInput Off
  3903. handleWPs(index)
  3904. return
  3905. }
  3906. }
  3907. textbindsCount:= textbindsKeys.MaxIndex()
  3908. if(!textbindsCount) {
  3909. SendInput, {enter}
  3910. BlockInput Off
  3911. return
  3912. }
  3913. Loop, %textbindsCount% {
  3914. if(InStr(recentKeypressesTemp, textbindsKeys[A_Index])){
  3915. SendInput, ^a{backspace}{enter}
  3916. Sleep, 40
  3917. BlockInput Off
  3918. handleHotkey(1, textbindsValues[A_Index])
  3919. }
  3920. }
  3921. BlockInput Off
  3922. SendInput, {enter}
  3923. return
  3924. ~backspace::
  3925. recentKeypresses:= SubStr(recentKeypresses, 1, (StrLen(recentKeypresses)-1))
  3926. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement