Advertisement
Guest User

Untitled

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