Advertisement
Guest User

Untitled

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