Advertisement
Guest User

Untitled

a guest
Jan 29th, 2016
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 170.08 KB | None | 0 0
  1. #Persistent
  2. #NoEnv
  3. #SingleInstance, force
  4. #IfWinActive, GTA:SA:MP
  5. STicket = 0
  6. Freigabe = 1
  7. Partner = -1
  8. LastContract = 0
  9. SetTimer, Tankstelle, 100
  10. SetTimer, Drogen, 100
  11. SetTimer, FixVeh, 500
  12. setTimer, Systeme, 500
  13. setTimer, Statistiken, 500
  14. bin = %A_ScriptDir%\bin
  15. IfNotExist, %A_ScriptDir%\bin
  16. {
  17. FileCreateDir, %A_ScriptDir%\bin
  18. }
  19. IfNotExist, %A_ScriptDir%\bin\settings.png
  20. {
  21. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/settings.png, %A_ScriptDir%\bin\settings.png
  22. }
  23. IfNotExist, %A_ScriptDir%\bin\hitman.png
  24. {
  25. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/hitman.png, %A_ScriptDir%\bin\hitman.png
  26. }
  27. IfNotExist, %A_ScriptDir%\API.dll
  28. {
  29. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/API.dll, %A_ScriptDir%\API.dll
  30. }
  31. IfNotExist, %A_ScriptDir%\dx9_overlay.dll
  32. {
  33. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/overlay.dll, %A_ScriptDir%\dx9_overlay.dll
  34. }
  35. if(!A_IsAdmin)
  36. {
  37. MsgBox, 48, Fehler, Bitte starten Sie den Keybinder als Administrator.
  38. ExitApp
  39. }
  40. global ERROR_OK := 0
  41. global ERROR_PROCESS_NOT_FOUND := 1
  42. global ERROR_OPEN_PROCESS := 2
  43. global ERROR_INVALID_HANDLE := 3
  44. global ERROR_MODULE_NOT_FOUND := 4
  45. global ERROR_ENUM_PROCESS_MODULES := 5
  46. global ERROR_ZONE_NOT_FOUND := 6
  47. global ERROR_CITY_NOT_FOUND := 7
  48. global ERROR_READ_MEMORY := 8
  49. global ERROR_WRITE_MEMORY := 9
  50. global ERROR_ALLOC_MEMORY := 10
  51. global ERROR_FREE_MEMORY := 11
  52. global ERROR_WAIT_FOR_OBJECT := 12
  53. global ERROR_CREATE_THREAD := 13
  54. global ADDR_ZONECODE := 0xA49AD4
  55. global ADDR_POSITION_X := 0xB6F2E4
  56. global ADDR_POSITION_Y := 0xB6F2E8
  57. global ADDR_POSITION_Z := 0xB6F2EC
  58. global ADDR_CPED_PTR := 0xB6F5F0
  59. global ADDR_CPED_HPOFF := 0x540
  60. global ADDR_CPED_ARMOROFF := 0x548
  61. global ADDR_VEHICLE_PTR := 0xBA18FC
  62. global ADDR_VEHICLE_HPOFF := 0x4C0
  63. global ADDR_CPED_MONEY := 0x0B7CE54
  64. global ADDR_CPED_INTID := 0xA4ACE8
  65. global ADDR_VEHICLE_DOORSTATE := 0x4F8
  66. global ADDR_VEHICLE_ENGINESTATE := 0x428
  67. global ADDR_VEHICLE_LIGHTSTATE := 0x584
  68. global ADDR_VEHICLE_MODEL := 0x22
  69. global ADDR_VEHICLE_TYPE := 0x590
  70. global ADDR_VEHICLE_DRIVER := 0x460
  71. global ADDR_VEHICLE_CVEH := 0xB6F980
  72. global ADDR_VEHICLE_SPEED_X := 0x44
  73. global ADDR_VEHICLE_SPEED_Y := 0x48
  74. global ADDR_VEHICLE_SPEED_Z := 0x4C
  75. global oAirplaneModels := [417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593]
  76. global oBikeModels := [481,509,510]
  77. global ovehicleNames := ["Landstalker","Bravura","Buffalo","Linerunner","Perrenial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus","Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Whoopee","BFInjection","Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie","Stallion","Rumpo","RCBandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder","Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley'sRCVan","Skimmer","PCJ-600","Faggio","Freeway","RCBaron","RCRaider","Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina","Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","NewsChopper","Rancher","FBIRancher","Virgo","Greenwood","Jetmax","Hotring","Sandking","BlistaCompact","PoliceMaverick","Boxvillde","Benson","Mesa","RCGoblin","HotringRacerA","HotringRacerB","BloodringBanger","Rancher","SuperGT","Elegant","Journey","Bike","MountainBike","Beagle","Cropduster","Stunt","Tanker","Roadtrain","Nebula","Majestic","Buccaneer","Shamal","hydra","FCR-900","NRG-500","HPV1000","CementTruck","TowTruck","Fortune","Cadrona","FBITruck","Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover","Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster","Monster","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RCTiger","Flash","Tahoma","Savanna","Bandito","FreightFlat","StreakCarriage","Kart","Mower","Dune","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","NewsVan","Tug","Trailer","Emperor","Wayfarer","Euros","Hotdog","Club","FreightBox","Trailer","Andromada","Dodo","RCCam","Launch","PoliceCar","PoliceCar","PoliceCar","PoliceRanger","Picador","S.W.A.T","Alpha","Phoenix","GlendaleShit","SadlerShit","Luggage","Luggage","Stairs","Boxville","Tiller","UtilityTrailer"]
  78. global ADDR_SAMP_INCHAT_PTR := 0x21a10c
  79. global ADDR_SAMP_INCHAT_PTR_OFF := 0x55
  80. global ADDR_SAMP_USERNAME := 0x219A6F
  81. global ADDR_SAMP_CHATMSG_PTR := 0x21A0E4
  82. global ADDR_SAMP_SHOWDLG_PTR := 0x21A0B8
  83. global FUNC_SAMP_SENDCMD := 0x65c60
  84. global FUNC_SAMP_SENDSAY := 0x57f0
  85. global FUNC_SAMP_ADDTOCHATWND := 0x64520
  86. global FUNC_SAMP_SHOWGAMETEXT := 0x9C2C0
  87. global FUNC_SAMP_PLAYAUDIOSTR := 0x62dA0
  88. global FUNC_SAMP_STOPAUDIOSTR := 0x629A0
  89. global FUNC_SAMP_SHOWDIALOG := 0x6B9C0
  90. global FUNC_UPDATESCOREBOARD := 0x8A10
  91. global SAMP_INFO_OFFSET := 0x21A0F8
  92. global SAMP_PPOOLS_OFFSET := 0x3CD
  93. global SAMP_PPOOL_PLAYER_OFFSET := 0x18
  94. global SAMP_SLOCALPLAYERID_OFFSET := 0x4
  95. global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
  96. global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
  97. global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
  98. global SAMP_PREMOTEPLAYER_OFFSET := 0x2E
  99. global SAMP_ISTRLENNAME___OFFSET := 0x1C
  100. global SAMP_SZPLAYERNAME_OFFSET := 0xC
  101. global SAMP_PSZPLAYERNAME_OFFSET := 0xC
  102. global SAMP_ILOCALPLAYERPING_OFFSET := 0x26
  103. global SAMP_ILOCALPLAYERSCORE_OFFSET := 0x2A
  104. global SAMP_IPING_OFFSET := 0x28
  105. global SAMP_ISCORE_OFFSET := 0x24
  106. global SAMP_ISNPC_OFFSET := 0x4
  107. global SAMP_SZIP_OFFSET := 0x20
  108. global SAMP_SZHOSTNAME_OFFSET := 0x121
  109. global SAMP_PLAYER_MAX := 1004
  110. global SIZE_SAMP_CHATMSG := 0xFC
  111. global hGTA := 0x0
  112. global dwGTAPID := 0x0
  113. global dwSAMP := 0x0
  114. global pMemory := 0x0
  115. global pParam1 := 0x0
  116. global pParam2 := 0x0
  117. global pParam3 := 0x0
  118. global pParam4 := 0x0
  119. global pParam5 := 0x0
  120. global pInjectFunc := 0x0
  121. global nZone := 1
  122. global nCity := 1
  123. global bInitZaC := 0
  124. global iRefreshScoreboard := 0
  125. global oScoreboardData := ""
  126. global iRefreshHandles := 0
  127. global iUpdateTick := 2500
  128. isInChat() {
  129. if(!checkHandles())
  130. return -1
  131. dwPtr := dwSAMP + ADDR_SAMP_INCHAT_PTR
  132. dwAddress := readDWORD(hGTA, dwPtr) + ADDR_SAMP_INCHAT_PTR_OFF
  133. if(ErrorLevel) {
  134. ErrorLevel := ERROR_READ_MEMORY
  135. return -1
  136. }
  137. dwInChat := readDWORD(hGTA, dwAddress)
  138. if(ErrorLevel) {
  139. ErrorLevel := ERROR_READ_MEMORY
  140. return -1
  141. }
  142. ErrorLevel := ERROR_OK
  143. if(dwInChat > 0) {
  144. return true
  145. } else {
  146. return false
  147. }
  148. }
  149. getUsername() {
  150. if(!checkHandles())
  151. return ""
  152. dwAddress := dwSAMP + ADDR_SAMP_USERNAME
  153. sUsername := readString(hGTA, dwAddress, 25)
  154. if(ErrorLevel) {
  155. ErrorLevel := ERROR_READ_MEMORY
  156. return ""
  157. }
  158. ErrorLevel := ERROR_OK
  159. return sUsername
  160. }
  161. getId() {
  162. s:=getUsername()
  163. return getPlayerIdByName(s)
  164. }
  165. IsPlayerInNoDM(x, y, z)
  166. {
  167. result := ""
  168. if(x<1561.5 && x>1387.8 && y<-1727.6 && y>-1870)
  169. {
  170. result := 1
  171. }
  172. else if(x>1688.8 && x<1820.8 && y<-1859.5 && y>-1961.2)
  173. {
  174. result := 1
  175. }
  176. return result
  177. }
  178. getCoordinates() {
  179. if(!checkHandles())
  180. return ""
  181. fX := readFloat(hGTA, ADDR_POSITION_X)
  182. if(ErrorLevel) {
  183. ErrorLevel := ERROR_READ_MEMORY
  184. return ""
  185. }
  186. fY := readFloat(hGTA, ADDR_POSITION_Y)
  187. if(ErrorLevel) {
  188. ErrorLevel := ERROR_READ_MEMORY
  189. return ""
  190. }
  191. fZ := readFloat(hGTA, ADDR_POSITION_Z)
  192. if(ErrorLevel) {
  193. ErrorLevel := ERROR_READ_MEMORY
  194. return ""
  195. }
  196. ErrorLevel := ERROR_OK
  197. return [fX, fY, fZ]
  198. }
  199. GetPlayerPos(ByRef fX,ByRef fY,ByRef fZ) {
  200. if(!checkHandles())
  201. return 0
  202. fX := readFloat(hGTA, ADDR_POSITION_X)
  203. if(ErrorLevel) {
  204. ErrorLevel := ERROR_READ_MEMORY
  205. return 0
  206. }
  207. fY := readFloat(hGTA, ADDR_POSITION_Y)
  208. if(ErrorLevel) {
  209. ErrorLevel := ERROR_READ_MEMORY
  210. return 0
  211. }
  212. fZ := readFloat(hGTA, ADDR_POSITION_Z)
  213. if(ErrorLevel) {
  214. ErrorLevel := ERROR_READ_MEMORY
  215. return 0
  216. }
  217. ErrorLevel := ERROR_OK
  218. }
  219. initZonesAndCities() {
  220. AddCity("Las Venturas", 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0)
  221. AddCity("San Fierro", -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0)
  222. AddCity("San Fierro", -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0)
  223. AddCity("San Fierro", -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0)
  224. AddCity("Los Santos", 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0)
  225. AddCity("Los Santos", 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0)
  226. AddCity("Tierra Robada", -1213.91, 596.349, -242.99, -480.539, 1659.68, 900.0)
  227. AddCity("Red County", -1213.91, -768.027, -242.99, 2997.06, 596.349, 900.0)
  228. AddCity("Flint County", -1213.91, -2892.97, -242.99, 44.6147, -768.027, 900.0)
  229. AddCity("Whetstone", -2997.47, -2892.97, -242.99, -1213.91, -1115.58, 900.0)
  230. AddZone("Avispa Country Club", -2667.810, -302.135, -28.831, -2646.400, -262.320, 71.169)
  231. AddZone("Easter Bay Airport", -1315.420, -405.388, 15.406, -1264.400, -209.543, 25.406)
  232. AddZone("Avispa Country Club", -2550.040, -355.493, 0.000, -2470.040, -318.493, 39.700)
  233. AddZone("Easter Bay Airport", -1490.330, -209.543, 15.406, -1264.400, -148.388, 25.406)
  234. AddZone("Garcia", -2395.140, -222.589, -5.3, -2354.090, -204.792, 200.000)
  235. AddZone("Shady Cabin", -1632.830, -2263.440, -3.0, -1601.330, -2231.790, 200.000)
  236. AddZone("East Los Santos", 2381.680, -1494.030, -89.084, 2421.030, -1454.350, 110.916)
  237. AddZone("LVA Freight Depot", 1236.630, 1163.410, -89.084, 1277.050, 1203.280, 110.916)
  238. AddZone("Blackfield Intersection", 1277.050, 1044.690, -89.084, 1315.350, 1087.630, 110.916)
  239. AddZone("Avispa Country Club", -2470.040, -355.493, 0.000, -2270.040, -318.493, 46.100)
  240. AddZone("Temple", 1252.330, -926.999, -89.084, 1357.000, -910.170, 110.916)
  241. AddZone("Unity Station", 1692.620, -1971.800, -20.492, 1812.620, -1932.800, 79.508)
  242. AddZone("LVA Freight Depot", 1315.350, 1044.690, -89.084, 1375.600, 1087.630, 110.916)
  243. AddZone("Los Flores", 2581.730, -1454.350, -89.084, 2632.830, -1393.420, 110.916)
  244. AddZone("Starfish Casino", 2437.390, 1858.100, -39.084, 2495.090, 1970.850, 60.916)
  245. AddZone("Easter Bay Chemicals", -1132.820, -787.391, 0.000, -956.476, -768.027, 200.000)
  246. AddZone("Downtown Los Santos", 1370.850, -1170.870, -89.084, 1463.900, -1130.850, 110.916)
  247. AddZone("Esplanade East", -1620.300, 1176.520, -4.5, -1580.010, 1274.260, 200.000)
  248. AddZone("Market Station", 787.461, -1410.930, -34.126, 866.009, -1310.210, 65.874)
  249. AddZone("Linden Station", 2811.250, 1229.590, -39.594, 2861.250, 1407.590, 60.406)
  250. AddZone("Montgomery Intersection", 1582.440, 347.457, 0.000, 1664.620, 401.750, 200.000)
  251. AddZone("Frederick Bridge", 2759.250, 296.501, 0.000, 2774.250, 594.757, 200.000)
  252. AddZone("Yellow Bell Station", 1377.480, 2600.430, -21.926, 1492.450, 2687.360, 78.074)
  253. AddZone("Downtown Los Santos", 1507.510, -1385.210, 110.916, 1582.550, -1325.310, 335.916)
  254. AddZone("Jefferson", 2185.330, -1210.740, -89.084, 2281.450, -1154.590, 110.916)
  255. AddZone("Mulholland", 1318.130, -910.170, -89.084, 1357.000, -768.027, 110.916)
  256. AddZone("Avispa Country Club", -2361.510, -417.199, 0.000, -2270.040, -355.493, 200.000)
  257. AddZone("Jefferson", 1996.910, -1449.670, -89.084, 2056.860, -1350.720, 110.916)
  258. AddZone("Julius Thruway West", 1236.630, 2142.860, -89.084, 1297.470, 2243.230, 110.916)
  259. AddZone("Jefferson", 2124.660, -1494.030, -89.084, 2266.210, -1449.670, 110.916)
  260. AddZone("Julius Thruway North", 1848.400, 2478.490, -89.084, 1938.800, 2553.490, 110.916)
  261. AddZone("Rodeo", 422.680, -1570.200, -89.084, 466.223, -1406.050, 110.916)
  262. AddZone("Cranberry Station", -2007.830, 56.306, 0.000, -1922.000, 224.782, 100.000)
  263. AddZone("Downtown Los Santos", 1391.050, -1026.330, -89.084, 1463.900, -926.999, 110.916)
  264. AddZone("Redsands West", 1704.590, 2243.230, -89.084, 1777.390, 2342.830, 110.916)
  265. AddZone("Little Mexico", 1758.900, -1722.260, -89.084, 1812.620, -1577.590, 110.916)
  266. AddZone("Blackfield Intersection", 1375.600, 823.228, -89.084, 1457.390, 919.447, 110.916)
  267. AddZone("Los Santos International", 1974.630, -2394.330, -39.084, 2089.000, -2256.590, 60.916)
  268. AddZone("Beacon Hill", -399.633, -1075.520, -1.489, -319.033, -977.516, 198.511)
  269. AddZone("Rodeo", 334.503, -1501.950, -89.084, 422.680, -1406.050, 110.916)
  270. AddZone("Richman", 225.165, -1369.620, -89.084, 334.503, -1292.070, 110.916)
  271. AddZone("Downtown Los Santos", 1724.760, -1250.900, -89.084, 1812.620, -1150.870, 110.916)
  272. AddZone("The Strip", 2027.400, 1703.230, -89.084, 2137.400, 1783.230, 110.916)
  273. AddZone("Downtown Los Santos", 1378.330, -1130.850, -89.084, 1463.900, -1026.330, 110.916)
  274. AddZone("Blackfield Intersection", 1197.390, 1044.690, -89.084, 1277.050, 1163.390, 110.916)
  275. AddZone("Conference Center", 1073.220, -1842.270, -89.084, 1323.900, -1804.210, 110.916)
  276. AddZone("Montgomery", 1451.400, 347.457, -6.1, 1582.440, 420.802, 200.000)
  277. AddZone("Foster Valley", -2270.040, -430.276, -1.2, -2178.690, -324.114, 200.000)
  278. AddZone("Blackfield Chapel", 1325.600, 596.349, -89.084, 1375.600, 795.010, 110.916)
  279. AddZone("Los Santos International", 2051.630, -2597.260, -39.084, 2152.450, -2394.330, 60.916)
  280. AddZone("Mulholland", 1096.470, -910.170, -89.084, 1169.130, -768.027, 110.916)
  281. AddZone("Yellow Bell Gol Course", 1457.460, 2723.230, -89.084, 1534.560, 2863.230, 110.916)
  282. AddZone("The Strip", 2027.400, 1783.230, -89.084, 2162.390, 1863.230, 110.916)
  283. AddZone("Jefferson", 2056.860, -1210.740, -89.084, 2185.330, -1126.320, 110.916)
  284. AddZone("Mulholland", 952.604, -937.184, -89.084, 1096.470, -860.619, 110.916)
  285. AddZone("Aldea Malvada", -1372.140, 2498.520, 0.000, -1277.590, 2615.350, 200.000)
  286. AddZone("Las Colinas", 2126.860, -1126.320, -89.084, 2185.330, -934.489, 110.916)
  287. AddZone("Las Colinas", 1994.330, -1100.820, -89.084, 2056.860, -920.815, 110.916)
  288. AddZone("Richman", 647.557, -954.662, -89.084, 768.694, -860.619, 110.916)
  289. AddZone("LVA Freight Depot", 1277.050, 1087.630, -89.084, 1375.600, 1203.280, 110.916)
  290. AddZone("Julius Thruway North", 1377.390, 2433.230, -89.084, 1534.560, 2507.230, 110.916)
  291. AddZone("Willowfield", 2201.820, -2095.000, -89.084, 2324.000, -1989.900, 110.916)
  292. AddZone("Julius Thruway North", 1704.590, 2342.830, -89.084, 1848.400, 2433.230, 110.916)
  293. AddZone("Temple", 1252.330, -1130.850, -89.084, 1378.330, -1026.330, 110.916)
  294. AddZone("Little Mexico", 1701.900, -1842.270, -89.084, 1812.620, -1722.260, 110.916)
  295. AddZone("Queens", -2411.220, 373.539, 0.000, -2253.540, 458.411, 200.000)
  296. AddZone("Las Venturas Airport", 1515.810, 1586.400, -12.500, 1729.950, 1714.560, 87.500)
  297. AddZone("Richman", 225.165, -1292.070, -89.084, 466.223, -1235.070, 110.916)
  298. AddZone("Temple", 1252.330, -1026.330, -89.084, 1391.050, -926.999, 110.916)
  299. AddZone("East Los Santos", 2266.260, -1494.030, -89.084, 2381.680, -1372.040, 110.916)
  300. AddZone("Julius Thruway East", 2623.180, 943.235, -89.084, 2749.900, 1055.960, 110.916)
  301. AddZone("Willowfield", 2541.700, -1941.400, -89.084, 2703.580, -1852.870, 110.916)
  302. AddZone("Las Colinas", 2056.860, -1126.320, -89.084, 2126.860, -920.815, 110.916)
  303. AddZone("Julius Thruway East", 2625.160, 2202.760, -89.084, 2685.160, 2442.550, 110.916)
  304. AddZone("Rodeo", 225.165, -1501.950, -89.084, 334.503, -1369.620, 110.916)
  305. AddZone("Las Brujas", -365.167, 2123.010, -3.0, -208.570, 2217.680, 200.000)
  306. AddZone("Julius Thruway East", 2536.430, 2442.550, -89.084, 2685.160, 2542.550, 110.916)
  307. AddZone("Rodeo", 334.503, -1406.050, -89.084, 466.223, -1292.070, 110.916)
  308. AddZone("Vinewood", 647.557, -1227.280, -89.084, 787.461, -1118.280, 110.916)
  309. AddZone("Rodeo", 422.680, -1684.650, -89.084, 558.099, -1570.200, 110.916)
  310. AddZone("Julius Thruway North", 2498.210, 2542.550, -89.084, 2685.160, 2626.550, 110.916)
  311. AddZone("Downtown Los Santos", 1724.760, -1430.870, -89.084, 1812.620, -1250.900, 110.916)
  312. AddZone("Rodeo", 225.165, -1684.650, -89.084, 312.803, -1501.950, 110.916)
  313. AddZone("Jefferson", 2056.860, -1449.670, -89.084, 2266.210, -1372.040, 110.916)
  314. AddZone("Hampton Barns", 603.035, 264.312, 0.000, 761.994, 366.572, 200.000)
  315. AddZone("Temple", 1096.470, -1130.840, -89.084, 1252.330, -1026.330, 110.916)
  316. AddZone("Kincaid Bridge", -1087.930, 855.370, -89.084, -961.950, 986.281, 110.916)
  317. AddZone("Verona Beach", 1046.150, -1722.260, -89.084, 1161.520, -1577.590, 110.916)
  318. AddZone("Commerce", 1323.900, -1722.260, -89.084, 1440.900, -1577.590, 110.916)
  319. AddZone("Mulholland", 1357.000, -926.999, -89.084, 1463.900, -768.027, 110.916)
  320. AddZone("Rodeo", 466.223, -1570.200, -89.084, 558.099, -1385.070, 110.916)
  321. AddZone("Mulholland", 911.802, -860.619, -89.084, 1096.470, -768.027, 110.916)
  322. AddZone("Mulholland", 768.694, -954.662, -89.084, 952.604, -860.619, 110.916)
  323. AddZone("Julius Thruway South", 2377.390, 788.894, -89.084, 2537.390, 897.901, 110.916)
  324. AddZone("Idlewood", 1812.620, -1852.870, -89.084, 1971.660, -1742.310, 110.916)
  325. AddZone("Ocean Docks", 2089.000, -2394.330, -89.084, 2201.820, -2235.840, 110.916)
  326. AddZone("Commerce", 1370.850, -1577.590, -89.084, 1463.900, -1384.950, 110.916)
  327. AddZone("Julius Thruway North", 2121.400, 2508.230, -89.084, 2237.400, 2663.170, 110.916)
  328. AddZone("Temple", 1096.470, -1026.330, -89.084, 1252.330, -910.170, 110.916)
  329. AddZone("Glen Park", 1812.620, -1449.670, -89.084, 1996.910, -1350.720, 110.916)
  330. AddZone("Easter Bay Airport", -1242.980, -50.096, 0.000, -1213.910, 578.396, 200.000)
  331. AddZone("Martin Bridge", -222.179, 293.324, 0.000, -122.126, 476.465, 200.000)
  332. AddZone("The Strip", 2106.700, 1863.230, -89.084, 2162.390, 2202.760, 110.916)
  333. AddZone("Willowfield", 2541.700, -2059.230, -89.084, 2703.580, -1941.400, 110.916)
  334. AddZone("Marina", 807.922, -1577.590, -89.084, 926.922, -1416.250, 110.916)
  335. AddZone("Las Venturas Airport", 1457.370, 1143.210, -89.084, 1777.400, 1203.280, 110.916)
  336. AddZone("Idlewood", 1812.620, -1742.310, -89.084, 1951.660, -1602.310, 110.916)
  337. AddZone("Esplanade East", -1580.010, 1025.980, -6.1, -1499.890, 1274.260, 200.000)
  338. AddZone("Downtown Los Santos", 1370.850, -1384.950, -89.084, 1463.900, -1170.870, 110.916)
  339. AddZone("The Mako Span", 1664.620, 401.750, 0.000, 1785.140, 567.203, 200.000)
  340. AddZone("Rodeo", 312.803, -1684.650, -89.084, 422.680, -1501.950, 110.916)
  341. AddZone("Pershing Square", 1440.900, -1722.260, -89.084, 1583.500, -1577.590, 110.916)
  342. AddZone("Mulholland", 687.802, -860.619, -89.084, 911.802, -768.027, 110.916)
  343. AddZone("Gant Bridge", -2741.070, 1490.470, -6.1, -2616.400, 1659.680, 200.000)
  344. AddZone("Las Colinas", 2185.330, -1154.590, -89.084, 2281.450, -934.489, 110.916)
  345. AddZone("Mulholland", 1169.130, -910.170, -89.084, 1318.130, -768.027, 110.916)
  346. AddZone("Julius Thruway North", 1938.800, 2508.230, -89.084, 2121.400, 2624.230, 110.916)
  347. AddZone("Commerce", 1667.960, -1577.590, -89.084, 1812.620, -1430.870, 110.916)
  348. AddZone("Rodeo", 72.648, -1544.170, -89.084, 225.165, -1404.970, 110.916)
  349. AddZone("Roca Escalante", 2536.430, 2202.760, -89.084, 2625.160, 2442.550, 110.916)
  350. AddZone("Rodeo", 72.648, -1684.650, -89.084, 225.165, -1544.170, 110.916)
  351. AddZone("Market", 952.663, -1310.210, -89.084, 1072.660, -1130.850, 110.916)
  352. AddZone("Las Colinas", 2632.740, -1135.040, -89.084, 2747.740, -945.035, 110.916)
  353. AddZone("Mulholland", 861.085, -674.885, -89.084, 1156.550, -600.896, 110.916)
  354. AddZone("King's", -2253.540, 373.539, -9.1, -1993.280, 458.411, 200.000)
  355. AddZone("Redsands East", 1848.400, 2342.830, -89.084, 2011.940, 2478.490, 110.916)
  356. AddZone("Downtown", -1580.010, 744.267, -6.1, -1499.890, 1025.980, 200.000)
  357. AddZone("Conference Center", 1046.150, -1804.210, -89.084, 1323.900, -1722.260, 110.916)
  358. AddZone("Richman", 647.557, -1118.280, -89.084, 787.461, -954.662, 110.916)
  359. AddZone("Ocean Flats", -2994.490, 277.411, -9.1, -2867.850, 458.411, 200.000)
  360. AddZone("Greenglass College", 964.391, 930.890, -89.084, 1166.530, 1044.690, 110.916)
  361. AddZone("Glen Park", 1812.620, -1100.820, -89.084, 1994.330, -973.380, 110.916)
  362. AddZone("LVA Freight Depot", 1375.600, 919.447, -89.084, 1457.370, 1203.280, 110.916)
  363. AddZone("Regular Tom", -405.770, 1712.860, -3.0, -276.719, 1892.750, 200.000)
  364. AddZone("Verona Beach", 1161.520, -1722.260, -89.084, 1323.900, -1577.590, 110.916)
  365. AddZone("East Los Santos", 2281.450, -1372.040, -89.084, 2381.680, -1135.040, 110.916)
  366. AddZone("Caligula's Palace", 2137.400, 1703.230, -89.084, 2437.390, 1783.230, 110.916)
  367. AddZone("Idlewood", 1951.660, -1742.310, -89.084, 2124.660, -1602.310, 110.916)
  368. AddZone("Pilgrim", 2624.400, 1383.230, -89.084, 2685.160, 1783.230, 110.916)
  369. AddZone("Idlewood", 2124.660, -1742.310, -89.084, 2222.560, -1494.030, 110.916)
  370. AddZone("Queens", -2533.040, 458.411, 0.000, -2329.310, 578.396, 200.000)
  371. AddZone("Downtown", -1871.720, 1176.420, -4.5, -1620.300, 1274.260, 200.000)
  372. AddZone("Commerce", 1583.500, -1722.260, -89.084, 1758.900, -1577.590, 110.916)
  373. AddZone("East Los Santos", 2381.680, -1454.350, -89.084, 2462.130, -1135.040, 110.916)
  374. AddZone("Marina", 647.712, -1577.590, -89.084, 807.922, -1416.250, 110.916)
  375. AddZone("Richman", 72.648, -1404.970, -89.084, 225.165, -1235.070, 110.916)
  376. AddZone("Vinewood", 647.712, -1416.250, -89.084, 787.461, -1227.280, 110.916)
  377. AddZone("East Los Santos", 2222.560, -1628.530, -89.084, 2421.030, -1494.030, 110.916)
  378. AddZone("Rodeo", 558.099, -1684.650, -89.084, 647.522, -1384.930, 110.916)
  379. AddZone("Easter Tunnel", -1709.710, -833.034, -1.5, -1446.010, -730.118, 200.000)
  380. AddZone("Rodeo", 466.223, -1385.070, -89.084, 647.522, -1235.070, 110.916)
  381. AddZone("Redsands East", 1817.390, 2202.760, -89.084, 2011.940, 2342.830, 110.916)
  382. AddZone("The Clown's Pocket", 2162.390, 1783.230, -89.084, 2437.390, 1883.230, 110.916)
  383. AddZone("Idlewood", 1971.660, -1852.870, -89.084, 2222.560, -1742.310, 110.916)
  384. AddZone("Montgomery Intersection", 1546.650, 208.164, 0.000, 1745.830, 347.457, 200.000)
  385. AddZone("Willowfield", 2089.000, -2235.840, -89.084, 2201.820, -1989.900, 110.916)
  386. AddZone("Temple", 952.663, -1130.840, -89.084, 1096.470, -937.184, 110.916)
  387. AddZone("Prickle Pine", 1848.400, 2553.490, -89.084, 1938.800, 2863.230, 110.916)
  388. AddZone("Los Santos International", 1400.970, -2669.260, -39.084, 2189.820, -2597.260, 60.916)
  389. AddZone("Garver Bridge", -1213.910, 950.022, -89.084, -1087.930, 1178.930, 110.916)
  390. AddZone("Garver Bridge", -1339.890, 828.129, -89.084, -1213.910, 1057.040, 110.916)
  391. AddZone("Kincaid Bridge", -1339.890, 599.218, -89.084, -1213.910, 828.129, 110.916)
  392. AddZone("Kincaid Bridge", -1213.910, 721.111, -89.084, -1087.930, 950.022, 110.916)
  393. AddZone("Verona Beach", 930.221, -2006.780, -89.084, 1073.220, -1804.210, 110.916)
  394. AddZone("Verdant Bluffs", 1073.220, -2006.780, -89.084, 1249.620, -1842.270, 110.916)
  395. AddZone("Vinewood", 787.461, -1130.840, -89.084, 952.604, -954.662, 110.916)
  396. AddZone("Vinewood", 787.461, -1310.210, -89.084, 952.663, -1130.840, 110.916)
  397. AddZone("Commerce", 1463.900, -1577.590, -89.084, 1667.960, -1430.870, 110.916)
  398. AddZone("Market", 787.461, -1416.250, -89.084, 1072.660, -1310.210, 110.916)
  399. AddZone("Rockshore West", 2377.390, 596.349, -89.084, 2537.390, 788.894, 110.916)
  400. AddZone("Julius Thruway North", 2237.400, 2542.550, -89.084, 2498.210, 2663.170, 110.916)
  401. AddZone("East Beach", 2632.830, -1668.130, -89.084, 2747.740, -1393.420, 110.916)
  402. AddZone("Fallow Bridge", 434.341, 366.572, 0.000, 603.035, 555.680, 200.000)
  403. AddZone("Willowfield", 2089.000, -1989.900, -89.084, 2324.000, -1852.870, 110.916)
  404. AddZone("Chinatown", -2274.170, 578.396, -7.6, -2078.670, 744.170, 200.000)
  405. AddZone("El Castillo del Diablo", -208.570, 2337.180, 0.000, 8.430, 2487.180, 200.000)
  406. AddZone("Ocean Docks", 2324.000, -2145.100, -89.084, 2703.580, -2059.230, 110.916)
  407. AddZone("Easter Bay Chemicals", -1132.820, -768.027, 0.000, -956.476, -578.118, 200.000)
  408. AddZone("The Visage", 1817.390, 1703.230, -89.084, 2027.400, 1863.230, 110.916)
  409. AddZone("Ocean Flats", -2994.490, -430.276, -1.2, -2831.890, -222.589, 200.000)
  410. AddZone("Richman", 321.356, -860.619, -89.084, 687.802, -768.027, 110.916)
  411. AddZone("Green Palms", 176.581, 1305.450, -3.0, 338.658, 1520.720, 200.000)
  412. AddZone("Richman", 321.356, -768.027, -89.084, 700.794, -674.885, 110.916)
  413. AddZone("Starfish Casino", 2162.390, 1883.230, -89.084, 2437.390, 2012.180, 110.916)
  414. AddZone("East Beach", 2747.740, -1668.130, -89.084, 2959.350, -1498.620, 110.916)
  415. AddZone("Jefferson", 2056.860, -1372.040, -89.084, 2281.450, -1210.740, 110.916)
  416. AddZone("Downtown Los Santos", 1463.900, -1290.870, -89.084, 1724.760, -1150.870, 110.916)
  417. AddZone("Downtown Los Santos", 1463.900, -1430.870, -89.084, 1724.760, -1290.870, 110.916)
  418. AddZone("Garver Bridge", -1499.890, 696.442, -179.615, -1339.890, 925.353, 20.385)
  419. AddZone("Julius Thruway South", 1457.390, 823.228, -89.084, 2377.390, 863.229, 110.916)
  420. AddZone("East Los Santos", 2421.030, -1628.530, -89.084, 2632.830, -1454.350, 110.916)
  421. AddZone("Greenglass College", 964.391, 1044.690, -89.084, 1197.390, 1203.220, 110.916)
  422. AddZone("Las Colinas", 2747.740, -1120.040, -89.084, 2959.350, -945.035, 110.916)
  423. AddZone("Mulholland", 737.573, -768.027, -89.084, 1142.290, -674.885, 110.916)
  424. AddZone("Ocean Docks", 2201.820, -2730.880, -89.084, 2324.000, -2418.330, 110.916)
  425. AddZone("East Los Santos", 2462.130, -1454.350, -89.084, 2581.730, -1135.040, 110.916)
  426. AddZone("Ganton", 2222.560, -1722.330, -89.084, 2632.830, -1628.530, 110.916)
  427. AddZone("Avispa Country Club", -2831.890, -430.276, -6.1, -2646.400, -222.589, 200.000)
  428. AddZone("Willowfield", 1970.620, -2179.250, -89.084, 2089.000, -1852.870, 110.916)
  429. AddZone("Esplanade North", -1982.320, 1274.260, -4.5, -1524.240, 1358.900, 200.000)
  430. AddZone("The High Roller", 1817.390, 1283.230, -89.084, 2027.390, 1469.230, 110.916)
  431. AddZone("Ocean Docks", 2201.820, -2418.330, -89.084, 2324.000, -2095.000, 110.916)
  432. AddZone("Last Dime Motel", 1823.080, 596.349, -89.084, 1997.220, 823.228, 110.916)
  433. AddZone("Bayside Marina", -2353.170, 2275.790, 0.000, -2153.170, 2475.790, 200.000)
  434. AddZone("King's", -2329.310, 458.411, -7.6, -1993.280, 578.396, 200.000)
  435. AddZone("El Corona", 1692.620, -2179.250, -89.084, 1812.620, -1842.270, 110.916)
  436. AddZone("Blackfield Chapel", 1375.600, 596.349, -89.084, 1558.090, 823.228, 110.916)
  437. AddZone("The Pink Swan", 1817.390, 1083.230, -89.084, 2027.390, 1283.230, 110.916)
  438. AddZone("Julius Thruway West", 1197.390, 1163.390, -89.084, 1236.630, 2243.230, 110.916)
  439. AddZone("Los Flores", 2581.730, -1393.420, -89.084, 2747.740, -1135.040, 110.916)
  440. AddZone("The Visage", 1817.390, 1863.230, -89.084, 2106.700, 2011.830, 110.916)
  441. AddZone("Prickle Pine", 1938.800, 2624.230, -89.084, 2121.400, 2861.550, 110.916)
  442. AddZone("Verona Beach", 851.449, -1804.210, -89.084, 1046.150, -1577.590, 110.916)
  443. AddZone("Robada Intersection", -1119.010, 1178.930, -89.084, -862.025, 1351.450, 110.916)
  444. AddZone("Linden Side", 2749.900, 943.235, -89.084, 2923.390, 1198.990, 110.916)
  445. AddZone("Ocean Docks", 2703.580, -2302.330, -89.084, 2959.350, -2126.900, 110.916)
  446. AddZone("Willowfield", 2324.000, -2059.230, -89.084, 2541.700, -1852.870, 110.916)
  447. AddZone("King's", -2411.220, 265.243, -9.1, -1993.280, 373.539, 200.000)
  448. AddZone("Commerce", 1323.900, -1842.270, -89.084, 1701.900, -1722.260, 110.916)
  449. AddZone("Mulholland", 1269.130, -768.027, -89.084, 1414.070, -452.425, 110.916)
  450. AddZone("Marina", 647.712, -1804.210, -89.084, 851.449, -1577.590, 110.916)
  451. AddZone("Battery Point", -2741.070, 1268.410, -4.5, -2533.040, 1490.470, 200.000)
  452. AddZone("The Four Dragons Casino", 1817.390, 863.232, -89.084, 2027.390, 1083.230, 110.916)
  453. AddZone("Blackfield", 964.391, 1203.220, -89.084, 1197.390, 1403.220, 110.916)
  454. AddZone("Julius Thruway North", 1534.560, 2433.230, -89.084, 1848.400, 2583.230, 110.916)
  455. AddZone("Yellow Bell Gol Course", 1117.400, 2723.230, -89.084, 1457.460, 2863.230, 110.916)
  456. AddZone("Idlewood", 1812.620, -1602.310, -89.084, 2124.660, -1449.670, 110.916)
  457. AddZone("Redsands West", 1297.470, 2142.860, -89.084, 1777.390, 2243.230, 110.916)
  458. AddZone("Doherty", -2270.040, -324.114, -1.2, -1794.920, -222.589, 200.000)
  459. AddZone("Hilltop Farm", 967.383, -450.390, -3.0, 1176.780, -217.900, 200.000)
  460. AddZone("Las Barrancas", -926.130, 1398.730, -3.0, -719.234, 1634.690, 200.000)
  461. AddZone("Pirates in Men's Pants", 1817.390, 1469.230, -89.084, 2027.400, 1703.230, 110.916)
  462. AddZone("City Hall", -2867.850, 277.411, -9.1, -2593.440, 458.411, 200.000)
  463. AddZone("Avispa Country Club", -2646.400, -355.493, 0.000, -2270.040, -222.589, 200.000)
  464. AddZone("The Strip", 2027.400, 863.229, -89.084, 2087.390, 1703.230, 110.916)
  465. AddZone("Hashbury", -2593.440, -222.589, -1.0, -2411.220, 54.722, 200.000)
  466. AddZone("Los Santos International", 1852.000, -2394.330, -89.084, 2089.000, -2179.250, 110.916)
  467. AddZone("Whitewood Estates", 1098.310, 1726.220, -89.084, 1197.390, 2243.230, 110.916)
  468. AddZone("Sherman Reservoir", -789.737, 1659.680, -89.084, -599.505, 1929.410, 110.916)
  469. AddZone("El Corona", 1812.620, -2179.250, -89.084, 1970.620, -1852.870, 110.916)
  470. AddZone("Downtown", -1700.010, 744.267, -6.1, -1580.010, 1176.520, 200.000)
  471. AddZone("Foster Valley", -2178.690, -1250.970, 0.000, -1794.920, -1115.580, 200.000)
  472. AddZone("Las Payasadas", -354.332, 2580.360, 2.0, -133.625, 2816.820, 200.000)
  473. AddZone("Valle Ocultado", -936.668, 2611.440, 2.0, -715.961, 2847.900, 200.000)
  474. AddZone("Blackfield Intersection", 1166.530, 795.010, -89.084, 1375.600, 1044.690, 110.916)
  475. AddZone("Ganton", 2222.560, -1852.870, -89.084, 2632.830, -1722.330, 110.916)
  476. AddZone("Easter Bay Airport", -1213.910, -730.118, 0.000, -1132.820, -50.096, 200.000)
  477. AddZone("Redsands East", 1817.390, 2011.830, -89.084, 2106.700, 2202.760, 110.916)
  478. AddZone("Esplanade East", -1499.890, 578.396, -79.615, -1339.890, 1274.260, 20.385)
  479. AddZone("Caligula's Palace", 2087.390, 1543.230, -89.084, 2437.390, 1703.230, 110.916)
  480. AddZone("Royal Casino", 2087.390, 1383.230, -89.084, 2437.390, 1543.230, 110.916)
  481. AddZone("Richman", 72.648, -1235.070, -89.084, 321.356, -1008.150, 110.916)
  482. AddZone("Starfish Casino", 2437.390, 1783.230, -89.084, 2685.160, 2012.180, 110.916)
  483. AddZone("Mulholland", 1281.130, -452.425, -89.084, 1641.130, -290.913, 110.916)
  484. AddZone("Downtown", -1982.320, 744.170, -6.1, -1871.720, 1274.260, 200.000)
  485. AddZone("Hankypanky Point", 2576.920, 62.158, 0.000, 2759.250, 385.503, 200.000)
  486. AddZone("K.A.C.C. Military Fuels", 2498.210, 2626.550, -89.084, 2749.900, 2861.550, 110.916)
  487. AddZone("Harry Gold Parkway", 1777.390, 863.232, -89.084, 1817.390, 2342.830, 110.916)
  488. AddZone("Bayside Tunnel", -2290.190, 2548.290, -89.084, -1950.190, 2723.290, 110.916)
  489. AddZone("Ocean Docks", 2324.000, -2302.330, -89.084, 2703.580, -2145.100, 110.916)
  490. AddZone("Richman", 321.356, -1044.070, -89.084, 647.557, -860.619, 110.916)
  491. AddZone("Randolph Industrial Estate", 1558.090, 596.349, -89.084, 1823.080, 823.235, 110.916)
  492. AddZone("East Beach", 2632.830, -1852.870, -89.084, 2959.350, -1668.130, 110.916)
  493. AddZone("Flint Water", -314.426, -753.874, -89.084, -106.339, -463.073, 110.916)
  494. AddZone("Blueberry", 19.607, -404.136, 3.8, 349.607, -220.137, 200.000)
  495. AddZone("Linden Station", 2749.900, 1198.990, -89.084, 2923.390, 1548.990, 110.916)
  496. AddZone("Glen Park", 1812.620, -1350.720, -89.084, 2056.860, -1100.820, 110.916)
  497. AddZone("Downtown", -1993.280, 265.243, -9.1, -1794.920, 578.396, 200.000)
  498. AddZone("Redsands West", 1377.390, 2243.230, -89.084, 1704.590, 2433.230, 110.916)
  499. AddZone("Richman", 321.356, -1235.070, -89.084, 647.522, -1044.070, 110.916)
  500. AddZone("Gant Bridge", -2741.450, 1659.680, -6.1, -2616.400, 2175.150, 200.000)
  501. AddZone("Lil' Probe Inn", -90.218, 1286.850, -3.0, 153.859, 1554.120, 200.000)
  502. AddZone("Flint Intersection", -187.700, -1596.760, -89.084, 17.063, -1276.600, 110.916)
  503. AddZone("Las Colinas", 2281.450, -1135.040, -89.084, 2632.740, -945.035, 110.916)
  504. AddZone("Sobell Rail Yards", 2749.900, 1548.990, -89.084, 2923.390, 1937.250, 110.916)
  505. AddZone("The Emerald Isle", 2011.940, 2202.760, -89.084, 2237.400, 2508.230, 110.916)
  506. AddZone("El Castillo del Diablo", -208.570, 2123.010, -7.6, 114.033, 2337.180, 200.000)
  507. AddZone("Santa Flora", -2741.070, 458.411, -7.6, -2533.040, 793.411, 200.000)
  508. AddZone("Playa del Seville", 2703.580, -2126.900, -89.084, 2959.350, -1852.870, 110.916)
  509. AddZone("Market", 926.922, -1577.590, -89.084, 1370.850, -1416.250, 110.916)
  510. AddZone("Queens", -2593.440, 54.722, 0.000, -2411.220, 458.411, 200.000)
  511. AddZone("Pilson Intersection", 1098.390, 2243.230, -89.084, 1377.390, 2507.230, 110.916)
  512. AddZone("Spinybed", 2121.400, 2663.170, -89.084, 2498.210, 2861.550, 110.916)
  513. AddZone("Pilgrim", 2437.390, 1383.230, -89.084, 2624.400, 1783.230, 110.916)
  514. AddZone("Blackfield", 964.391, 1403.220, -89.084, 1197.390, 1726.220, 110.916)
  515. AddZone("'The Big Ear'", -410.020, 1403.340, -3.0, -137.969, 1681.230, 200.000)
  516. AddZone("Dillimore", 580.794, -674.885, -9.5, 861.085, -404.790, 200.000)
  517. AddZone("El Quebrados", -1645.230, 2498.520, 0.000, -1372.140, 2777.850, 200.000)
  518. AddZone("Esplanade North", -2533.040, 1358.900, -4.5, -1996.660, 1501.210, 200.000)
  519. AddZone("Easter Bay Airport", -1499.890, -50.096, -1.0, -1242.980, 249.904, 200.000)
  520. AddZone("Fisher's Lagoon", 1916.990, -233.323, -100.000, 2131.720, 13.800, 200.000)
  521. AddZone("Mulholland", 1414.070, -768.027, -89.084, 1667.610, -452.425, 110.916)
  522. AddZone("East Beach", 2747.740, -1498.620, -89.084, 2959.350, -1120.040, 110.916)
  523. AddZone("San Andreas Sound", 2450.390, 385.503, -100.000, 2759.250, 562.349, 200.000)
  524. AddZone("Shady Creeks", -2030.120, -2174.890, -6.1, -1820.640, -1771.660, 200.000)
  525. AddZone("Market", 1072.660, -1416.250, -89.084, 1370.850, -1130.850, 110.916)
  526. AddZone("Rockshore West", 1997.220, 596.349, -89.084, 2377.390, 823.228, 110.916)
  527. AddZone("Prickle Pine", 1534.560, 2583.230, -89.084, 1848.400, 2863.230, 110.916)
  528. AddZone("Easter Basin", -1794.920, -50.096, -1.04, -1499.890, 249.904, 200.000)
  529. AddZone("Leafy Hollow", -1166.970, -1856.030, 0.000, -815.624, -1602.070, 200.000)
  530. AddZone("LVA Freight Depot", 1457.390, 863.229, -89.084, 1777.400, 1143.210, 110.916)
  531. AddZone("Prickle Pine", 1117.400, 2507.230, -89.084, 1534.560, 2723.230, 110.916)
  532. AddZone("Blueberry", 104.534, -220.137, 2.3, 349.607, 152.236, 200.000)
  533. AddZone("El Castillo del Diablo", -464.515, 2217.680, 0.000, -208.570, 2580.360, 200.000)
  534. AddZone("Downtown", -2078.670, 578.396, -7.6, -1499.890, 744.267, 200.000)
  535. AddZone("Rockshore East", 2537.390, 676.549, -89.084, 2902.350, 943.235, 110.916)
  536. AddZone("San Fierro Bay", -2616.400, 1501.210, -3.0, -1996.660, 1659.680, 200.000)
  537. AddZone("Paradiso", -2741.070, 793.411, -6.1, -2533.040, 1268.410, 200.000)
  538. AddZone("The Camel's Toe", 2087.390, 1203.230, -89.084, 2640.400, 1383.230, 110.916)
  539. AddZone("Old Venturas Strip", 2162.390, 2012.180, -89.084, 2685.160, 2202.760, 110.916)
  540. AddZone("Juniper Hill", -2533.040, 578.396, -7.6, -2274.170, 968.369, 200.000)
  541. AddZone("Juniper Hollow", -2533.040, 968.369, -6.1, -2274.170, 1358.900, 200.000)
  542. AddZone("Roca Escalante", 2237.400, 2202.760, -89.084, 2536.430, 2542.550, 110.916)
  543. AddZone("Julius Thruway East", 2685.160, 1055.960, -89.084, 2749.900, 2626.550, 110.916)
  544. AddZone("Verona Beach", 647.712, -2173.290, -89.084, 930.221, -1804.210, 110.916)
  545. AddZone("Foster Valley", -2178.690, -599.884, -1.2, -1794.920, -324.114, 200.000)
  546. AddZone("Arco del Oeste", -901.129, 2221.860, 0.000, -592.090, 2571.970, 200.000)
  547. AddZone("Fallen Tree", -792.254, -698.555, -5.3, -452.404, -380.043, 200.000)
  548. AddZone("The Farm", -1209.670, -1317.100, 114.981, -908.161, -787.391, 251.981)
  549. AddZone("The Sherman Dam", -968.772, 1929.410, -3.0, -481.126, 2155.260, 200.000)
  550. AddZone("Esplanade North", -1996.660, 1358.900, -4.5, -1524.240, 1592.510, 200.000)
  551. AddZone("Financial", -1871.720, 744.170, -6.1, -1701.300, 1176.420, 300.000)
  552. AddZone("Garcia", -2411.220, -222.589, -1.14, -2173.040, 265.243, 200.000)
  553. AddZone("Montgomery", 1119.510, 119.526, -3.0, 1451.400, 493.323, 200.000)
  554. AddZone("Creek", 2749.900, 1937.250, -89.084, 2921.620, 2669.790, 110.916)
  555. AddZone("Los Santos International", 1249.620, -2394.330, -89.084, 1852.000, -2179.250, 110.916)
  556. AddZone("Santa Maria Beach", 72.648, -2173.290, -89.084, 342.648, -1684.650, 110.916)
  557. AddZone("Mulholland Intersection", 1463.900, -1150.870, -89.084, 1812.620, -768.027, 110.916)
  558. AddZone("Angel Pine", -2324.940, -2584.290, -6.1, -1964.220, -2212.110, 200.000)
  559. AddZone("Verdant Meadows", 37.032, 2337.180, -3.0, 435.988, 2677.900, 200.000)
  560. AddZone("Octane Springs", 338.658, 1228.510, 0.000, 664.308, 1655.050, 200.000)
  561. AddZone("Come-A-Lot", 2087.390, 943.235, -89.084, 2623.180, 1203.230, 110.916)
  562. AddZone("Redsands West", 1236.630, 1883.110, -89.084, 1777.390, 2142.860, 110.916)
  563. AddZone("Santa Maria Beach", 342.648, -2173.290, -89.084, 647.712, -1684.650, 110.916)
  564. AddZone("Verdant Bluffs", 1249.620, -2179.250, -89.084, 1692.620, -1842.270, 110.916)
  565. AddZone("Las Venturas Airport", 1236.630, 1203.280, -89.084, 1457.370, 1883.110, 110.916)
  566. AddZone("Flint Range", -594.191, -1648.550, 0.000, -187.700, -1276.600, 200.000)
  567. AddZone("Verdant Bluffs", 930.221, -2488.420, -89.084, 1249.620, -2006.780, 110.916)
  568. AddZone("Palomino Creek", 2160.220, -149.004, 0.000, 2576.920, 228.322, 200.000)
  569. AddZone("Ocean Docks", 2373.770, -2697.090, -89.084, 2809.220, -2330.460, 110.916)
  570. AddZone("Easter Bay Airport", -1213.910, -50.096, -4.5, -947.980, 578.396, 200.000)
  571. AddZone("Whitewood Estates", 883.308, 1726.220, -89.084, 1098.310, 2507.230, 110.916)
  572. AddZone("Calton Heights", -2274.170, 744.170, -6.1, -1982.320, 1358.900, 200.000)
  573. AddZone("Easter Basin", -1794.920, 249.904, -9.1, -1242.980, 578.396, 200.000)
  574. AddZone("Los Santos Inlet", -321.744, -2224.430, -89.084, 44.615, -1724.430, 110.916)
  575. AddZone("Doherty", -2173.040, -222.589, -1.0, -1794.920, 265.243, 200.000)
  576. AddZone("Mount Chiliad", -2178.690, -2189.910, -47.917, -2030.120, -1771.660, 576.083)
  577. AddZone("Fort Carson", -376.233, 826.326, -3.0, 123.717, 1220.440, 200.000)
  578. AddZone("Foster Valley", -2178.690, -1115.580, 0.000, -1794.920, -599.884, 200.000)
  579. AddZone("Ocean Flats", -2994.490, -222.589, -1.0, -2593.440, 277.411, 200.000)
  580. AddZone("Fern Ridge", 508.189, -139.259, 0.000, 1306.660, 119.526, 200.000)
  581. AddZone("Bayside", -2741.070, 2175.150, 0.000, -2353.170, 2722.790, 200.000)
  582. AddZone("Las Venturas Airport", 1457.370, 1203.280, -89.084, 1777.390, 1883.110, 110.916)
  583. AddZone("Blueberry Acres", -319.676, -220.137, 0.000, 104.534, 293.324, 200.000)
  584. AddZone("Palisades", -2994.490, 458.411, -6.1, -2741.070, 1339.610, 200.000)
  585. AddZone("North Rock", 2285.370, -768.027, 0.000, 2770.590, -269.740, 200.000)
  586. AddZone("Hunter Quarry", 337.244, 710.840, -115.239, 860.554, 1031.710, 203.761)
  587. AddZone("Los Santos International", 1382.730, -2730.880, -89.084, 2201.820, -2394.330, 110.916)
  588. AddZone("Missionary Hill", -2994.490, -811.276, 0.000, -2178.690, -430.276, 200.000)
  589. AddZone("San Fierro Bay", -2616.400, 1659.680, -3.0, -1996.660, 2175.150, 200.000)
  590. AddZone("Restricted Area", -91.586, 1655.050, -50.000, 421.234, 2123.010, 250.000)
  591. AddZone("Mount Chiliad", -2997.470, -1115.580, -47.917, -2178.690, -971.913, 576.083)
  592. AddZone("Mount Chiliad", -2178.690, -1771.660, -47.917, -1936.120, -1250.970, 576.083)
  593. AddZone("Easter Bay Airport", -1794.920, -730.118, -3.0, -1213.910, -50.096, 200.000)
  594. AddZone("The Panopticon", -947.980, -304.320, -1.1, -319.676, 327.071, 200.000)
  595. AddZone("Shady Creeks", -1820.640, -2643.680, -8.0, -1226.780, -1771.660, 200.000)
  596. AddZone("Back o Beyond", -1166.970, -2641.190, 0.000, -321.744, -1856.030, 200.000)
  597. AddZone("Mount Chiliad", -2994.490, -2189.910, -47.917, -2178.690, -1115.580, 576.083)
  598. AddZone("Tierra Robada", -1213.910, 596.349, -242.990, -480.539, 1659.680, 900.000)
  599. AddZone("Flint County", -1213.910, -2892.970, -242.990, 44.615, -768.027, 900.000)
  600. AddZone("Whetstone", -2997.470, -2892.970, -242.990, -1213.910, -1115.580, 900.000)
  601. AddZone("Bone County", -480.539, 596.349, -242.990, 869.461, 2993.870, 900.000)
  602. AddZone("Tierra Robada", -2997.470, 1659.680, -242.990, -480.539, 2993.870, 900.000)
  603. AddZone("San Fierro", -2997.470, -1115.580, -242.990, -1213.910, 1659.680, 900.000)
  604. AddZone("Las Venturas", 869.461, 596.349, -242.990, 2997.060, 2993.870, 900.000)
  605. AddZone("Red County", -1213.910, -768.027, -242.990, 2997.060, 596.349, 900.000)
  606. AddZone("Los Santos", 44.615, -2892.970, -242.990, 2997.060, -768.027, 900.000)
  607. }
  608. calculateZone(posX, posY, posZ) {
  609. if ( bInitZaC == 0 )
  610. {
  611. initZonesAndCities()
  612. bInitZaC := 1
  613. }
  614. Loop % nZone-1
  615. {
  616. if (posX >= zone%A_Index%_x1) && (posY >= zone%A_Index%_y1) && (posZ >= zone%A_Index%_z1) && (posX <= zone%A_Index%_x2) && (posY <= zone%A_Index%_y2) && (posZ <= zone%A_Index%_z2)
  617. {
  618. ErrorLevel := ERROR_OK
  619. return zone%A_Index%_name
  620. }
  621. }
  622. ErrorLevel := ERROR_ZONE_NOT_FOUND
  623. return "Unbekannt"
  624. }
  625. calculateCity(posX, posY, posZ) {
  626. if ( bInitZaC == 0 )
  627. {
  628. initZonesAndCities()
  629. bInitZaC := 1
  630. }
  631. smallestCity := "Unbekannt"
  632. currentCitySize := 0
  633. smallestCitySize := 0
  634. Loop % nCity-1
  635. {
  636. if (posX >= city%A_Index%_x1) && (posY >= city%A_Index%_y1) && (posZ >= city%A_Index%_z1) && (posX <= city%A_Index%_x2) && (posY <= city%A_Index%_y2) && (posZ <= city%A_Index%_z2)
  637. {
  638. currentCitySize := ((city%A_Index%_x2 - city%A_Index%_x1) * (city%A_Index%_y2 - city%A_Index%_y1) * (city%A_Index%_z2 - city%A_Index%_z1))
  639. if (smallestCity == "Unbekannt") || (currentCitySize < smallestCitySize)
  640. {
  641. smallestCity := city%A_Index%_name
  642. smallestCitySize := currentCitySize
  643. }
  644. }
  645. }
  646. if(smallestCity == "Unbekannt") {
  647. ErrorLevel := ERROR_CITY_NOT_FOUND
  648. } else {
  649. ErrorLevel := ERROR_OK
  650. }
  651. return smallestCity
  652. }
  653. AddZone(sName, x1, y1, z1, x2, y2, z2) {
  654. global
  655. zone%nZone%_name := sName
  656. zone%nZone%_x1 := x1
  657. zone%nZone%_y1 := y1
  658. zone%nZone%_z1 := z1
  659. zone%nZone%_x2 := x2
  660. zone%nZone%_y2 := y2
  661. zone%nZone%_z2 := z2
  662. nZone := nZone + 1
  663. }
  664. AddCity(sName, x1, y1, z1, x2, y2, z2) {
  665. global
  666. city%nCity%_name := sName
  667. city%nCity%_x1 := x1
  668. city%nCity%_y1 := y1
  669. city%nCity%_z1 := z1
  670. city%nCity%_x2 := x2
  671. city%nCity%_y2 := y2
  672. city%nCity%_z2 := z2
  673. nCity := nCity + 1
  674. }
  675. getPlayerInteriorId() {
  676. if(!checkHandles())
  677. return -1
  678. iid := readMem(hGTA, ADDR_CPED_INTID, 4, "Int")
  679. if(ErrorLevel) {
  680. ErrorLevel := ERROR_READ_MEMORY
  681. return -1
  682. }
  683. ErrorLevel := ERROR_OK
  684. return iid
  685. }
  686. getPlayerZone()
  687. {
  688. aktPos := getCoordinates()
  689. return calculateZone(aktPos[1], aktPos[2], aktPos[3])
  690. }
  691. getPlayerCity()
  692. {
  693. aktPos := getCoordinates()
  694. return calculateCity(aktPos[1], aktPos[2], aktPos[3])
  695. }
  696. checkHandles() {
  697. if(iRefreshHandles+500>A_TickCount)
  698. return true
  699. iRefreshHandles:=A_TickCount
  700. if(!refreshGTA() || !refreshSAMP() || !refreshMemory()) {
  701. return false
  702. } else {
  703. return true
  704. }
  705. return true
  706. }
  707. refreshGTA() {
  708. newPID := getPID("GTA:SA:MP")
  709. if(!newPID) {
  710. if(hGTA) {
  711. virtualFreeEx(hGTA, pMemory, 0, 0x8000)
  712. closeProcess(hGTA)
  713. hGTA := 0x0
  714. }
  715. dwGTAPID := 0
  716. hGTA := 0x0
  717. dwSAMP := 0x0
  718. pMemory := 0x0
  719. return false
  720. }
  721. if(!hGTA || (dwGTAPID != newPID)) {
  722. hGTA := openProcess(newPID)
  723. if(ErrorLevel) {
  724. dwGTAPID := 0
  725. hGTA := 0x0
  726. dwSAMP := 0x0
  727. pMemory := 0x0
  728. return false
  729. }
  730. dwGTAPID := newPID
  731. dwSAMP := 0x0
  732. pMemory := 0x0
  733. return true
  734. }
  735. return true
  736. }
  737. refreshSAMP() {
  738. if(dwSAMP)
  739. return true
  740. dwSAMP := getModuleBaseAddress("samp.dll", hGTA)
  741. if(!dwSAMP)
  742. return false
  743. return true
  744. }
  745. refreshMemory() {
  746. if(!pMemory) {
  747. pMemory := virtualAllocEx(hGTA, 6144, 0x1000 | 0x2000, 0x40)
  748. if(ErrorLevel) {
  749. pMemory := 0x0
  750. return false
  751. }
  752. pParam1 := pMemory
  753. pParam2 := pMemory + 1024
  754. pParam3 := pMemory + 2048
  755. pParam4 := pMemory + 3072
  756. pParam5 := pMemory + 4096
  757. pInjectFunc := pMemory + 5120
  758. }
  759. return true
  760. }
  761. getPID(szWindow) {
  762. local dwPID := 0
  763. WinGet, dwPID, PID, %szWindow%
  764. return dwPID
  765. }
  766. openProcess(dwPID, dwRights = 0x1F0FFF) {
  767. hProcess := DllCall("OpenProcess"
  768. , "UInt", dwRights
  769. , "int", 0
  770. , "UInt", dwPID
  771. , "Uint")
  772. if(hProcess == 0) {
  773. ErrorLevel := ERROR_OPEN_PROCESS
  774. return 0
  775. }
  776. ErrorLevel := ERROR_OK
  777. return hProcess
  778. }
  779. closeProcess(hProcess) {
  780. if(hProcess == 0) {
  781. ErrorLevel := ERROR_INVALID_HANDLE
  782. return 0
  783. }
  784. dwRet := DllCall( "CloseHandle"
  785. , "Uint", hProcess
  786. , "UInt")
  787. ErrorLevel := ERROR_OK
  788. }
  789. getModuleBaseAddress(sModule, hProcess) {
  790. if(!sModule) {
  791. ErrorLevel := ERROR_MODULE_NOT_FOUND
  792. return 0
  793. }
  794. if(!hProcess) {
  795. ErrorLevel := ERROR_INVALID_HANDLE
  796. return 0
  797. }
  798. dwSize = 1024*4
  799. VarSetCapacity(hMods, dwSize)
  800. VarSetCapacity(cbNeeded, 4)
  801. dwRet := DllCall( "Psapi.dll\EnumProcessModules"
  802. , "UInt", hProcess
  803. , "UInt", &hMods
  804. , "UInt", dwSize
  805. , "UInt*", cbNeeded
  806. , "UInt")
  807. if(dwRet == 0) {
  808. ErrorLevel := ERROR_ENUM_PROCESS_MODULES
  809. return 0
  810. }
  811. dwMods := cbNeeded / 4
  812. i := 0
  813. VarSetCapacity(hModule, 4)
  814. VarSetCapacity(sCurModule, 260)
  815. while(i < dwMods) {
  816. hModule := NumGet(hMods, i*4)
  817. DllCall("Psapi.dll\GetModuleFileNameEx"
  818. , "UInt", hProcess
  819. , "UInt", hModule
  820. , "Str", sCurModule
  821. , "UInt", 260)
  822. SplitPath, sCurModule, sFilename
  823. if(sModule == sFilename) {
  824. ErrorLevel := ERROR_OK
  825. return hModule
  826. }
  827. i := i + 1
  828. }
  829. ErrorLevel := ERROR_MODULE_NOT_FOUND
  830. return 0
  831. }
  832. readString(hProcess, dwAddress, dwLen) {
  833. if(!hProcess) {
  834. ErrorLevel := ERROR_INVALID_HANDLE
  835. return 0
  836. }
  837. VarSetCapacity(sRead, dwLen)
  838. dwRet := DllCall( "ReadProcessMemory"
  839. , "UInt", hProcess
  840. , "UInt", dwAddress
  841. , "Str", sRead
  842. , "UInt", dwLen
  843. , "UInt*", 0
  844. , "UInt")
  845. if(dwRet == 0) {
  846. ErrorLevel := ERROR_READ_MEMORY
  847. return 0
  848. }
  849. ErrorLevel := ERROR_OK
  850. if A_IsUnicode
  851. return __ansiToUnicode(sRead)
  852. return sRead
  853. }
  854. readFloat(hProcess, dwAddress) {
  855. if(!hProcess) {
  856. ErrorLevel := ERROR_INVALID_HANDLE
  857. return 0
  858. }
  859. VarSetCapacity(dwRead, 4)
  860. dwRet := DllCall( "ReadProcessMemory"
  861. , "UInt", hProcess
  862. , "UInt", dwAddress
  863. , "Str", dwRead
  864. , "UInt", 4
  865. , "UInt*", 0
  866. , "UInt")
  867. if(dwRet == 0) {
  868. ErrorLevel := ERROR_READ_MEMORY
  869. return 0
  870. }
  871. ErrorLevel := ERROR_OK
  872. return NumGet(dwRead, 0, "Float")
  873. }
  874. readDWORD(hProcess, dwAddress) {
  875. if(!hProcess) {
  876. ErrorLevel := ERROR_INVALID_HANDLE
  877. return 0
  878. }
  879. VarSetCapacity(dwRead, 4)
  880. dwRet := DllCall( "ReadProcessMemory"
  881. , "UInt", hProcess
  882. , "UInt", dwAddress
  883. , "Str", dwRead
  884. , "UInt", 4
  885. , "UInt*", 0)
  886. if(dwRet == 0) {
  887. ErrorLevel := ERROR_READ_MEMORY
  888. return 0
  889. }
  890. ErrorLevel := ERROR_OK
  891. return NumGet(dwRead, 0, "UInt")
  892. }
  893. readMem(hProcess, dwAddress, dwLen=4, type="UInt") {
  894. if(!hProcess) {
  895. ErrorLevel := ERROR_INVALID_HANDLE
  896. return 0
  897. }
  898. VarSetCapacity(dwRead, dwLen)
  899. dwRet := DllCall( "ReadProcessMemory"
  900. , "UInt", hProcess
  901. , "UInt", dwAddress
  902. , "Str", dwRead
  903. , "UInt", dwLen
  904. , "UInt*", 0)
  905. if(dwRet == 0) {
  906. ErrorLevel := ERROR_READ_MEMORY
  907. return 0
  908. }
  909. ErrorLevel := ERROR_OK
  910. return NumGet(dwRead, 0, type)
  911. }
  912. writeString(hProcess, dwAddress, wString) {
  913. if(!hProcess) {
  914. ErrorLevel := ERROR_INVALID_HANDLE
  915. return false
  916. }
  917. sString := wString
  918. if A_IsUnicode
  919. sString := __unicodeToAnsi(wString)
  920. dwRet := DllCall( "WriteProcessMemory"
  921. , "UInt", hProcess
  922. , "UInt", dwAddress
  923. , "Str", sString
  924. , "UInt", StrLen(wString) + 1
  925. , "UInt", 0
  926. , "UInt")
  927. if(dwRet == 0) {
  928. ErrorLEvel := ERROR_WRITE_MEMORY
  929. return false
  930. }
  931. ErrorLevel := ERROR_OK
  932. return true
  933. }
  934. getPlayerIdByName(wName) {
  935. wName := "" wName
  936. if(StrLen(wName) < 1 || StrLen(wName) > 20)
  937. return -1
  938. if(iRefreshScoreboard+iUpdateTick > A_TickCount)
  939. {
  940. For i, o in oScoreboardData
  941. {
  942. if(InStr(o.NAME,wName)==1)
  943. return i
  944. }
  945. return -1
  946. }
  947. if(!updateOScoreboardData())
  948. return -1
  949. For i, o in oScoreboardData
  950. {
  951. if(InStr(o.NAME,wName)==1)
  952. return i
  953. }
  954. return -1
  955. }
  956. getPlayerPingById(dwId) {
  957. dwId += 0
  958. dwId := Floor(dwId)
  959. if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
  960. return -1
  961. if(iRefreshScoreboard+iUpdateTick > A_TickCount)
  962. {
  963. if(oScoreboardData[dwId])
  964. return oScoreboardData[dwId].PING
  965. return -1
  966. }
  967. if(!updateOScoreboardData())
  968. return -1
  969. if(oScoreboardData[dwId])
  970. return oScoreboardData[dwId].PING
  971. return -1
  972. }
  973. updateScoreboardDataEx() {
  974. if(!checkHandles())
  975. return false
  976. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  977. if(ErrorLevel || dwAddress==0) {
  978. ErrorLevel := ERROR_READ_MEMORY
  979. return false
  980. }
  981. dwFunc := dwSAMP + FUNC_UPDATESCOREBOARD
  982. VarSetCapacity(injectData, 11, 0)
  983. NumPut(0xB9, injectData, 0, "UChar")
  984. NumPut(dwAddress, injectData, 1, "UInt")
  985. NumPut(0xE8, injectData, 5, "UChar")
  986. offset := dwFunc - (pInjectFunc + 10)
  987. NumPut(offset, injectData, 6, "Int")
  988. NumPut(0xC3, injectData, 10, "UChar")
  989. writeRaw(hGTA, pInjectFunc, &injectData, 11)
  990. if(ErrorLevel)
  991. return false
  992. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  993. if(ErrorLevel)
  994. return false
  995. waitForSingleObject(hThread, 0xFFFFFFFF)
  996. closeProcess(hThread)
  997. return true
  998. }
  999. updateOScoreboardData() {
  1000. if(!checkHandles())
  1001. return 0
  1002. oScoreboardData := []
  1003. if(!updateScoreboardDataEx())
  1004. return 0
  1005. iRefreshScoreboard := A_TickCount
  1006. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1007. if(ErrorLevel || dwAddress==0) {
  1008. ErrorLevel := ERROR_READ_MEMORY
  1009. return 0
  1010. }
  1011. dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
  1012. if(ErrorLevel || dwAddress==0) {
  1013. ErrorLevel := ERROR_READ_MEMORY
  1014. return 0
  1015. }
  1016. dwPlayers := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
  1017. if(ErrorLevel || dwPlayers==0) {
  1018. ErrorLevel := ERROR_READ_MEMORY
  1019. return 0
  1020. }
  1021. wID := readMem(hGTA, dwPlayers + SAMP_SLOCALPLAYERID_OFFSET, 2, "Short")
  1022. if(ErrorLevel) {
  1023. ErrorLevel := ERROR_READ_MEMORY
  1024. return 0
  1025. }
  1026. dwPing := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERPING_OFFSET, 4, "Int")
  1027. if(ErrorLevel) {
  1028. ErrorLevel := ERROR_READ_MEMORY
  1029. return 0
  1030. }
  1031. dwScore := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERSCORE_OFFSET, 4, "Int")
  1032. if(ErrorLevel) {
  1033. ErrorLevel := ERROR_READ_MEMORY
  1034. return 0
  1035. }
  1036. dwTemp := readMem(hGTA, dwPlayers + SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET, 4, "Int")
  1037. if(ErrorLevel) {
  1038. ErrorLevel := ERROR_READ_MEMORY
  1039. return 0
  1040. }
  1041. sUsername := ""
  1042. if(dwTemp <= 0xf) {
  1043. sUsername := readString(hGTA, dwPlayers + SAMP_SZLOCALPLAYERNAME_OFFSET, 16)
  1044. if(ErrorLevel) {
  1045. ErrorLevel := ERROR_READ_MEMORY
  1046. return 0
  1047. }
  1048. }
  1049. else {
  1050. dwAddress := readDWORD(hGTA, dwPlayers + SAMP_PSZLOCALPLAYERNAME_OFFSET)
  1051. if(ErrorLevel) {
  1052. ErrorLevel := ERROR_READ_MEMORY
  1053. return 0
  1054. }
  1055. sUsername := readString(hGTA, dwAddress, 25)
  1056. if(ErrorLevel) {
  1057. ErrorLevel := ERROR_READ_MEMORY
  1058. return 0
  1059. }
  1060. }
  1061. oScoreboardData[wID] := Object("NAME", sUsername, "ID", wID, "PING", dwPing, "SCORE", dwScore, "ISNPC", 0)
  1062. Loop, % SAMP_PLAYER_MAX
  1063. {
  1064. i := A_Index-1
  1065. dwRemoteplayer := readDWORD(hGTA, dwPlayers+SAMP_PREMOTEPLAYER_OFFSET+i*4)
  1066. if(ErrorLevel) {
  1067. ErrorLevel := ERROR_READ_MEMORY
  1068. return 0
  1069. }
  1070. if(dwRemoteplayer==0)
  1071. continue
  1072. dwPing := readMem(hGTA, dwRemoteplayer + SAMP_IPING_OFFSET, 4, "Int")
  1073. if(ErrorLevel) {
  1074. ErrorLevel := ERROR_READ_MEMORY
  1075. return 0
  1076. }
  1077. dwScore := readMem(hGTA, dwRemoteplayer + SAMP_ISCORE_OFFSET, 4, "Int")
  1078. if(ErrorLevel) {
  1079. ErrorLevel := ERROR_READ_MEMORY
  1080. return 0
  1081. }
  1082. dwIsNPC := readMem(hGTA, dwRemoteplayer + SAMP_ISNPC_OFFSET, 4, "Int")
  1083. if(ErrorLevel) {
  1084. ErrorLevel := ERROR_READ_MEMORY
  1085. return 0
  1086. }
  1087. dwTemp := readMem(hGTA, dwRemoteplayer + SAMP_ISTRLENNAME___OFFSET, 4, "Int")
  1088. if(ErrorLevel) {
  1089. ErrorLevel := ERROR_READ_MEMORY
  1090. return 0
  1091. }
  1092. sUsername := ""
  1093. if(dwTemp <= 0xf)
  1094. {
  1095. sUsername := readString(hGTA, dwRemoteplayer+SAMP_SZPLAYERNAME_OFFSET, 16)
  1096. if(ErrorLevel) {
  1097. ErrorLevel := ERROR_READ_MEMORY
  1098. return 0
  1099. }
  1100. }
  1101. else {
  1102. dwAddress := readDWORD(hGTA, dwRemoteplayer + SAMP_PSZPLAYERNAME_OFFSET)
  1103. if(ErrorLevel || dwAddress==0) {
  1104. ErrorLevel := ERROR_READ_MEMORY
  1105. return 0
  1106. }
  1107. sUsername := readString(hGTA, dwAddress, 25)
  1108. if(ErrorLevel) {
  1109. ErrorLevel := ERROR_READ_MEMORY
  1110. return 0
  1111. }
  1112. }
  1113. o := Object("NAME", sUsername, "ID", i, "PING", dwPing, "SCORE", dwScore, "ISNPC", dwIsNPC)
  1114. oScoreboardData[i] := o
  1115. }
  1116. ErrorLevel := ERROR_OK
  1117. return 1
  1118. }
  1119. writeRaw(hProcess, dwAddress, pBuffer, dwLen) {
  1120. if(!hProcess) {
  1121. ErrorLevel := ERROR_INVALID_HANDLE
  1122. return false
  1123. }
  1124. dwRet := DllCall( "WriteProcessMemory"
  1125. , "UInt", hProcess
  1126. , "UInt", dwAddress
  1127. , "UInt", pBuffer
  1128. , "UInt", dwLen
  1129. , "UInt", 0
  1130. , "UInt")
  1131. if(dwRet == 0) {
  1132. ErrorLEvel := ERROR_WRITE_MEMORY
  1133. return false
  1134. }
  1135. ErrorLevel := ERROR_OK
  1136. return true
  1137. }
  1138. callWithParams(hProcess, dwFunc, aParams, bCleanupStack = true) {
  1139. if(!hProcess) {
  1140. ErrorLevel := ERROR_INVALID_HANDLE
  1141. return false
  1142. }
  1143. validParams := 0
  1144. i := aParams.MaxIndex()
  1145. dwLen := i * 5 + 5 + 1
  1146. if(bCleanupStack)
  1147. dwLen += 3
  1148. VarSetCapacity(injectData, i * 5 + 5 + 3 + 1, 0)
  1149. i_ := 1
  1150. while(i > 0) {
  1151. if(aParams[i][1] != "") {
  1152. dwMemAddress := 0x0
  1153. if(aParams[i][1] == "p") {
  1154. dwMemAddress := aParams[i][2]
  1155. } else if(aParams[i][1] == "s") {
  1156. if(i_>3)
  1157. return false
  1158. dwMemAddress := pParam%i_%
  1159. writeString(hProcess, dwMemAddress, aParams[i][2])
  1160. if(ErrorLevel)
  1161. return false
  1162. i_ += 1
  1163. } else if(aParams[i][1] == "i") {
  1164. dwMemAddress := aParams[i][2]
  1165. } else {
  1166. return false
  1167. }
  1168. NumPut(0x68, injectData, validParams * 5, "UChar")
  1169. NumPut(dwMemAddress, injectData, validParams * 5 + 1, "UInt")
  1170. validParams += 1
  1171. }
  1172. i -= 1
  1173. }
  1174. offset := dwFunc - ( pInjectFunc + validParams * 5 + 5 )
  1175. NumPut(0xE8, injectData, validParams * 5, "UChar")
  1176. NumPut(offset, injectData, validParams * 5 + 1, "Int")
  1177. if(bCleanupStack) {
  1178. NumPut(0xC483, injectData, validParams * 5 + 5, "UShort")
  1179. NumPut(validParams*4, injectData, validParams * 5 + 7, "UChar")
  1180. NumPut(0xC3, injectData, validParams * 5 + 8, "UChar")
  1181. } else {
  1182. NumPut(0xC3, injectData, validParams * 5 + 5, "UChar")
  1183. }
  1184. writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
  1185. if(ErrorLevel)
  1186. return false
  1187. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1188. if(ErrorLevel)
  1189. return false
  1190. waitForSingleObject(hThread, 0xFFFFFFFF)
  1191. closeProcess(hThread)
  1192. return true
  1193. }
  1194. virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect) {
  1195. if(!hProcess) {
  1196. ErrorLevel := ERROR_INVALID_HANDLE
  1197. return 0
  1198. }
  1199. dwRet := DllCall( "VirtualAllocEx"
  1200. , "UInt", hProcess
  1201. , "UInt", 0
  1202. , "UInt", dwSize
  1203. , "UInt", flAllocationType
  1204. , "UInt", flProtect
  1205. , "UInt")
  1206. if(dwRet == 0) {
  1207. ErrorLEvel := ERROR_ALLOC_MEMORY
  1208. return 0
  1209. }
  1210. ErrorLevel := ERROR_OK
  1211. return dwRet
  1212. }
  1213. virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType) {
  1214. if(!hProcess) {
  1215. ErrorLevel := ERROR_INVALID_HANDLE
  1216. return 0
  1217. }
  1218. dwRet := DllCall( "VirtualFreeEx"
  1219. , "UInt", hProcess
  1220. , "UInt", lpAddress
  1221. , "UInt", dwSize
  1222. , "UInt", dwFreeType
  1223. , "UInt")
  1224. if(dwRet == 0) {
  1225. ErrorLEvel := ERROR_FREE_MEMORY
  1226. return 0
  1227. }
  1228. ErrorLevel := ERROR_OK
  1229. return dwRet
  1230. }
  1231. createRemoteThread(hProcess, lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId) {
  1232. if(!hProcess) {
  1233. ErrorLevel := ERROR_INVALID_HANDLE
  1234. return 0
  1235. }
  1236. dwRet := DllCall( "CreateRemoteThread"
  1237. , "UInt", hProcess
  1238. , "UInt", lpThreadAttributes
  1239. , "UInt", dwStackSize
  1240. , "UInt", lpStartAddress
  1241. , "UInt", lpParameter
  1242. , "UInt", dwCreationFlags
  1243. , "UInt", lpThreadId
  1244. , "UInt")
  1245. if(dwRet == 0) {
  1246. ErrorLEvel := ERROR_ALLOC_MEMORY
  1247. return 0
  1248. }
  1249. ErrorLevel := ERROR_OK
  1250. return dwRet
  1251. }
  1252. waitForSingleObject(hThread, dwMilliseconds) {
  1253. if(!hThread) {
  1254. ErrorLevel := ERROR_INVALID_HANDLE
  1255. return 0
  1256. }
  1257. dwRet := DllCall( "WaitForSingleObject"
  1258. , "UInt", hThread
  1259. , "UInt", dwMilliseconds
  1260. , "UInt")
  1261. if(dwRet == 0xFFFFFFFF) {
  1262. ErrorLEvel := ERROR_WAIT_FOR_OBJECT
  1263. return 0
  1264. }
  1265. ErrorLevel := ERROR_OK
  1266. return dwRet
  1267. }
  1268. __ansiToUnicode(sString, nLen = 0) {
  1269. If !nLen
  1270. {
  1271. nLen := DllCall("MultiByteToWideChar"
  1272. , "Uint", 0
  1273. , "Uint", 0
  1274. , "Uint", &sString
  1275. , "int", -1
  1276. , "Uint", 0
  1277. , "int", 0)
  1278. }
  1279. VarSetCapacity(wString, nLen * 2)
  1280. DllCall("MultiByteToWideChar"
  1281. , "Uint", 0
  1282. , "Uint", 0
  1283. , "Uint", &sString
  1284. , "int", -1
  1285. , "Uint", &wString
  1286. , "int", nLen)
  1287. return wString
  1288. }
  1289. __unicodeToAnsi(wString, nLen = 0) {
  1290. pString := wString + 1 > 65536 ? wString : &wString
  1291. If !nLen
  1292. {
  1293. nLen := DllCall("WideCharToMultiByte"
  1294. , "Uint", 0
  1295. , "Uint", 0
  1296. , "Uint", pString
  1297. , "int", -1
  1298. , "Uint", 0
  1299. , "int", 0
  1300. , "Uint", 0
  1301. , "Uint", 0)
  1302. }
  1303. VarSetCapacity(sString, nLen)
  1304. DllCall("WideCharToMultiByte"
  1305. , "Uint", 0
  1306. , "Uint", 0
  1307. , "Uint", pString
  1308. , "int", -1
  1309. , "str", sString
  1310. , "int", nLen
  1311. , "Uint", 0
  1312. , "Uint", 0)
  1313. return sString
  1314. }
  1315. restartGameEx() {
  1316. if(!checkHandles())
  1317. return -1
  1318. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1319. if(ErrorLevel || dwAddress==0) {
  1320. ErrorLevel := ERROR_READ_MEMORY
  1321. return -1
  1322. }
  1323. dwFunc := dwSAMP + 0xA060
  1324. VarSetCapacity(injectData, 11, 0)
  1325. NumPut(0xB9, injectData, 0, "UChar")
  1326. NumPut(dwAddress, injectData, 1, "UInt")
  1327. NumPut(0xE8, injectData, 5, "UChar")
  1328. offset := dwFunc - (pInjectFunc + 10)
  1329. NumPut(offset, injectData, 6, "Int")
  1330. NumPut(0xC3, injectData, 10, "UChar")
  1331. writeRaw(hGTA, pInjectFunc, &injectData, 11)
  1332. if(ErrorLevel)
  1333. return false
  1334. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1335. if(ErrorLevel)
  1336. return false
  1337. waitForSingleObject(hThread, 0xFFFFFFFF)
  1338. return true
  1339. }
  1340. disconnectEx() {
  1341. if(!checkHandles())
  1342. return 0
  1343. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1344. if(ErrorLevel || dwAddress==0) {
  1345. ErrorLevel := ERROR_READ_MEMORY
  1346. return 0
  1347. }
  1348. dwAddress := readDWORD(hGTA, dwAddress + 0x3c9)
  1349. if(ErrorLevel || dwAddress==0) {
  1350. ErrorLevel := ERROR_READ_MEMORY
  1351. return 0
  1352. }
  1353. ecx := dwAddress
  1354. dwAddress := readDWORD(hGTA, dwAddress)
  1355. if(ErrorLevel || dwAddress==0) {
  1356. ErrorLevel := ERROR_READ_MEMORY
  1357. return 0
  1358. }
  1359. VarSetCapacity(injectData, 24, 0)
  1360. NumPut(0xB9, injectData, 0, "UChar")
  1361. NumPut(ecx, injectData, 1, "UInt")
  1362. NumPut(0xB8, injectData, 5, "UChar")
  1363. NumPut(dwAddress, injectData, 6, "UInt")
  1364. NumPut(0x68, injectData, 10, "UChar")
  1365. NumPut(0, injectData, 11, "UInt")
  1366. NumPut(0x68, injectData, 15, "UChar")
  1367. NumPut(500, injectData, 16, "UInt")
  1368. NumPut(0x50FF, injectData, 20, "UShort")
  1369. NumPut(0x08, injectData, 22, "UChar")
  1370. NumPut(0xC3, injectData, 23, "UChar")
  1371. writeRaw(hGTA, pInjectFunc, &injectData, 24)
  1372. if(ErrorLevel)
  1373. return false
  1374. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1375. if(ErrorLevel)
  1376. return false
  1377. waitForSingleObject(hThread, 0xFFFFFFFF)
  1378. return true
  1379. }
  1380. setrestart()
  1381. {
  1382. VarSetCapacity(old, 4, 0)
  1383. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1384. if(ErrorLevel || dwAddress==0) {
  1385. ErrorLevel := ERROR_READ_MEMORY
  1386. return 0
  1387. }
  1388. NumPut(9,old,0,"Int")
  1389. writeRaw(hGTA, dwAddress + 957, &old, 4)
  1390. }
  1391. API_ERROR_NONE := 0
  1392. API_ERROR_SNAPSHOT_FAILED := 1
  1393. API_ERROR_SAMP_NOT_FOUND := 2
  1394. API_ERROR_REMOTE_MEMORY_ALLOCATION_FAILED := 3
  1395. API_ERROR_WRITEPROCESSMEMORY_FAILED := 4
  1396. API_ERROR_GETPROCADDRESS_FAILED := 5
  1397. API_ERROR_REMOTETHREAD_FAILED := 6
  1398. API_ERROR_INVALID_GTA_HANDLE := 7
  1399. API_ERROR_PIPE_DOESNT_RESPOND := 8
  1400. API_ERROR_STRING_TOO_LONG := 9
  1401. PLAYER_STATE_LEAVING_VEHICLE := 0
  1402. PLAYER_STATE_NORMAL := 1
  1403. PLAYER_STATE_DRIVING := 50
  1404. PLAYER_STATE_DYING := 54
  1405. PLAYER_STATE_DEAD := 55
  1406. CALLBACK_HEAL := 0
  1407. CALLBACK_ARMOR := 1
  1408. CALLBACK_POSITION := 2
  1409. CALLBACK_ENTEREXIT := 3
  1410. CALLBACK_VEHICLE_ENTEREXIT := 4
  1411. CALLBACK_VEHICLE_HEALTH := 5
  1412. CALLBACK_VEHICLE_ENGINE := 6
  1413. CALLBACK_VEHICLE_LOCK := 7
  1414. CALLBACK_VEHICLE_SPEED := 8
  1415. CALLBACK_WEAPON_CLIP := 9
  1416. CALLBACK_WEAPON_TOTALCLIP := 10
  1417. CALLBACK_WEAPON_SWITCH := 11
  1418. CALLBACK_CHATLOG := 12
  1419. PATH_API := RelToAbs(A_ScriptDir, "API.dll")
  1420. hModule := DllCall("LoadLibrary", Str, PATH_API)
  1421. if(hModule == -1 || hModule == 0)
  1422. {
  1423. MsgBox, 48, API - Fehler, Die API.dll konnte nicht gefunden werden.`nDer Keybinder wird nun beendet.
  1424. ExitApp
  1425. }
  1426. ReadMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ReadMemory")
  1427. WriteMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WriteMemory")
  1428. GetBasePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetBasePointer")
  1429. GetCommandLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCommandLine")
  1430. GetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastError")
  1431. SetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetLastError")
  1432. SendChat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SendChat")
  1433. ShowGameText_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowGameText")
  1434. AddChatMessage_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_AddChatMessage")
  1435. ShowDialog_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowDialog")
  1436. IsDialogOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsDialogOpen")
  1437. GetLastDialogId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogId")
  1438. GetLastDialogType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogType")
  1439. BlockChatInput_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_BlockChatInput")
  1440. GetChatLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLine")
  1441. GetChatLineFromFile_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLineFromFile")
  1442. IsChatOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsChatOpen")
  1443. GetScreenSizeX_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeX")
  1444. GetScreenSizeY_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeY")
  1445. GetCurrentWeatherId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCurrentWeatherId")
  1446. GetZoneName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneName")
  1447. GetCityName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityName")
  1448. GetZoneNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneNameByCoords")
  1449. GetCityNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityNameByCoords")
  1450. GetMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMarkerPos")
  1451. GetLastMousePosOnMenuMap_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastMousePosOnMenuMap")
  1452. GetMapMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMapMarkerPos")
  1453. FindGroundZForPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_FindGroundZForPosition")
  1454. WorldToScreen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WorldToScreen")
  1455. ScreenToWorld_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ScreenToWorld")
  1456. RegisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_RegisterTextBind")
  1457. UnregisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterTextBind")
  1458. UnregisterAllTextBinds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterAllTextBinds")
  1459. TextBindTimer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_TextBindTimer")
  1460. IsMenuOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsMenuOpen")
  1461. GetPlayerId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerId")
  1462. GetPlayerName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerName")
  1463. GetServerIp_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerIp")
  1464. GetServerPort_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerPort")
  1465. GetPlayerCPed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerCPed")
  1466. GetPlayerHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerHealth")
  1467. GetPlayerArmor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerArmor")
  1468. GetPlayerMoney_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerMoney")
  1469. GetPlayerWanteds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWanteds")
  1470. GetPlayerPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerPosition")
  1471. IsPlayerInRangeOfPoint_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint")
  1472. IsPlayerInRangeOfPoint2D_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint2D")
  1473. IsPlayerInAnyInterior_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyInterior")
  1474. IsPlayerFrozen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerFrozen")
  1475. GetPlayerWeaponSlot_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponSlot")
  1476. GetPlayerWeaponId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponId")
  1477. GetPlayerWeaponName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponName")
  1478. GetPlayerWeaponClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponClip")
  1479. GetPlayerWeaponTotalClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponTotalClip")
  1480. GetPlayerWeaponState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponState")
  1481. GetPlayerState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerState")
  1482. GetVehiclePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehiclePointer")
  1483. GetVehicleModelId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelId")
  1484. GetVehicleModelName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelName")
  1485. GetVehicleModelNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelNameById")
  1486. GetVehicleType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleType")
  1487. GetVehicleHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleHealth")
  1488. GetVehicleRadioStation_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStation")
  1489. GetVehicleRadioStationName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStationName")
  1490. GetVehicleFreeSeats_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFreeSeats")
  1491. GetVehicleSpeed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSpeed")
  1492. GetVehicleFirstColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFirstColor")
  1493. GetVehicleSecondColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSecondColor")
  1494. GetVehicleColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColor")
  1495. GetVehicleColorRGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorRGB")
  1496. GetVehicleColorARGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorARGB")
  1497. IsPlayerInAnyVehicle_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyVehicle")
  1498. IsPlayerDriver_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerDriver")
  1499. IsPlayerPassenger_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerPassenger")
  1500. IsVehicleSeatUsed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSeatUsed")
  1501. IsVehicleLocked_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLocked")
  1502. IsVehicleSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSirenEnabled")
  1503. IsVehicleHornEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleHornEnabled")
  1504. IsVehicleAlternateSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleAlternateSirenEnabled")
  1505. IsVehicleEngineEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleEngineEnabled")
  1506. IsVehicleLightEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLightEnabled")
  1507. IsPlayerInCar_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInCar")
  1508. IsPlayerInPlane_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInPlane")
  1509. IsPlayerInBoat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBoat")
  1510. IsPlayerInTrain_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInTrain")
  1511. IsPlayerInBike_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBike")
  1512. SetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetCallbackPointer")
  1513. UnSetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetCallbackPointer")
  1514. SetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetListenCallback")
  1515. UnSetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallback")
  1516. UnSetListenCallbackAll_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallbackAll")
  1517. UpdateServerData_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UpdateServerData")
  1518. GetPlayerNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerNameById")
  1519. GetPlayerIdByName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerIdByName")
  1520. ReadMemory(addr, size, ByRef data)
  1521. {
  1522. global ReadMemory_func
  1523. VarSetCapacity(data,size)
  1524. res := DllCall(ReadMemory_func, UInt, addr, UInt, size, StrP, data)
  1525. return res
  1526. }
  1527. WriteMemory(addr, size, data)
  1528. {
  1529. global WriteMemory_func
  1530. res := DllCall(WriteMemory_func, UInt, addr, UInt, size, Str, data)
  1531. return res
  1532. }
  1533. GetBasePointer(dll)
  1534. {
  1535. global GetBasePointer_func
  1536. res :=DllCall(GetBasePointer_func, Str, dll)
  1537. return res
  1538. }
  1539. GetCommandLine(ByRef line)
  1540. {
  1541. global GetCommandLine_func
  1542. VarSetCapacity(line,512,0)
  1543. res := DllCall(GetCommandLine_func, StrP, line)
  1544. return res
  1545. }
  1546. GetLastError()
  1547. {
  1548. global GetLastError_func
  1549. res:=DllCall(GetLastError_func)
  1550. return res
  1551. }
  1552. SetLastError(error)
  1553. {
  1554. global SetLastError_func
  1555. res := DllCall(SetLastError_func, Int, error)
  1556. return res
  1557. }
  1558. SendChat(msg)
  1559. {
  1560. global SendChat_func
  1561. res := DllCall(SendChat_func, Str, msg)
  1562. return res
  1563. }
  1564. ShowGameText(str_Text, int_Time, int_Style)
  1565. {
  1566. global ShowGameText_func
  1567. res := DllCall(ShowGameText_func,Str , str_Text, Int, int_Time, Int, int_Style)
  1568. return res
  1569. }
  1570. AddChatMessage(int_Color, str_Text)
  1571. {
  1572. global AddChatMessage_func
  1573. res := DllCall(AddChatMessage_func, Int, int_Color, Str, str_Text)
  1574. return res
  1575. }
  1576. ShowDialog(style, caption, text, button)
  1577. {
  1578. global ShowDialog_func
  1579. res := DllCall(ShowDialog_func, Int, style, Str, caption, Str, text, Str, button)
  1580. return res
  1581. }
  1582. IsDialogOpen()
  1583. {
  1584. global IsDialogOpen_func
  1585. res := DllCall(IsDialogOpen_func)
  1586. return res
  1587. }
  1588. GetLastDialogId()
  1589. {
  1590. global GetLastDialogId_func
  1591. res := DllCall(GetLastDialogId_func)
  1592. return res
  1593. }
  1594. GetLastDialogType()
  1595. {
  1596. global GetLastDialogType_func
  1597. res := DllCall(GetLastDialogType_func)
  1598. return res
  1599. }
  1600. BlockChatInput(block)
  1601. {
  1602. global BlockChatInput_func
  1603. res := DllCall(BlockChatInput_func,UChar,block)
  1604. return res
  1605. }
  1606. GetChatLine(Line, ByRef Output, timestamp=0, color=0){
  1607. chatindex := 0
  1608. FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  1609. loop, Parse, file, `n, `r
  1610. {
  1611. if(A_LoopField)
  1612. chatindex := A_Index
  1613. }
  1614. loop, Parse, file, `n, `r
  1615. {
  1616. if(A_Index = chatindex - line){
  1617. output := A_LoopField
  1618. break
  1619. }
  1620. }
  1621. file := ""
  1622. if(!timestamp)
  1623. output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
  1624. if(!color)
  1625. output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
  1626. return
  1627. }
  1628. GetChatLineFromFile(id, ByRef line)
  1629. {
  1630. global GetChatLineFromFile_func
  1631. VarSetCapacity(line,256,0)
  1632. res := DllCall(GetChatLineFromFile_func,Int,id,StrP,line)
  1633. return res
  1634. }
  1635. IsChatOpen()
  1636. {
  1637. global IsChatOpen_func
  1638. res := DllCall(IsChatOpen_func)
  1639. return res
  1640. }
  1641. GetScreenSizeX()
  1642. {
  1643. global GetScreenSizeX_func
  1644. res := DllCall(GetScreenSizeX_func)
  1645. return res
  1646. }
  1647. GetScreenSizeY()
  1648. {
  1649. global GetScreenSizeY_func
  1650. res := DllCall(GetScreenSizeY_func)
  1651. return res
  1652. }
  1653. GetCurrentWeatherId()
  1654. {
  1655. global GetCurrentWeatherId_func
  1656. res := DllCall(GetCurrentWeatherId_func)
  1657. return res
  1658. }
  1659. GetZoneName( ByRef str_ZoneName)
  1660. {
  1661. global GetZoneName_func
  1662. VarSetCapacity(str_ZoneName, 32)
  1663. res := DllCall(GetZoneName_func, StrP, str_ZoneName)
  1664. return res
  1665. }
  1666. GetCityName( ByRef str_CityName)
  1667. {
  1668. global GetCityName_func
  1669. VarSetCapacity(str_CityName, 32)
  1670. res := DllCall(GetCityName_func, StrP, str_CityName)
  1671. return res
  1672. }
  1673. GetZoneNameByCoords(x, y, ByRef str_ZoneName)
  1674. {
  1675. global GetZoneNameByCoords_func
  1676. VarSetCapacity(str_ZoneName, 32)
  1677. res := DllCall(GetZoneNameByCoords_func, Float, x, Float, y, StrP, str_ZoneName)
  1678. return res
  1679. }
  1680. GetCityNameByCoords(x, y, ByRef str_CityName)
  1681. {
  1682. global GetCityNameByCoords_func
  1683. VarSetCapacity(str_CityName, 32)
  1684. res := DllCall(GetCityNameByCoords_func, Float, x, Float, y, StrP, str_CityName)
  1685. return res
  1686. }
  1687. GetMarkerPos(ByRef x, ByRef y, ByRef z)
  1688. {
  1689. global GetMarkerPos_func
  1690. res := DllCall(GetMarkerPos_func, FloatP, x, FloatP, y, FloatP, z)
  1691. return res
  1692. }
  1693. GetLastMousePosOnMenuMap(ByRef x, ByRef y)
  1694. {
  1695. global GetLastMousePosOnMenuMap_func
  1696. res := DllCall(GetLastMousePosOnMenuMap_func, FloatP, x, FloatP, y)
  1697. return res
  1698. }
  1699. GetMapMarkerPos(ByRef x, ByRef y)
  1700. {
  1701. global GetMapMarkerPos_func
  1702. res := DllCall(GetMapMarkerPos_func, FloatP, x, FloatP, y)
  1703. return res
  1704. }
  1705. FindGroundZForPosition(x,y)
  1706. {
  1707. global FindGroundZForPosition_func
  1708. res := DllCall(FindGroundZForPosition_func, Float, x, Float, y, "Cdecl float")
  1709. return res
  1710. }
  1711. WorldToScreen(worldX, worldY, worldZ, ByRef screenX, ByRef screenY)
  1712. {
  1713. global WorldToScreen_func
  1714. res := DllCall(WorldToScreen_func, Float, worldX, Float, worldY, Float, worldZ, FloatP, screenX, FloatP, screenY)
  1715. return res
  1716. }
  1717. ScreenToWorld(screenX, screenY, ByRef worldX, ByRef worldY, ByRef worldZ)
  1718. {
  1719. global ScreenToWorld_func
  1720. res := DllCall(ScreenToWorld_func, Float, screenX, Float, screenY, FloatP, worldX, FloatP, worldY, FloatP, worldZ)
  1721. return res
  1722. }
  1723. RegisterTextBind(str_TextBind, float_PosX, float_PosY, float_PosZ, float_Radius, int_Delay, int_Loop, int_GroupId, int_isChild, int_Timeout)
  1724. {
  1725. global RegisterTextBind_func
  1726. res := DllCall(RegisterTextBind_func, Str, str_TextBind, Float, float_PosX, Float, float_PosY, Float, float_PosZ, Float, float_Radius, Int, int_Delay, Int, int_Loop, Int, int_GroupId, Int, int_isChild, Int, int_Timeout)
  1727. return res
  1728. }
  1729. UnregisterTextBind(int_TextBindId)
  1730. {
  1731. global UnregisterTextBind_func
  1732. res := DllCall(UnregisterTextBind_func, Int, int_TextBindId)
  1733. return res
  1734. }
  1735. UnregisterAllTextBinds()
  1736. {
  1737. global UnregisterAllTextBinds_func
  1738. res := DllCall(UnregisterAllTextBinds_func)
  1739. return res
  1740. }
  1741. TextBindTimer(int_TextBindSleep)
  1742. {
  1743. global TextBindTimer_func
  1744. res := DllCall(TextBindTimer_func, Int, int_TextBindSleep)
  1745. return res
  1746. }
  1747. IsMenuOpen()
  1748. {
  1749. global IsMenuOpen_func
  1750. res := DllCall(IsMenuOpen_func)
  1751. return res
  1752. }
  1753. GetPlayerId()
  1754. {
  1755. global GetPlayerId_func
  1756. res := DllCall(GetPlayerId_func)
  1757. return res
  1758. }
  1759. GetPlayerName(ByRef szName)
  1760. {
  1761. global GetPlayerName_func
  1762. VarSetCapacity(szName,25)
  1763. res := DllCall(GetPlayerName_func, StrP, szName)
  1764. return res
  1765. }
  1766. GetServerIp(ByRef szHost)
  1767. {
  1768. global GetServerIp_func
  1769. VarSetCapacity(szHost, 30)
  1770. res := DllCall(GetServerIp_func, StrP, szHost)
  1771. return res
  1772. }
  1773. GetServerPort()
  1774. {
  1775. global GetServerPort_func
  1776. res := DllCall(GetServerPort_func)
  1777. return res
  1778. }
  1779. GetPlayerCPed()
  1780. {
  1781. global GetPlayerCPed_func
  1782. res :=DllCall(GetPlayerCPed_func)
  1783. return res
  1784. }
  1785. GetPlayerHealth()
  1786. {
  1787. global GetPlayerHealth_func
  1788. res := DllCall(GetPlayerHealth_func)
  1789. return res
  1790. }
  1791. GetPlayerArmor()
  1792. {
  1793. global GetPlayerArmor_func
  1794. res := DllCall(GetPlayerArmor_func)
  1795. return res
  1796. }
  1797. GetPlayerMoney()
  1798. {
  1799. global GetPlayerMoney_func
  1800. res := DllCall(GetPlayerMoney_func)
  1801. return res
  1802. }
  1803. GetPlayerWanteds()
  1804. {
  1805. global GetPlayerWanteds_func
  1806. res := DllCall(GetPlayerWanteds_func)
  1807. return res
  1808. }
  1809. GetPlayerPosition(ByRef flo_posX, ByRef flo_posY, ByRef flo_posZ, ByRef flo_Rotation)
  1810. {
  1811. global GetPlayerPosition_func
  1812. res := DllCall(GetPlayerPosition_func, FloatP, flo_posX, FloatP, flo_posY, FloatP, flo_posZ, FloatP, flo_Rotation)
  1813. return res
  1814. }
  1815. IsPlayerInRangeOfPoint(flo_posX, flo_posY, flo_posZ, flo_posRadius)
  1816. {
  1817. global IsPlayerInRangeOfPoint_func
  1818. res := DllCall(IsPlayerInRangeOfPoint_func, Float, flo_posX, Float, flo_posY, Float, flo_posZ, Float, flo_posRadius)
  1819. return res
  1820. }
  1821. IsPlayerInRangeOfPoint2D(flo_posX, flo_posY, flo_posRadius)
  1822. {
  1823. global IsPlayerInRangeOfPoint2D_func
  1824. res := DllCall(IsPlayerInRangeOfPoint2D_func, Float, flo_posX, Float, flo_posY, Float, flo_posRadius)
  1825. return res
  1826. }
  1827. IsPlayerInAnyInterior()
  1828. {
  1829. global IsPlayerInAnyInterior_func
  1830. res := DllCall(IsPlayerInAnyInterior_func)
  1831. return res
  1832. }
  1833. IsPlayerFrozen()
  1834. {
  1835. global IsPlayerFrozen_func
  1836. res := DllCall(IsPlayerFrozen_func)
  1837. return res
  1838. }
  1839. GetPlayerWeaponSlot()
  1840. {
  1841. global GetPlayerWeaponSlot_func
  1842. res := DllCall(GetPlayerWeaponSlot_func)
  1843. return res
  1844. }
  1845. GetPlayerWeaponId(int_WeaponSlot)
  1846. {
  1847. global GetPlayerWeaponId_func
  1848. res := DllCall(GetPlayerWeaponId_func, Int, int_WeaponSlot)
  1849. return res
  1850. }
  1851. GetPlayerWeaponName(int_WeaponSlot, ByRef str_WeapName)
  1852. {
  1853. global GetPlayerWeaponName_func
  1854. VarSetCapacity(str_WeapName, 32)
  1855. res := DllCall(GetPlayerWeaponName_func, Int, int_WeaponSlot, StrP, str_WeapName)
  1856. return res
  1857. }
  1858. GetPlayerWeaponClip(int_WeaponSlot)
  1859. {
  1860. global GetPlayerWeaponClip_func
  1861. res := DllCall(GetPlayerWeaponClip_func, Int, int_WeaponSlot)
  1862. return res
  1863. }
  1864. GetPlayerWeaponTotalClip(int_WeaponSlot)
  1865. {
  1866. global GetPlayerWeaponTotalClip_func
  1867. res := DllCall(GetPlayerWeaponTotalClip_func, Int, int_WeaponSlot)
  1868. return res
  1869. }
  1870. GetPlayerWeaponState()
  1871. {
  1872. global GetPlayerWeaponState_func
  1873. res := DllCall(GetPlayerWeaponState_func)
  1874. return res
  1875. }
  1876. GetPlayerState()
  1877. {
  1878. global GetPlayerState_func
  1879. res := DllCall(GetPlayerState_func)
  1880. return res
  1881. }
  1882. GetVehiclePointer()
  1883. {
  1884. global GetVehiclePointer_func
  1885. res := DllCall(GetVehiclePointer_func)
  1886. return res
  1887. }
  1888. GetVehicleModelId()
  1889. {
  1890. global GetVehicleModelId_func
  1891. res := DllCall(GetVehicleModelId_func)
  1892. return res
  1893. }
  1894. GetVehicleModelName(ByRef str_VehicleName)
  1895. {
  1896. global GetVehicleModelName_func
  1897. VarSetCapacity(str_VehicleName, 32)
  1898. res := DllCall(GetVehicleModelName_func, StrP, str_VehicleName)
  1899. return res
  1900. }
  1901. GetVehicleModelNameById(int_VehicleId, ByRef str_VehicleName)
  1902. {
  1903. global GetVehicleModelNameById_func
  1904. VarSetCapacity(str_VehicleName, 32)
  1905. res := DllCall(GetVehicleModelNameById_func, Int, int_VehicleId, StrP, str_VehicleName)
  1906. return res
  1907. }
  1908. GetVehicleType()
  1909. {
  1910. global GetVehicleType_func
  1911. res := DllCall(GetVehicleType_func)
  1912. return res
  1913. }
  1914. GetVehicleHealth()
  1915. {
  1916. global GetVehicleHealth_func
  1917. res := DllCall(GetVehicleHealth_func)
  1918. return res
  1919. }
  1920. GetVehicleRadioStation()
  1921. {
  1922. global GetVehicleRadioStation_func
  1923. res := DllCall(GetVehicleRadioStation_func)
  1924. return res
  1925. }
  1926. GetVehicleRadioStationName(ByRef str_RadioName)
  1927. {
  1928. global GetVehicleRadioStationName_func
  1929. VarSetCapacity(str_RadioName, 32)
  1930. res := DllCall(GetVehicleRadioStationName_func, StrP, str_RadioName)
  1931. return res
  1932. }
  1933. GetVehicleFreeSeats(ByRef int_SeatFL, ByRef int_SeatFR, ByRef int_SeatBL, ByRef int_SeatBR)
  1934. {
  1935. global GetVehicleFreeSeats_func
  1936. res := DllCall(GetVehicleFreeSeats_func, IntP, int_SeatFL, IntP, int_SeatFR, IntP, int_SeatBL, IntP, int_SeatBR)
  1937. return res
  1938. }
  1939. GetVehicleSpeed(float_SpeedMult)
  1940. {
  1941. global GetVehicleSpeed_func
  1942. res := DllCall(GetVehicleSpeed_func, Float, float_SpeedMult)
  1943. return res
  1944. }
  1945. GetVehicleFirstColor()
  1946. {
  1947. global GetVehicleFirstColor_func
  1948. res := DllCall(GetVehicleFirstColor_func)
  1949. return res
  1950. }
  1951. GetVehicleSecondColor()
  1952. {
  1953. global GetVehicleSecondColor_func
  1954. res := DllCall(GetVehicleSecondColor_func)
  1955. return res
  1956. }
  1957. GetVehicleColor(ByRef int_ColorFirst, ByRef int_ColorSecond)
  1958. {
  1959. global GetVehicleColor_func
  1960. res := DllCall(GetVehicleColor_func, IntP, int_ColorFirst, IntP, int_ColorSecond)
  1961. return res
  1962. }
  1963. GetVehicleColorRGB(int_Color, ByRef uint_ColorRGB)
  1964. {
  1965. global GetVehicleColorRGB_func
  1966. res := DllCall(GetVehicleColorRGB_func, Int, int_Color, UIntP, uint_ColorRGB)
  1967. return res
  1968. }
  1969. GetVehicleColorARGB(int_Color, ByRef uint_ColorARGB)
  1970. {
  1971. global GetVehicleColorARGB_func
  1972. res := DllCall(GetVehicleColorARGB_func, Int, int_Color, UIntP, uint_ColorARGB)
  1973. return res
  1974. }
  1975. IsPlayerInAnyVehicle()
  1976. {
  1977. global IsPlayerInAnyVehicle_func
  1978. res := DllCall(IsPlayerInAnyVehicle_func)
  1979. return res
  1980. }
  1981. IsPlayerDriver()
  1982. {
  1983. global IsPlayerDriver_func
  1984. res := DllCall(IsPlayerDriver_func)
  1985. return res
  1986. }
  1987. IsPlayerPassenger()
  1988. {
  1989. global IsPlayerPassenger_func
  1990. res := DllCall(IsPlayerPassenger_func)
  1991. return res
  1992. }
  1993. IsVehicleSeatUsed(int_SeatId)
  1994. {
  1995. global IsVehicleSeatUsed_func
  1996. res := DllCall(IsVehicleSeatUsed_func, int, int_SeatId)
  1997. return res
  1998. }
  1999. IsVehicleLocked()
  2000. {
  2001. global IsVehicleLocked_func
  2002. res := DllCall(IsVehicleLocked_func)
  2003. return res
  2004. }
  2005. IsVehicleSirenEnabled()
  2006. {
  2007. global IsVehicleSirenEnabled_func
  2008. res := DllCall(IsVehicleSirenEnabled_func)
  2009. return res
  2010. }
  2011. IsVehicleHornEnabled()
  2012. {
  2013. global IsVehicleHornEnabled_func
  2014. res := DllCall(IsVehicleHornEnabled_func)
  2015. return res
  2016. }
  2017. IsVehicleAlternateSirenEnabled()
  2018. {
  2019. global IsVehicleAlternateSirenEnabled_func
  2020. res := DllCall(IsVehicleAlternateSirenEnabled_func)
  2021. return res
  2022. }
  2023. IsVehicleEngineEnabled()
  2024. {
  2025. global IsVehicleEngineEnabled_func
  2026. res := DllCall(IsVehicleEngineEnabled_func)
  2027. return res
  2028. }
  2029. IsVehicleLightEnabled()
  2030. {
  2031. global IsVehicleLightEnabled_func
  2032. res := DllCall(IsVehicleLightEnabled_func)
  2033. return res
  2034. }
  2035. IsPlayerInCar()
  2036. {
  2037. global IsPlayerInCar_func
  2038. res := DllCall(IsPlayerInCar_func)
  2039. return res
  2040. }
  2041. IsPlayerInPlane()
  2042. {
  2043. global IsPlayerInPlane_func
  2044. res := DllCall(IsPlayerInPlane_func)
  2045. return res
  2046. }
  2047. IsPlayerInBoat()
  2048. {
  2049. global IsPlayerInBoat_func
  2050. res := DllCall(IsPlayerInBoat_func)
  2051. return res
  2052. }
  2053. IsPlayerInTrain()
  2054. {
  2055. global IsPlayerInTrain_func
  2056. res := DllCall(IsPlayerInTrain_func)
  2057. return res
  2058. }
  2059. IsPlayerInBike()
  2060. {
  2061. global IsPlayerInBike_func
  2062. res := DllCall(IsPlayerInBike_func)
  2063. return res
  2064. }
  2065. SetListenCallback(int_Id)
  2066. {
  2067. global SetListenCallback_func
  2068. res := DllCall(SetListenCallback_func, Int, int_Id)
  2069. return res
  2070. }
  2071. UnSetCallbackPointer()
  2072. {
  2073. global UnSetCallbackPointer_func
  2074. res := DllCall(UnSetCallbackPointer_func)
  2075. return res
  2076. }
  2077. SetCallbackPointer(int_Id)
  2078. {
  2079. global SetCallbackPointer_func
  2080. res := DllCall(SetCallbackPointer_func, Int, int_Id)
  2081. return res
  2082. }
  2083. UnSetListenCallback(int_Id)
  2084. {
  2085. global UnSetListenCallback_func
  2086. res := DllCall(UnSetListenCallback_func, Int, int_Id)
  2087. return res
  2088. }
  2089. UnSetListenCallbackAll()
  2090. {
  2091. global UnSetListenCallbackAll_func
  2092. res := DllCall(UnSetListenCallbackAll_func)
  2093. return res
  2094. }
  2095. GetCallbackHealParams(ptr_HealStruct, ByRef iOldHeal, ByRef iNewHeal)
  2096. {
  2097. ioldHeal := NumGet(ptr_HealStruct+0, "int")
  2098. inewHeal := NumGet(ptr_HealStruct+4, "int")
  2099. }
  2100. GetCallbackArmorParams(ptr_ArmorStruct, ByRef iOldArmor, ByRef iNewArmor)
  2101. {
  2102. ioldArmor := NumGet(ptr_ArmorStruct+0, "int")
  2103. inewArmor := NumGet(ptr_ArmorStruct+4, "int")
  2104. }
  2105. UrlDownloadToVar(URL, ByRef Result, UserAgent = "", Proxy = "", ProxyBypass = "")
  2106. {
  2107. hModule := DllCall("LoadLibrary", "Str", "wininet.dll")
  2108. AccessType := Proxy != "" ? 3 : 1
  2109. io := DllCall("wininet\InternetOpenA"
  2110. , "Str", UserAgent
  2111. , "UInt", AccessType
  2112. , "Str", Proxy
  2113. , "Str", ProxyBypass
  2114. , "UInt", 0)
  2115. iou := DllCall("wininet\InternetOpenUrlA"
  2116. , "UInt", io
  2117. , "Str", url
  2118. , "Str", ""
  2119. , "UInt", 0
  2120. , "UInt", 0x80000000
  2121. , "UInt", 0)
  2122. If (ErrorLevel != 0 or iou = 0) {
  2123. DllCall("FreeLibrary", "UInt", hModule)
  2124. return 0
  2125. }
  2126. VarSetCapacity(buffer, 10240, 0)
  2127. VarSetCapacity(BytesRead, 4, 0)
  2128. Loop
  2129. {
  2130. irf := DllCall("wininet\InternetReadFile", "UInt", iou, "UInt", &buffer, "UInt", 10240, "UInt", &BytesRead)
  2131. VarSetCapacity(buffer, -1)
  2132. BytesRead_ = 0
  2133. Loop, 4
  2134. BytesRead_ += *(&BytesRead + A_Index-1) << 8*(A_Index-1)
  2135. If (irf = 1 and BytesRead_ = 0)
  2136. break
  2137. Else
  2138. Result .= SubStr(buffer, 1, BytesRead_)
  2139. }
  2140. DllCall("wininet\InternetCloseHandle", "UInt", iou)
  2141. DllCall("wininet\InternetCloseHandle", "UInt", io)
  2142. DllCall("FreeLibrary", "UInt", hModule)
  2143. }
  2144. GetCallbackPositionParams(ptr_PositionStruct, ByRef fOldPosX, ByRef fOldPosY, ByRef fOldPosZ, ByRef fOldPosR, ByRef fNewPosX, ByRef fNewPosY, ByRef fNewPosZ, ByRef fNewPosR)
  2145. {
  2146. fOldPosX := NumGet(ptr_PositionStruct+0, "float")
  2147. fOldPosY := NumGet(ptr_PositionStruct+4, "float")
  2148. fOldPosZ := NumGet(ptr_PositionStruct+8, "float")
  2149. fOldPosR := NumGet(ptr_PositionStruct+12, "float")
  2150. fNewPosX := NumGet(ptr_PositionStruct+16, "float")
  2151. fNewPosY := NumGet(ptr_PositionStruct+20, "float")
  2152. fNewPosZ := NumGet(ptr_PositionStruct+24, "float")
  2153. fNewPosR := NumGet(ptr_PositionStruct+28, "float")
  2154. }
  2155. GetCallbackEnterExitParams(ptr_EnterExitStruct, ByRef iOldInteriorState, ByRef iNewInteriorState)
  2156. {
  2157. iOldInteriorState := NumGet(ptr_EnterExitStruct+0, "int")
  2158. iNewInteriorState := NumGet(ptr_EnterExitStruct+4, "int")
  2159. }
  2160. GetCallbackVehicleEnterExitParams(ptr_VehicleEnterExitStruct, ByRef iOldVehicleEnterExit, ByRef iNewVehicleEnterExit)
  2161. {
  2162. iOldVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+0, "int")
  2163. iNewVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+4, "int")
  2164. }
  2165. GetCallbackVehicleHealthParams(ptr_VehicleHealthStruct, ByRef iOldVehicleHealth, ByRef iNewVehicleHealth)
  2166. {
  2167. iOldVehicleHealth := NumGet(ptr_VehicleHealthStruct+0, "int")
  2168. iNewVehicleHealth := NumGet(ptr_VehicleHealthStruct+4, "int")
  2169. }
  2170. GetCallbackVehicleEngineParams(ptr_VehicleEngineStruct, ByRef iOldVehicleEngine, ByRef iNewVehicleEngine)
  2171. {
  2172. iOldVehicleEngine := NumGet(ptr_VehicleEngineStruct+0, "int")
  2173. iNewVehicleEngine := NumGet(ptr_VehicleEngineStruct+4, "int")
  2174. }
  2175. GetCallbackVehicleLockParams(ptr_VehicleLockStruct, ByRef iOldVehicleLock, ByRef iNewVehicleLock)
  2176. {
  2177. iOldVehicleLock := NumGet(ptr_VehicleLockStruct+0, "int")
  2178. iNewVehicleLock := NumGet(ptr_VehicleLockStruct+4, "int")
  2179. }
  2180. GetCallbackVehicleSpeedParams(ptr_VehicleSpeedStruct, ByRef iOldVehicleSpeed, ByRef iNewVehicleSpeed)
  2181. {
  2182. iOldVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+0, "int")
  2183. iNewVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+4, "int")
  2184. }
  2185. GetCallbackWeaponSwitchParams(ptr_WeaponSwitchStruct, ByRef iOldWeaponId, ByRef iNewWeaponId)
  2186. {
  2187. iOldWeaponId := NumGet(ptr_WeaponSwitchStruct+0, "int")
  2188. iNewWeaponId := NumGet(ptr_WeaponSwitchStruct+4, "int")
  2189. }
  2190. GetCallbackWeaponClipParams(ptr_WeaponClipStruct, ByRef iOldWeaponClip, ByRef iNewWeaponClip)
  2191. {
  2192. iOldWeaponClip := NumGet(ptr_WeaponClipStruct+0, "int")
  2193. iNewWeaponClip := NumGet(ptr_WeaponClipStruct+4, "int")
  2194. }
  2195. GetCallbackWeaponTotalClipParams(ptr_WeaponTotalClipStruct, ByRef iOldWeaponTotalClip, ByRef iNewWeaponTotalClip)
  2196. {
  2197. iOldWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+0, "int")
  2198. iNewWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+4, "int")
  2199. }
  2200. UpdateServerData()
  2201. {
  2202. global UpdateServerData_func
  2203. res := DllCall(UpdateServerData_func)
  2204. return res
  2205. }
  2206. GetPlayerNameById(id,ByRef name)
  2207. {
  2208. VarSetCapacity(name,24,0)
  2209. global GetPlayerNameById_func
  2210. res := DllCall(GetPlayerNameById_func,UShort,id,StrP,name)
  2211. return res
  2212. }
  2213. GetPlayerIdByName2(name)
  2214. {
  2215. global GetPlayerIdByName2_func
  2216. res := DllCall(GetPlayerIdByName2_func,Str,name)
  2217. return res
  2218. }
  2219. DecimalToHex(Var){
  2220. SetFormat, IntegerFast, hex
  2221. Dec2Hex += Var
  2222. Dec2Hex .= ""
  2223. SetFormat, IntegerFast, d
  2224. StringTrimLeft, Dec2Hex, Dec2Hex, 2
  2225. StringUpper, Dec2Hex, Dec2Hex
  2226. sDec2Hex .= Dec2Hex
  2227. return sDec2Hex
  2228. }
  2229. RelToAbs(root, dir, s = "\") {
  2230. pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
  2231. , root := SubStr(root, len + 1), sk := 0
  2232. If InStr(root, s, "", 0) = StrLen(root)
  2233. StringTrimRight, root, root, 1
  2234. If InStr(dir, s, "", 0) = StrLen(dir)
  2235. StringTrimRight, dir, dir, 1
  2236. Loop, Parse, dir, %s%
  2237. {
  2238. If A_LoopField = ..
  2239. StringLeft, root, root, InStr(root, s, "", 0) - 1
  2240. Else If A_LoopField =
  2241. root =
  2242. Else If A_LoopField != .
  2243. Continue
  2244. StringReplace, dir, dir, %A_LoopField%%s%
  2245. }
  2246. Return, pr . root . s . dir
  2247. }
  2248. PATH_OVERLAY := RelToAbs(A_ScriptDir, "dx9_overlay.dll")
  2249. h2Module := DllCall("LoadLibrary", Str, PATH_OVERLAY)
  2250. if(h2Module == -1 || h2Module == 0)
  2251. {
  2252. MsgBox, 48, Error, Die dx9_overlay.dll konnte nicht gefunden werden. `nDer Keybinder wird nun beendet.
  2253. ExitApp
  2254. }
  2255. Init_func := DllCall("GetProcAddress", UInt, h2Module, Str, "Init")
  2256. SetParam_func := DllCall("GetProcAddress", UInt, h2Module, Str, "SetParam")
  2257. TextCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextCreate")
  2258. TextDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextDestroy")
  2259. TextSetShadow_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShadow")
  2260. TextSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShown")
  2261. TextSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetColor")
  2262. TextSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetPos")
  2263. TextSetString_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetString")
  2264. TextUpdate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextUpdate")
  2265. BoxCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxCreate")
  2266. BoxDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxDestroy")
  2267. BoxSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetShown")
  2268. BoxSetBorder_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorder")
  2269. BoxSetBorderColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorderColor")
  2270. BoxSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetColor")
  2271. BoxSetHeight_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetHeight")
  2272. BoxSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetPos")
  2273. BoxSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetWidth")
  2274. LineCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineCreate")
  2275. LineDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineDestroy")
  2276. LineSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetShown")
  2277. LineSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetColor")
  2278. LineSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetWidth")
  2279. LineSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetPos")
  2280. ImageCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageCreate")
  2281. ImageDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageDestroy")
  2282. ImageSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetShown")
  2283. ImageSetAlign_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetAlign")
  2284. ImageSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetPos")
  2285. ImageSetRotation_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetRotation")
  2286. DestroyAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "DestroyAllVisual")
  2287. ShowAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ShowAllVisual")
  2288. HideAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "HideAllVisual")
  2289. GetFrameRate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetFrameRate")
  2290. GetScreenSpecs_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetScreenSpecs")
  2291. Init()
  2292. {
  2293. global Init_func
  2294. res := DllCall(Init_func)
  2295. return res
  2296. }
  2297. SetParam(str_Name, str_Value)
  2298. {
  2299. global SetParam_func
  2300. res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
  2301. return res
  2302. }
  2303. TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
  2304. {
  2305. global TextCreate_func
  2306. res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
  2307. return res
  2308. }
  2309. TextDestroy(id)
  2310. {
  2311. global TextDestroy_func
  2312. res := DllCall(TextDestroy_func,Int,id)
  2313. return res
  2314. }
  2315. TextSetShadow(id, shadow)
  2316. {
  2317. global TextSetShadow_func
  2318. res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
  2319. return res
  2320. }
  2321. TextSetShown(id, show)
  2322. {
  2323. global TextSetShown_func
  2324. res := DllCall(TextSetShown_func,Int,id,UChar,show)
  2325. return res
  2326. }
  2327. TextSetColor(id,color)
  2328. {
  2329. global TextSetColor_func
  2330. res := DllCall(TextSetColor_func,Int,id,UInt,color)
  2331. return res
  2332. }
  2333. TextSetPos(id,x,y)
  2334. {
  2335. global TextSetPos_func
  2336. res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
  2337. return res
  2338. }
  2339. TextSetString(id,Text)
  2340. {
  2341. global TextSetString_func
  2342. res := DllCall(TextSetString_func,Int,id,Str,Text)
  2343. return res
  2344. }
  2345. TextUpdate(id,Font,Fontsize,bold,italic)
  2346. {
  2347. global TextUpdate_func
  2348. res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
  2349. return res
  2350. }
  2351. BoxCreate(x,y,width,height,Color,show)
  2352. {
  2353. global BoxCreate_func
  2354. res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
  2355. return res
  2356. }
  2357. BoxDestroy(id)
  2358. {
  2359. global BoxDestroy_func
  2360. res := DllCall(BoxDestroy_func,Int,id)
  2361. return res
  2362. }
  2363. BoxSetShown(id,Show)
  2364. {
  2365. global BoxSetShown_func
  2366. res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
  2367. return res
  2368. }
  2369. BoxSetBorder(id,height,Show)
  2370. {
  2371. global BoxSetBorder_func
  2372. res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
  2373. return res
  2374. }
  2375. BoxSetBorderColor(id,Color)
  2376. {
  2377. global BoxSetBorderColor_func
  2378. res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
  2379. return res
  2380. }
  2381. BoxSetColor(id,Color)
  2382. {
  2383. global BoxSetColor_func
  2384. res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
  2385. return res
  2386. }
  2387. BoxSetHeight(id,height)
  2388. {
  2389. global BoxSetHeight_func
  2390. res := DllCall(BoxSetHeight_func,Int,id,Int,height)
  2391. return res
  2392. }
  2393. BoxSetPos(id,x,y)
  2394. {
  2395. global BoxSetPos_func
  2396. res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
  2397. return res
  2398. }
  2399. BoxSetWidth(id,width)
  2400. {
  2401. global BoxSetWidth_func
  2402. res := DllCall(BoxSetWidth_func,Int,id,Int,width)
  2403. return res
  2404. }
  2405. LineCreate(x1,y1,x2,y2,width,color,show)
  2406. {
  2407. global LineCreate_func
  2408. res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
  2409. return res
  2410. }
  2411. LineDestroy(id)
  2412. {
  2413. global LineDestroy_func
  2414. res := DllCall(LineDestroy_func,Int,id)
  2415. return res
  2416. }
  2417. LineSetShown(id,show)
  2418. {
  2419. global LineSetShown_func
  2420. res := DllCall(LineSetShown_func,Int,id,UChar,show)
  2421. return res
  2422. }
  2423. LineSetColor(id,color)
  2424. {
  2425. global LineSetColor_func
  2426. res := DllCall(LineSetColor_func,Int,id,UInt,color)
  2427. return res
  2428. }
  2429. LineSetWidth(id, width)
  2430. {
  2431. global LineSetWidth_func
  2432. res := DllCall(LineSetWidth_func,Int,id,Int,width)
  2433. return res
  2434. }
  2435. LineSetPos(id,x1,y1,x2,y2)
  2436. {
  2437. global LineSetPos_func
  2438. res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
  2439. return res
  2440. }
  2441. ImageCreate(path, x, y, rotation, align, show)
  2442. {
  2443. global ImageCreate_func
  2444. res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
  2445. return res
  2446. }
  2447. ImageDestroy(id)
  2448. {
  2449. global ImageDestroy_func
  2450. res := DllCall(ImageDestroy_func,Int,id)
  2451. return res
  2452. }
  2453. ImageSetShown(id,show)
  2454. {
  2455. global ImageSetShown_func
  2456. res := DllCall(ImageSetShown_func,Int,id,UChar,show)
  2457. return res
  2458. }
  2459. ImageSetAlign(id,align)
  2460. {
  2461. global ImageSetAlign_func
  2462. res := DllCall(ImageSetAlign_func,Int,id,Int,align)
  2463. return res
  2464. }
  2465. ImageSetPos(id, x, y)
  2466. {
  2467. global ImageSetPos_func
  2468. res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
  2469. return res
  2470. }
  2471. ImageSetRotation(id, rotation)
  2472. {
  2473. global ImageSetRotation_func
  2474. res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
  2475. return res
  2476. }
  2477. DestroyAllVisual()
  2478. {
  2479. global DestroyAllVisual_func
  2480. res := DllCall(DestroyAllVisual_func)
  2481. return res
  2482. }
  2483. ShowAllVisual()
  2484. {
  2485. global ShowAllVisual_func
  2486. res := DllCall(ShowAllVisual_func)
  2487. return res
  2488. }
  2489. HideAllVisual()
  2490. {
  2491. global HideAllVisual_func
  2492. res := DllCall(HideAllVisual_func )
  2493. return res
  2494. }
  2495. GetFrameRate()
  2496. {
  2497. global GetFrameRate_func
  2498. res := DllCall(GetFrameRate_func )
  2499. return res
  2500. }
  2501. GetScreenSpecs(ByRef width, ByRef height)
  2502. {
  2503. global GetScreenSpecs_func
  2504. res := DllCall(GetScreenSpecs_func, IntP, width, IntP, height)
  2505. return res
  2506. }
  2507. GetPlayerMarkerPosition(ByRef posX, ByRef posY, ByRef posZ)
  2508. {
  2509. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  2510. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  2511. posY := ReadMemory_(exe,0xC7DECC,"Float")
  2512. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  2513. CloseMemory_(exe)
  2514. }
  2515. OpenMemoryfromTitle_(title,right=0x1F0FFF)
  2516. {
  2517. WinGet,PID,PID,%title%
  2518. HWND := DllCall("OpenProcess","Uint",right,"int",0,"int",PID)
  2519. return HWND
  2520. }
  2521. IsPlayerInRangeOfPoint_fast(x, y, z, r)
  2522. {
  2523. static pos_x, pos_y, pos_z, lastcalled
  2524. if(lastcalled < A_TickCount - 150){
  2525. GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
  2526. lastcalled := A_TickCount
  2527. }
  2528. d := sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
  2529. if(d < r)
  2530. return 1
  2531. return 0
  2532. }
  2533. IsPlayerInRangeOfPoint2D_fast(x, y, r){
  2534. static pos_x, pos_y, lastcalled
  2535. if(lastcalled < A_TickCount - 150){
  2536. GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
  2537. lastcalled := A_TickCount
  2538. }
  2539. d := sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2)
  2540. if(d < r)
  2541. return 1
  2542. return 0
  2543. }
  2544. CloseMemory_(hwnd)
  2545. {
  2546. return DllCall("CloseHandle", "int", hwnd)
  2547. }
  2548. ReadMemory_(hwnd,address,datatype="int",length=4,offset=0)
  2549. {
  2550. VarSetCapacity(readvalue,length, 0)
  2551. DllCall("ReadProcessMemory","Uint",hwnd,"Uint",address+offset,"Str",readvalue,"Uint",length,"Uint *",0)
  2552. finalvalue := NumGet(readvalue,0,datatype)
  2553. return finalvalue
  2554. }
  2555. GetDistancebetween(x, y, z, pos_x, pos_y, pos_z)
  2556. {
  2557. return sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
  2558. }
  2559. SetParam("use_window", "1")
  2560. SetParam("window", "GTA:SA:MP")
  2561. Gui, color, 0xFFFFFF
  2562. Gui, Add, Picture, x-8 y0, bin\hitman.png
  2563. Gui, Show, w486 h573, Hitman Keybinder
  2564. Gui, add, picture, x110 y425, bin\settings.png
  2565. Gui, Add, Edit, x90 y130 w320 h270 ReadOnly +Center,Alle Befehle/Keybinds auch via /help ingame`n`n Keybinds `n____________________________________`n`n 1 - /motor -/lock -/licht`ny - /lock`n2 - /usedrugs`n3 - /erstehilfe`n4 - /eat 1-5`nNumpad9 - Backup (/f) + /service wheelman`nAlt&Numpad9 - ^Kein Backup mehr`nALT + m - /members`nALT + c - /contracts`nNumpad- - /auf`nALT + Numpad- - /zoll`nm - /mask`n8 - /hram`n`n`nKurzbinds `n____________________________________`n`n/fischen(schnell)`n/afish (wirft billigsten weg)`n /verkaufen - Fische verkaufen`n/kochen - /cook fish`n/af | /as - Findsystem (< ~ Ende)`n/setkills - Kills einstellen`n/setdeaths - Tode einstellen`n/kd - K/D`n/hitmanstats - Statistiken (noch nicht fertig)`n/ov - Overlay`n/gk - GK System`n/on - Hitsound+Handy`n/Fische - HP der gekochten Fische`n/aw - /accept wheelman`n/cw - /cancel wheelman`nALT+R - /revert`n/shutdown [Min] - Schaltet den PC nach der Zeit ab`n/stopshutdown - Beendet den Shutdowntimer`n/ap - /accept paket`n/fg - /festgeld 1250000
  2566. Gui, Add, Button, x30 y500 w150 h40 gAusruesten, Ausrüsten
  2567. Gui, Add, Button, x180 y500 w150 h40 gEinstellungen, Einstellungen
  2568. Gui, Add, StatusBar,, Starttext der Leiste (kann leer gelassen werden).
  2569. SB_SetText("Version: 1.0 | Keybinder by micheL")
  2570. return
  2571. Ausruesten:
  2572. Gui, 1: Destroy
  2573. IniRead, Profil1_1, settings.ini, Ausruesten, Profil1_1
  2574. IniRead, Profil1_2, settings.ini, Ausruesten, Profil1_2
  2575. IniRead, Profil1_3, settings.ini, Ausruesten, Profil1_3
  2576. IniRead, Profil1_4, settings.ini, Ausruesten, Profil1_4
  2577. IniRead, Profil1_5, settings.ini, Ausruesten, Profil1_5
  2578. IniRead, Profil1_6, settings.ini, Ausruesten, Profil1_6
  2579. IniRead, Profil1_7, settings.ini, Ausruesten, Profil1_7
  2580. IniRead, Profil2_1, settings.ini, Ausruesten, Profil2_1
  2581. IniRead, Profil2_2, settings.ini, Ausruesten, Profil2_2
  2582. IniRead, Profil2_3, settings.ini, Ausruesten, Profil2_3
  2583. IniRead, Profil2_4, settings.ini, Ausruesten, Profil2_4
  2584. IniRead, Profil2_5, settings.ini, Ausruesten, Profil2_5
  2585. IniRead, Profil2_6, settings.ini, Ausruesten, Profil2_6
  2586. IniRead, Profil2_7, settings.ini, Ausruesten, Profil2_7
  2587. IniRead, Profil3_1, settings.ini, Ausruesten, Profil3_1
  2588. IniRead, Profil3_2, settings.ini, Ausruesten, Profil3_2
  2589. IniRead, Profil3_3, settings.ini, Ausruesten, Profil3_3
  2590. IniRead, Profil3_4, settings.ini, Ausruesten, Profil3_4
  2591. IniRead, Profil3_5, settings.ini, Ausruesten, Profil3_5
  2592. IniRead, Profil3_6, settings.ini, Ausruesten, Profil3_6
  2593. IniRead, Profil3_7, settings.ini, Ausruesten, Profil3_7
  2594. IniRead, Profil4_1, settings.ini, Ausruesten, Profil4_1
  2595. IniRead, Profil4_2, settings.ini, Ausruesten, Profil4_2
  2596. IniRead, Profil4_3, settings.ini, Ausruesten, Profil4_3
  2597. IniRead, Profil4_4, settings.ini, Ausruesten, Profil4_4
  2598. IniRead, Profil4_5, settings.ini, Ausruesten, Profil4_5
  2599. IniRead, Profil4_6, settings.ini, Ausruesten, Profil4_6
  2600. IniRead, Profil4_7, settings.ini, Ausruesten, Profil4_7
  2601. Gui, 1: Add, Text, x22 y44 w110 h20 , Profil I (F4):
  2602. Gui, 1: Add, DropDownList, x142 y40 w90 h110 vProfil1_1, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2603. Gui, 1: Add, DropDownList, x242 y40 w90 h110 vProfil1_2, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2604. Gui, 1: Add, DropDownList, x342 y40 w90 h110 vProfil1_3, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2605. Gui, 1: Add, DropDownList, x442 y40 w90 h110 vProfil1_4, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2606. Gui, 1: Add, DropDownList, x542 y40 w90 h110 vProfil1_5, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2607. Gui, 1: Add, DropDownList, x642 y40 w90 h110 vProfil1_6, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2608. Gui, 1: Add, DropDownList, x742 y40 w90 h110 vProfil1_7, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2609. GuiControl, 1: Choose, Profil1_1, %Profil1_1%
  2610. GuiControl, 1: Choose, Profil1_2, %Profil1_2%
  2611. GuiControl, 1: Choose, Profil1_3, %Profil1_3%
  2612. GuiControl, 1: Choose, Profil1_4, %Profil1_4%
  2613. GuiControl, 1: Choose, Profil1_5, %Profil1_5%
  2614. GuiControl, 1: Choose, Profil1_6, %Profil1_6%
  2615. GuiControl, 1: Choose, Profil1_7, %Profil1_7%
  2616. Gui, 1: Add, Text, x22 y94 w110 h20 , Profil II (F5):
  2617. Gui, 1: Add, DropDownList, x142 y90 w90 h110 vProfil2_1, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2618. Gui, 1: Add, DropDownList, x242 y90 w90 h110 vProfil2_2, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2619. Gui, 1: Add, DropDownList, x342 y90 w90 h110 vProfil2_3, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2620. Gui, 1: Add, DropDownList, x442 y90 w90 h110 vProfil2_4, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2621. Gui, 1: Add, DropDownList, x542 y90 w90 h110 vProfil2_5, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2622. Gui, 1: Add, DropDownList, x642 y90 w90 h110 vProfil2_6, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2623. Gui, 1: Add, DropDownList, x742 y90 w90 h110 vProfil2_7, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2624. GuiControl, 1: Choose, Profil2_1, %Profil2_1%
  2625. GuiControl, 1: Choose, Profil2_2, %Profil2_2%
  2626. GuiControl, 1: Choose, Profil2_3, %Profil2_3%
  2627. GuiControl, 1: Choose, Profil2_4, %Profil2_4%
  2628. GuiControl, 1: Choose, Profil2_5, %Profil2_5%
  2629. GuiControl, 1: Choose, Profil2_6, %Profil2_6%
  2630. GuiControl, 1: Choose, Profil2_7, %Profil2_7%
  2631. Gui, 1: Add, Text, x22 y146 w110 h20 , Profil III (F6):
  2632. Gui, 1: Add, DropDownList, x142 y140 w90 h110 vProfil3_1, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2633. Gui, 1: Add, DropDownList, x242 y140 w90 h110 vProfil3_2, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2634. Gui, 1: Add, DropDownList, x342 y140 w90 h110 vProfil3_3, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2635. Gui, 1: Add, DropDownList, x442 y140 w90 h110 vProfil3_4, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2636. Gui, 1: Add, DropDownList, x542 y140 w90 h110 vProfil3_5, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2637. Gui, 1: Add, DropDownList, x642 y140 w90 h110 vProfil3_6, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2638. Gui, 1: Add, DropDownList, x742 y140 w90 h110 vProfil3_7, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2639. GuiControl, 1: Choose, Profil3_1, %Profil3_1%
  2640. GuiControl, 1: Choose, Profil3_2, %Profil3_2%
  2641. GuiControl, 1: Choose, Profil3_3, %Profil3_3%
  2642. GuiControl, 1: Choose, Profil3_4, %Profil3_4%
  2643. GuiControl, 1: Choose, Profil3_5, %Profil3_5%
  2644. GuiControl, 1: Choose, Profil3_6, %Profil3_6%
  2645. GuiControl, 1: Choose, Profil3_7, %Profil3_7%
  2646. Gui, 1: Add, Text, x12 y196 w110 h20 , Profil IV (ALT+F5):
  2647. Gui, 1: Add, DropDownList, x142 y190 w90 h110 vProfil4_1, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2648. Gui, 1: Add, DropDownList, x242 y190 w90 h110 vProfil4_2, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2649. Gui, 1: Add, DropDownList, x342 y190 w90 h110 vProfil4_3, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2650. Gui, 1: Add, DropDownList, x442 y190 w90 h110 vProfil4_4, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2651. Gui, 1: Add, DropDownList, x542 y190 w90 h110 vProfil4_5, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2652. Gui, 1: Add, DropDownList, x642 y190 w90 h110 vProfil4_6, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2653. Gui, 1: Add, DropDownList, x742 y190 w90 h110 vProfil4_7, ||Messer|Deagle|Shotgun|MP5|M4|Sniper
  2654. GuiControl, 1: Choose, Profil4_1, %Profil4_1%
  2655. GuiControl, 1: Choose, Profil4_2, %Profil4_2%
  2656. GuiControl, 1: Choose, Profil4_3, %Profil4_3%
  2657. GuiControl, 1: Choose, Profil4_4, %Profil4_4%
  2658. GuiControl, 1: Choose, Profil4_5, %Profil4_5%
  2659. GuiControl, 1: Choose, Profil4_6, %Profil4_6%
  2660. GuiControl, 1: Choose, Profil4_7, %Profil4_7%
  2661. Gui, 1: Add, Button, x338 y235 w150 h40 gSpeichern, Speichern
  2662. Gui, 1: Add, Button, x488 y235 w150 h40 gReset, Reset all
  2663. Gui, 1: Add, button, x850 y40 w90 h22 gReset1, Reset I
  2664. Gui, 1: Add, button, x850 y90 w90 h22 gReset2, Reset II
  2665. Gui, 1: Add, button, x850 y140 w90 h22 gReset3, Reset III
  2666. Gui, 1: Add, button, x850 y190 w90 h22 gReset4, Reset IV
  2667. Gui, 1: Show, w967 h280, Ausrüsten
  2668. return
  2669. Einstellungen:
  2670. Gui, 2: Destroy
  2671. IniRead, DrogenSkill, settings.ini, Jobs, DrogenSkill
  2672. Gui, 2: Add, Text, x10 y25 w110 h20 , Drogendealer-Skill:
  2673. Gui, 2: Add, DropDownList, x110 y22 w60 h95 vDrogenSkill, 1|2|3|4|5
  2674. GuiControl, 2: Choose, DrogenSkill, %DrogenSkill%
  2675. Gui, 2: Show, w200 h300, Einstellungen
  2676. Gui, 2: Add, Button, x40 y235 w150 h40 gSpeichern2, Speichern
  2677. return
  2678. Speichern2:
  2679. GuiControlGet, DrogenSkill
  2680. IniWrite, %DrogenSkill%, settings.ini, Jobs, DrogenSkill
  2681. IniRead, DrogenSkill, settings.ini, Jobs, DrogenSkill
  2682. MsgBox, 64, , Einstellungen erfolgreich gespeichert.`nDer Keybinder startet nun neu.
  2683. Gui, 2: Destroy
  2684. Reload
  2685. return
  2686. Speichern:
  2687. GuiControlGet, Profil1_1
  2688. GuiControlGet, Profil1_2
  2689. GuiControlGet, Profil1_3
  2690. GuiControlGet, Profil1_4
  2691. GuiControlGet, Profil1_5
  2692. GuiControlGet, Profil1_6
  2693. GuiControlGet, Profil1_7
  2694. GuiControlGet, Profil2_1
  2695. GuiControlGet, Profil2_2
  2696. GuiControlGet, Profil2_3
  2697. GuiControlGet, Profil2_4
  2698. GuiControlGet, Profil2_5
  2699. GuiControlGet, Profil2_6
  2700. GuiControlGet, Profil2_7
  2701. GuiControlGet, Profil3_1
  2702. GuiControlGet, Profil3_2
  2703. GuiControlGet, Profil3_3
  2704. GuiControlGet, Profil3_4
  2705. GuiControlGet, Profil3_5
  2706. GuiControlGet, Profil3_6
  2707. GuiControlGet, Profil3_7
  2708. GuiControlGet, Profil4_1
  2709. GuiControlGet, Profil4_2
  2710. GuiControlGet, Profil4_3
  2711. GuiControlGet, Profil4_4
  2712. GuiControlGet, Profil4_5
  2713. GuiControlGet, Profil4_6
  2714. GuiControlGet, Profil4_7
  2715. IniWrite, %Profil1_1%, settings.ini, Ausruesten, Profil1_1
  2716. IniWrite, %Profil1_2%, settings.ini, Ausruesten, Profil1_2
  2717. IniWrite, %Profil1_3%, settings.ini, Ausruesten, Profil1_3
  2718. IniWrite, %Profil1_4%, settings.ini, Ausruesten, Profil1_4
  2719. IniWrite, %Profil1_5%, settings.ini, Ausruesten, Profil1_5
  2720. IniWrite, %Profil1_6%, settings.ini, Ausruesten, Profil1_6
  2721. IniWrite, %Profil1_7%, settings.ini, Ausruesten, Profil1_7
  2722. IniWrite, %Profil2_1%, settings.ini, Ausruesten, Profil2_1
  2723. IniWrite, %Profil2_2%, settings.ini, Ausruesten, Profil2_2
  2724. IniWrite, %Profil2_3%, settings.ini, Ausruesten, Profil2_3
  2725. IniWrite, %Profil2_4%, settings.ini, Ausruesten, Profil2_4
  2726. IniWrite, %Profil2_5%, settings.ini, Ausruesten, Profil2_5
  2727. IniWrite, %Profil2_6%, settings.ini, Ausruesten, Profil2_6
  2728. IniWrite, %Profil2_7%, settings.ini, Ausruesten, Profil2_7
  2729. IniWrite, %Profil3_1%, settings.ini, Ausruesten, Profil3_1
  2730. IniWrite, %Profil3_2%, settings.ini, Ausruesten, Profil3_2
  2731. IniWrite, %Profil3_3%, settings.ini, Ausruesten, Profil3_3
  2732. IniWrite, %Profil3_4%, settings.ini, Ausruesten, Profil3_4
  2733. IniWrite, %Profil3_5%, settings.ini, Ausruesten, Profil3_5
  2734. IniWrite, %Profil3_6%, settings.ini, Ausruesten, Profil3_6
  2735. IniWrite, %Profil3_7%, settings.ini, Ausruesten, Profil3_7
  2736. IniWrite, %Profil4_1%, settings.ini, Ausruesten, Profil4_1
  2737. IniWrite, %Profil4_2%, settings.ini, Ausruesten, Profil4_2
  2738. IniWrite, %Profil4_3%, settings.ini, Ausruesten, Profil4_3
  2739. IniWrite, %Profil4_4%, settings.ini, Ausruesten, Profil4_4
  2740. IniWrite, %Profil4_5%, settings.ini, Ausruesten, Profil4_5
  2741. IniWrite, %Profil4_6%, settings.ini, Ausruesten, Profil4_6
  2742. IniWrite, %Profil4_7%, settings.ini, Ausruesten, Profil4_7
  2743. IniRead, Profil1_1, settings.ini, Ausruesten, Profil1_1
  2744. IniRead, Profil1_2, settings.ini, Ausruesten, Profil1_2
  2745. IniRead, Profil1_3, settings.ini, Ausruesten, Profil1_3
  2746. IniRead, Profil1_4, settings.ini, Ausruesten, Profil1_4
  2747. IniRead, Profil1_5, settings.ini, Ausruesten, Profil1_5
  2748. IniRead, Profil1_6, settings.ini, Ausruesten, Profil1_6
  2749. IniRead, Profil1_7, settings.ini, Ausruesten, Profil1_7
  2750. IniRead, Profil2_1, settings.ini, Ausruesten, Profil2_1
  2751. IniRead, Profil2_2, settings.ini, Ausruesten, Profil2_2
  2752. IniRead, Profil2_3, settings.ini, Ausruesten, Profil2_3
  2753. IniRead, Profil2_4, settings.ini, Ausruesten, Profil2_4
  2754. IniRead, Profil2_5, settings.ini, Ausruesten, Profil2_5
  2755. IniRead, Profil2_6, settings.ini, Ausruesten, Profil2_6
  2756. IniRead, Profil2_7, settings.ini, Ausruesten, Profil2_7
  2757. IniRead, Profil3_1, settings.ini, Ausruesten, Profil3_1
  2758. IniRead, Profil3_2, settings.ini, Ausruesten, Profil3_2
  2759. IniRead, Profil3_3, settings.ini, Ausruesten, Profil3_3
  2760. IniRead, Profil3_4, settings.ini, Ausruesten, Profil3_4
  2761. IniRead, Profil3_5, settings.ini, Ausruesten, Profil3_5
  2762. IniRead, Profil3_6, settings.ini, Ausruesten, Profil3_6
  2763. IniRead, Profil3_7, settings.ini, Ausruesten, Profil3_7
  2764. IniRead, Profil4_1, settings.ini, Ausruesten, Profil4_1
  2765. IniRead, Profil4_2, settings.ini, Ausruesten, Profil4_2
  2766. IniRead, Profil4_3, settings.ini, Ausruesten, Profil4_3
  2767. IniRead, Profil4_4, settings.ini, Ausruesten, Profil4_4
  2768. IniRead, Profil4_5, settings.ini, Ausruesten, Profil4_5
  2769. IniRead, Profil4_6, settings.ini, Ausruesten, Profil4_6
  2770. IniRead, Profil4_7, settings.ini, Ausruesten, Profil4_7
  2771. MsgBox, 64, , Einstellungen erfolgreich gespeichert.`nDer Keybinder startet nun neu.
  2772. Gui, 1: Destroy
  2773. Reload
  2774. return
  2775. Reset:
  2776. Profil1_1 :=
  2777. Profil1_2 :=
  2778. Profil1_3 :=
  2779. Profil1_4 :=
  2780. Profil1_5 :=
  2781. Profil1_6 :=
  2782. Profil1_7 :=
  2783. Profil2_1 :=
  2784. Profil2_2 :=
  2785. Profil2_3 :=
  2786. Profil2_4 :=
  2787. Profil2_5 :=
  2788. Profil2_6 :=
  2789. Profil2_7 :=
  2790. Profil3_1 :=
  2791. Profil3_2 :=
  2792. Profil3_3 :=
  2793. Profil3_4 :=
  2794. Profil3_5 :=
  2795. Profil3_6 :=
  2796. Profil3_7 :=
  2797. Profil4_1 :=
  2798. Profil4_2 :=
  2799. Profil4_3 :=
  2800. Profil4_4 :=
  2801. Profil4_5 :=
  2802. Profil4_6 :=
  2803. Profil4_7 :=
  2804. IniWrite, %Profil1_1%, settings.ini, Ausruesten, Profil1_1
  2805. IniWrite, %Profil1_2%, settings.ini, Ausruesten, Profil1_2
  2806. IniWrite, %Profil1_3%, settings.ini, Ausruesten, Profil1_3
  2807. IniWrite, %Profil1_4%, settings.ini, Ausruesten, Profil1_4
  2808. IniWrite, %Profil1_5%, settings.ini, Ausruesten, Profil1_5
  2809. IniWrite, %Profil1_6%, settings.ini, Ausruesten, Profil1_6
  2810. IniWrite, %Profil1_7%, settings.ini, Ausruesten, Profil1_7
  2811. IniWrite, %Profil2_1%, settings.ini, Ausruesten, Profil2_1
  2812. IniWrite, %Profil2_2%, settings.ini, Ausruesten, Profil2_2
  2813. IniWrite, %Profil2_3%, settings.ini, Ausruesten, Profil2_3
  2814. IniWrite, %Profil2_4%, settings.ini, Ausruesten, Profil2_4
  2815. IniWrite, %Profil2_5%, settings.ini, Ausruesten, Profil2_5
  2816. IniWrite, %Profil2_6%, settings.ini, Ausruesten, Profil2_6
  2817. IniWrite, %Profil2_7%, settings.ini, Ausruesten, Profil2_7
  2818. IniWrite, %Profil3_1%, settings.ini, Ausruesten, Profil3_1
  2819. IniWrite, %Profil3_2%, settings.ini, Ausruesten, Profil3_2
  2820. IniWrite, %Profil3_3%, settings.ini, Ausruesten, Profil3_3
  2821. IniWrite, %Profil3_4%, settings.ini, Ausruesten, Profil3_4
  2822. IniWrite, %Profil3_5%, settings.ini, Ausruesten, Profil3_5
  2823. IniWrite, %Profil3_6%, settings.ini, Ausruesten, Profil3_6
  2824. IniWrite, %Profil3_7%, settings.ini, Ausruesten, Profil3_7
  2825. IniWrite, %Profil4_1%, settings.ini, Ausruesten, Profil4_1
  2826. IniWrite, %Profil4_2%, settings.ini, Ausruesten, Profil4_2
  2827. IniWrite, %Profil4_3%, settings.ini, Ausruesten, Profil4_3
  2828. IniWrite, %Profil4_4%, settings.ini, Ausruesten, Profil4_4
  2829. IniWrite, %Profil4_5%, settings.ini, Ausruesten, Profil4_5
  2830. IniWrite, %Profil4_6%, settings.ini, Ausruesten, Profil4_6
  2831. IniWrite, %Profil4_7%, settings.ini, Ausruesten, Profil4_7
  2832. MsgBox, 64, , Einstellungen erfolgreich gespeichert.`nDer Keybinder startet nun neu.
  2833. Gui, 1: Destroy
  2834. Reload
  2835. return
  2836. Reset1:
  2837. Profil1_1 :=
  2838. Profil1_2 :=
  2839. Profil1_3 :=
  2840. Profil1_4 :=
  2841. Profil1_5 :=
  2842. Profil1_6 :=
  2843. Profil1_7 :=
  2844. IniWrite, %Profil1_1%, settings.ini, Ausruesten, Profil1_1
  2845. IniWrite, %Profil1_2%, settings.ini, Ausruesten, Profil1_2
  2846. IniWrite, %Profil1_3%, settings.ini, Ausruesten, Profil1_3
  2847. IniWrite, %Profil1_4%, settings.ini, Ausruesten, Profil1_4
  2848. IniWrite, %Profil1_5%, settings.ini, Ausruesten, Profil1_5
  2849. IniWrite, %Profil1_6%, settings.ini, Ausruesten, Profil1_6
  2850. IniWrite, %Profil1_7%, settings.ini, Ausruesten, Profil1_7
  2851. MsgBox, 64, , Profil I erfolgreich resettet.`nDer Keybinder startet nun neu.
  2852. Gui, 1: Destroy
  2853. Reload
  2854. return
  2855. Reset2:
  2856. Profil2_1 :=
  2857. Profil2_2 :=
  2858. Profil2_3 :=
  2859. Profil2_4 :=
  2860. Profil2_5 :=
  2861. Profil2_6 :=
  2862. Profil2_7 :=
  2863. IniWrite, %Profil2_1%, settings.ini, Ausruesten, Profil2_1
  2864. IniWrite, %Profil2_2%, settings.ini, Ausruesten, Profil2_2
  2865. IniWrite, %Profil2_3%, settings.ini, Ausruesten, Profil2_3
  2866. IniWrite, %Profil2_4%, settings.ini, Ausruesten, Profil2_4
  2867. IniWrite, %Profil2_5%, settings.ini, Ausruesten, Profil2_5
  2868. IniWrite, %Profil2_6%, settings.ini, Ausruesten, Profil2_6
  2869. IniWrite, %Profil2_7%, settings.ini, Ausruesten, Profil2_7
  2870. MsgBox, 64, , Profil II erfolgreich resettet.`nDer Keybinder startet nun neu.
  2871. Gui, 1: Destroy
  2872. Reload
  2873. return
  2874. Reset3:
  2875. Profil3_1 :=
  2876. Profil3_2 :=
  2877. Profil3_3 :=
  2878. Profil3_4 :=
  2879. Profil3_5 :=
  2880. Profil3_6 :=
  2881. Profil3_7 :=
  2882. IniWrite, %Profil3_1%, settings.ini, Ausruesten, Profil3_1
  2883. IniWrite, %Profil3_2%, settings.ini, Ausruesten, Profil3_2
  2884. IniWrite, %Profil3_3%, settings.ini, Ausruesten, Profil3_3
  2885. IniWrite, %Profil3_4%, settings.ini, Ausruesten, Profil3_4
  2886. IniWrite, %Profil3_5%, settings.ini, Ausruesten, Profil3_5
  2887. IniWrite, %Profil3_6%, settings.ini, Ausruesten, Profil3_6
  2888. IniWrite, %Profil3_7%, settings.ini, Ausruesten, Profil3_7
  2889. MsgBox, 64, , Profil III erfolgreich resettet.`nDer Keybinder startet nun neu.
  2890. Gui, 1: Destroy
  2891. Reload
  2892. return
  2893. Reset4:
  2894. Profil4_1 :=
  2895. Profil4_2 :=
  2896. Profil4_3 :=
  2897. Profil4_4 :=
  2898. Profil4_5 :=
  2899. Profil4_6 :=
  2900. Profil4_7 :=
  2901. IniWrite, %Profil4_1%, settings.ini, Ausruesten, Profil4_1
  2902. IniWrite, %Profil4_2%, settings.ini, Ausruesten, Profil4_2
  2903. IniWrite, %Profil4_3%, settings.ini, Ausruesten, Profil4_3
  2904. IniWrite, %Profil4_4%, settings.ini, Ausruesten, Profil4_4
  2905. IniWrite, %Profil4_5%, settings.ini, Ausruesten, Profil4_5
  2906. IniWrite, %Profil4_6%, settings.ini, Ausruesten, Profil4_6
  2907. IniWrite, %Profil4_7%, settings.ini, Ausruesten, Profil4_7
  2908. MsgBox, 64, , Profil IV erfolgreich resettet.`nDer Keybinder startet nun neu.
  2909. Gui, 1: Destroy
  2910. Reload
  2911. return
  2912. PlayerInput(text){
  2913. s := A_IsSuspended
  2914. Suspend On
  2915. KeyWait Enter
  2916. SendInput t^a{backspace}%text%
  2917. Input, var, v, {enter}
  2918. SendInput ^a{backspace 100}{enter}
  2919. Sleep, 20
  2920. if(!s)
  2921. Suspend Off
  2922. return var
  2923. }
  2924. :*?:/kd::
  2925. Suspend Permit
  2926. SetFormat, float, 0.2
  2927. IniRead, deaths, settings.ini, Killzähler, Deaths
  2928. IniRead, kills, settings.ini, Killzähler, Kills
  2929. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Kills: {FF0303}" . kills . " |{FFFFFF} Deaths: {FF0303}" . Deaths . " |{FFFFFF} K/D: {FF0303}" . Kills / Deaths . "")
  2930. Suspend Off
  2931. return
  2932. :*?:/fkd::
  2933. Suspend Permit
  2934. SetFormat, float, 0.2
  2935. IniRead, deaths, settings.ini, Killzähler, Deaths
  2936. IniRead, kills, settings.ini, Killzähler, Kills
  2937. SendChat("/f Kills: " . kills . " | Deaths: " . Deaths . " | K/D: " . Kills / Deaths . "")
  2938. Suspend Off
  2939. return
  2940. :*?:/okd::
  2941. Suspend Permit
  2942. SetFormat, float, 0.2
  2943. IniRead, deaths, settings.ini, Killzähler, Deaths
  2944. IniRead, kills, settings.ini, Killzähler, Kills
  2945. SendChat("/org Kills: " . kills . " | Deaths: " . Deaths . " | K/D: " . Kills / Deaths . "")
  2946. Suspend Off
  2947. return
  2948. :*?:/kills::
  2949. IniRead, kills, settings.ini, Killzähler, Kills
  2950. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Kills: {FF0303}" . Kills . "")
  2951. return
  2952. :*?:/deaths::
  2953. IniRead, deaths, settings.ini, Killzähler, Deaths
  2954. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Tode: {FF0303}" . Deaths . "")
  2955. return
  2956. NumpadAdd::
  2957. IniRead, Kills , settings.ini, Killzähler, Kills
  2958. Kills +=1
  2959. IniWrite, %Kills%, settings.ini, Killzähler, Kills
  2960. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Kills: {FF0303}" . Kills . "")
  2961. return
  2962. !NumpadAdd::
  2963. IniRead, Deaths, settings.ini, Killzähler, Deaths
  2964. Deaths +=1
  2965. IniWrite, %deaths%, settings.ini, Killzähler, Deaths
  2966. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Tode: {FF0303}" . Deaths . "")
  2967. return
  2968. Systeme:
  2969. if(!WinActive("GTA:SA:MP"))
  2970. return
  2971. GetPlayerName(name)
  2972. GetChatLine(0, Chat0)
  2973. GetChatLine(1, Chat1)
  2974. GetChatLine(2, Chat2)
  2975. killed := 0
  2976. HP := GetPlayerHealth()
  2977. if(instr(Chat0, "" . name . " benutzt ein Erste-Hilfe-Paket und versorgt die Wunden.")){
  2978. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Paket-Cooldown auf {FF0303}10{FFFFFF} Minuten gesetzt.")
  2979. sleep, 600000
  2980. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Du kannst nun wieder ein Erste-Hilfe-Paket verwenden.")
  2981. }
  2982. if(HP == 0){
  2983. IniRead, Deaths, settings.ini, Killzähler, Deaths
  2984. Deaths +=1
  2985. IniWrite, %deaths%, settings.ini, Killzähler, Deaths
  2986. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Tode: {FF0303}" . Deaths . "")
  2987. sleep, 20000
  2988. }
  2989. if(instr(Chat0, "Benutze /accept Paket")){
  2990. SendChat("/accept paket")
  2991. }
  2992. if(instr(Chat1, "Du hast Premium (permanent).")){
  2993. SendChat("/hitsound")
  2994. Sleep 500
  2995. SendChat("/tog")
  2996. Sleep, 200
  2997. SendInput {enter}
  2998. }
  2999. if(instr(Chat0, "Hitsound deaktiviert")){
  3000. SendChat("/hitsound")
  3001. }
  3002. if(instr(Chat0, "Deine Identität ist wieder sichtbar")){
  3003. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Du kannst deine Maske in {FF0303}5 {FFFFFF}Minuten wieder verwenden.")
  3004. sleep, 300000
  3005. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Du kannst deine Maske wieder verwenden.")
  3006. }
  3007. if(instr(Chat0, "Der Spieler befindet sich in Market")){
  3008. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  3009. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  3010. posY := ReadMemory_(exe,0xC7DECC,"Float")
  3011. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  3012. CloseMemory_(exe)
  3013. posX := Floor(posX)
  3014. posY := Floor(posY)
  3015. posZ := Floor(posZ)
  3016. if(GetDistancebetween(1163.2358,-1323.2552,15.3945, posX, posY, posZ) <= 3)
  3017. {
  3018. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Spieler befindet sich im Krankenhaus.")
  3019. }
  3020. }
  3021. if(instr(Chat0, "Der Spieler befindet sich in Commerce")){
  3022. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  3023. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  3024. posY := ReadMemory_(exe,0xC7DECC,"Float")
  3025. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  3026. CloseMemory_(exe)
  3027. x := Floor(posX)
  3028. y := Floor(posY)
  3029. z := Floor(posZ)
  3030. if(IsPlayerInNoDM(x, y, z))
  3031. {
  3032. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Spieler befindet sich in einer No-Dm Zone.")
  3033. }
  3034. else
  3035. {
  3036. }
  3037. }
  3038. if(instr(Chat0, "Der Spieler befindet sich in El Corona")){
  3039. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  3040. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  3041. posY := ReadMemory_(exe,0xC7DECC,"Float")
  3042. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  3043. CloseMemory_(exe)
  3044. x := Floor(posX)
  3045. y := Floor(posY)
  3046. z := Floor(posZ)
  3047. if(IsPlayerInNoDM(x, y, z))
  3048. {
  3049. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Spieler befindet sich in einer No-Dm Zone.")
  3050. }
  3051. else
  3052. {
  3053. }
  3054. }
  3055. return
  3056. :?:/fshow::
  3057. suspend permit
  3058. cID := playerinput("ID: ")
  3059. GetPlayerNameById(cID, gesuchter)
  3060. SendInput, {enter}
  3061. sleep, 100
  3062. SendChat("/find " cID)
  3063. sleep, 300
  3064. GetChatLine(0, fshow)
  3065. if(InStr(fshow,"Der Spieler befindet sich in "))
  3066. {
  3067. RegExMatch(fshow,"Der Spieler befindet sich in (.*)", params)
  3068. pos := params1
  3069. SendChat("/f " gesuchter " befindet sich in " pos "")
  3070. }
  3071. else
  3072. {
  3073. }
  3074. return
  3075. :?:/savestats::
  3076. FormatTime, Zeit,,HH:mm
  3077. FormatTime, Datum,,dd.MM.yyyy
  3078. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Uhrzeit: {FF0303}" zeit "{FFFFFF} Datum: {FF0303}" Datum "")
  3079. sleep, 100
  3080. SendChat("/stats")
  3081. SendChat("/time")
  3082. sleep, 200
  3083. SendInput {f8}
  3084. sleep, 100
  3085. SendInput {enter}
  3086. return
  3087. :?:/cd::
  3088. Suspend Permit
  3089. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} Countdown mit < abbrechen.")
  3090. SendChat("Es folgt ein Countdown!")
  3091. Sleep 1500
  3092. SendChat(">>3<<")
  3093. KeyWait, <, D T1
  3094. If !ErrorLevel
  3095. {
  3096. return
  3097. }
  3098. SendChat(">>2<<")
  3099. KeyWait, <, D T1
  3100. If !ErrorLevel
  3101. {
  3102. return
  3103. }
  3104. SendChat(">>1<<")
  3105. KeyWait, <, D T1
  3106. If !ErrorLevel
  3107. {
  3108. return
  3109. }
  3110. SendChat("Letzte Warnung!")
  3111. Sleep, 2000
  3112. return
  3113. ~4::
  3114. if(IsInChat())
  3115. return
  3116. fisch++
  3117. SendChat("/eat "fisch)
  3118. if(fisch==5)
  3119. {
  3120. sleep 100
  3121. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} {FFFFFF} Du hast keine Fische mehr.")
  3122. fisch := 0
  3123. }
  3124. return
  3125. ~1::
  3126. if(IsInChat() || (IsPlayerDriver() == 0))
  3127. return
  3128. If(IsPlayerDriver() == 1 && IsVehicleEngineEnabled() == 0)
  3129. {
  3130. SendChat("/motor")
  3131. Sendchat("/lock")
  3132. sleep, 1000
  3133. Sendchat("/licht")
  3134. }
  3135. else
  3136. if(IsPlayerDriver() == 1 && IsVehicleEngineEnabled() == 1 && IsVehicleLocked() == 0)
  3137. {
  3138. SendChat("/lock")
  3139. }
  3140. else
  3141. if(IsPlayerDriver() == 1 && IsVehicleEngineEnabled() == 1 && IsVehicleLocked() == 1 && IsVehicleLightEnabled() == 0)
  3142. {
  3143. sendChat("/licht")
  3144. }
  3145. else
  3146. if(IsPlayerDriver() == 1 && IsVehicleEngineEnabled() == 1 && IsVehicleLocked() == 0 && IsVehicleLightEnabled() == 0)
  3147. {
  3148. sendChat("/licht")
  3149. sendChat("/lock")
  3150. }
  3151. else
  3152. if(IsPlayerDriver() == 1 && IsVehicleEngineEnabled() == 1 && IsVehicleLocked() == 1 && IsVehicleLightEnabled() == 1)
  3153. {
  3154. sendChat("/motor")
  3155. }
  3156. return
  3157. ~alt & m::
  3158. if(IsInChat())
  3159. return
  3160. SendChat("/members")
  3161. return
  3162. ~alt & o::
  3163. if(IsInChat())
  3164. return
  3165. SendChat("/orgmembers")
  3166. return
  3167. ~y::
  3168. if(IsInChat())
  3169. return
  3170. If(IsPlayerDriver())
  3171. {
  3172. Sendchat("/lock")
  3173. }
  3174. return
  3175. ~NumpadSub::
  3176. Sendchat("/auf")
  3177. return
  3178. ~!NumpadSub::
  3179. Sendchat("/zoll")
  3180. return
  3181. :?:/ct::
  3182. pcID := PlayerInput("Contract-ID: ")
  3183. GetPlayerNameById(pcID, ctName)
  3184. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Zielobjekt:{FF0303} " ctName "{FFFFFF} (Find mit '<' beenden).")
  3185. SendChat("/find " . pcID)
  3186. SetTimer, Find2, 6000
  3187. return
  3188. :?:/oc::
  3189. SendChat("/offlinecontract " ctName)
  3190. return
  3191. :?:/oct::
  3192. Suspend Permit
  3193. SendInput, /offlinecontract{space}
  3194. return
  3195. Find2:
  3196. SendChat("/find " . pcID)
  3197. return
  3198. :?:/afind::
  3199. Suspend Permit
  3200. Suspend On
  3201. SendInput, /find{space}
  3202. Input, AID, V I M,{enter}
  3203. Send {enter}
  3204. SetTimer, Find, 6000
  3205. Suspend Off
  3206. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Das automatische Suchen können Sie mit der Taste '<' deaktivieren.")
  3207. return
  3208. :?:/af::
  3209. Suspend Permit
  3210. Suspend On
  3211. SendInput, /find{space}
  3212. Input, AID, V I M,{enter}
  3213. Send {enter}
  3214. SetTimer, Find, 6000
  3215. Suspend Off
  3216. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Das automatische Zeigen können Sie mit der Taste '<' deaktivieren.")
  3217. return
  3218. Find:
  3219. SendChat("/find " . AID)
  3220. return
  3221. :?:/ashowpos::
  3222. Suspend Permit
  3223. Suspend On
  3224. SendInput, /showpos{space}
  3225. Input, AID, V I M,{enter}
  3226. Send {enter}
  3227. SetTimer, Show, 6000
  3228. Suspend Off
  3229. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Das automatische Zeigen können Sie mit der Taste '<' deaktivieren.")
  3230. return
  3231. :?:/as::
  3232. Suspend Permit
  3233. Suspend On
  3234. SendInput, /showpos{space}
  3235. Input, AID, V I M,{enter}
  3236. Send {enter}
  3237. SetTimer, Show, 6000
  3238. Suspend Off
  3239. return
  3240. Show:
  3241. SendChat("/showpos " . AID)
  3242. return
  3243. ~<::
  3244. if(IsInChat())
  3245. {
  3246. return
  3247. }
  3248. SetTimer, Find, Off
  3249. SetTimer, Show, Off
  3250. SetTimer, Find2, Off
  3251. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Automatisches System deaktiviert.")
  3252. return
  3253. :?:/verkaufen::
  3254. Suspend Permit
  3255. d:=GetPlayerMoney()
  3256. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Fische werden verkauft ...")
  3257. sendChat("/sell fish 1")
  3258. sendChat("/sell fish 2")
  3259. sleep, 1000
  3260. sendChat("/sell fish 3")
  3261. sendChat("/sell fish 4")
  3262. sleep, 1000
  3263. sendChat("/sell fish 5")
  3264. sleep, 1000
  3265. n:=GetPlayerMoney()
  3266. IniRead, FishMoney, Statistiken.ini, Statistiken, FishMoney
  3267. FishMoney += n-d
  3268. IniWrite, %FishMoney%, Statistiken.ini, Statistiken, FishMoney
  3269. sleep, 250
  3270. IniRead, FishMoney, Statistiken.ini, Statistiken, FishMoney
  3271. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Verdienst:{FF0303} " n-d "$ {FFFFFF}Gesamt Verdienst:{FF0303} " . FishMoney . "$")
  3272. return
  3273. :?:/fischen::
  3274. Suspend Permit
  3275. SendInput {Escape}
  3276. Spam := 0
  3277. Loop
  3278. {
  3279. SendChat("/fish")
  3280. Sleep 250
  3281. GetChatLine(1, chat1)
  3282. GetChatLine(0, chat)
  3283. If(InStr(chat, "Du kannst nur 5 Fische bei dir tragen.") OR InStr(chat, "Du bist an keinem Angelplatz (Big Wheel Rods) oder an einem Fischerboot!") OR InStr(chat, "Du kannst momentan nicht Angeln. Bitte warte einige Minuten."))
  3284. {
  3285. break
  3286. }
  3287. Else If(InStr(chat1, "WARNUNG: Hör auf zu Spamen, sonst wirst du gekickt!") OR InStr(chat, "WARNUNG: Hör auf zu Spamen, sonst wirst du gekickt!") )
  3288. {
  3289. Spam := Spam+1
  3290. If(Spam == 3)
  3291. {
  3292. Sleep 2000
  3293. }
  3294. }
  3295. Sleep 250
  3296. }
  3297. Suspend off
  3298. return
  3299. :?:/fishes::
  3300. Suspend Permit
  3301. SendChat("/fishes")
  3302. Sleep 250
  3303. GetChatLine(5, fish1)
  3304. GetChatLine(4, fish2)
  3305. GetChatLine(3, fish3)
  3306. GetChatLine(2, fish4)
  3307. GetChatLine(1, fish5)
  3308. RegExMatch(fish1, "\*\* \(1\) Fisch: (.*) \((.*) LBS\)", fisch1_)
  3309. RegExMatch(fish2, "\*\* \(2\) Fisch: (.*) \((.*) LBS\)", fisch2_)
  3310. RegExMatch(fish3, "\*\* \(3\) Fisch: (.*) \((.*) LBS\)", fisch3_)
  3311. RegExMatch(fish4, "\*\* \(4\) Fisch: (.*) \((.*) LBS\)", fisch4_)
  3312. RegExMatch(fish5, "\*\* \(5\) Fisch: (.*) \((.*) LBS\)", fisch5_)
  3313. HP1 = %fisch1_2%
  3314. HP1*=0.3
  3315. HP1 := Floor(HP1)
  3316. HP2 = %fisch2_2%
  3317. HP2*=0.3
  3318. HP2 := Floor(HP2)
  3319. HP3 = %fisch3_2%
  3320. HP3*=0.3
  3321. HP3 := Floor(HP3)
  3322. HP4 = %fisch4_2%
  3323. HP4*=0.3
  3324. HP4 := Floor(HP4)
  3325. HP5 = %fisch5_2%
  3326. HP5*=0.3
  3327. HP5 := Floor(HP5)
  3328. Gesamt := HP1 + HP2 + HP3 + HP4 + HP5
  3329. Wert1 := FischPreis(fisch1_1, fisch1_2)
  3330. Wert2 := FischPreis(fisch2_1, fisch2_2)
  3331. Wert3 := FischPreis(fisch3_1, fisch3_2)
  3332. Wert4 := FischPreis(fisch4_1, fisch4_2)
  3333. Wert5 := FischPreis(fisch5_1, fisch5_2)
  3334. Gesamt1 := Wert1 + Wert2 + Wert3 + Wert4 + Wert5
  3335. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3336. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3337. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3338. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3339. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3340. AddChatMessage(0xFFFFFF, "{FFFFFF}")
  3341. sleep, 200
  3342. AddChatMessage(0xFFFFFF, "{FFFFFF}------------------------{FF0303}[Hitman-Binder]{FFFFFF}------------------------")
  3343. AddChatMessage(0xFFFFFF, "{FF0303}**{FFFFFF} Deine gefangenen Fische:")
  3344. AddChatMessage(0xFFFFFF, "{FF0303}** (1) {FFFFFF}" fisch1_1 " ({FF0303}" fisch1_2 " LBS{FFFFFF}) | {FF0303}" Wert1 "$ {FFFFFF}|{FF0303} " HP1 " HP")
  3345. AddChatMessage(0xFFFFFF, "{FF0303}** (2) {FFFFFF}" fisch2_1 " ({FF0303}" fisch2_2 " LBS{FFFFFF}) | {FF0303}" Wert2 "$ {FFFFFF}|{FF0303} " HP2 " HP")
  3346. AddChatMessage(0xFFFFFF, "{FF0303}** (3) {FFFFFF}" fisch3_1 " ({FF0303}" fisch3_2 " LBS{FFFFFF}) | {FF0303}" Wert3 "$ {FFFFFF}|{FF0303} " HP3 " HP")
  3347. AddChatMessage(0xFFFFFF, "{FF0303}** (4) {FFFFFF}" fisch4_1 " ({FF0303}" fisch4_2 " LBS{FFFFFF}) | {FF0303}" Wert4 "$ {FFFFFF}|{FF0303} " HP4 " HP")
  3348. AddChatMessage(0xFFFFFF, "{FF0303}** (5) {FFFFFF}" fisch5_1 " ({FF0303}" fisch5_2 " LBS{FFFFFF}) | {FF0303}" Wert5 "$ {FFFFFF}|{FF0303} " HP5 " HP")
  3349. AddChatMessage(0xFFFFFF, "{FFFFFF}---------------------------------------------------------------------")
  3350. AddChatMessage(0xFFFFFF, "{FFFFFF} Gesamt: {FF0303}" Gesamt1 "$ {FFFFFF}oder {FF0303}" Gesamt " HP")
  3351. return
  3352. :?:/afish::
  3353. BilligWert := 1000000000000
  3354. FischNummer := 1
  3355. Weg := 0
  3356. geld := 0
  3357. Loop,
  3358. {
  3359. Sleep,1000
  3360. SendChat("/fish")
  3361. Sleep,200
  3362. GetChatLine(0, Fang)
  3363. If InStr(Fang, "LBS gefangen.")
  3364. {
  3365. RegExMatch(Fang, "Du hast ein/e (.*) mit (.*) LBS gefangen.",fischfang)
  3366. fischfangHP := fischfang2*0.3
  3367. fischfangHP := Floor(fischfangHP)
  3368. Wert := FischPreis(fischfang1, fischfang2)
  3369. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303}" fischfang1 "{FFFFFF} mit {FF0303}" fischfang2 " LBS ({FF0303}" fischfangHP " HP) {FFFFFF}Wert: {FF0303}" Wert "$")
  3370. geld := (geld+Wert)
  3371. IF(BilligWert>Wert)
  3372. {
  3373. Billig = %FischNummer%
  3374. BilligName = %fischfang1%
  3375. BilligWert = %Wert%
  3376. }
  3377. FischNummer++
  3378. }
  3379. else If InStr(Fang, "Du kannst nur 5 Fische bei dir tragen.")
  3380. {
  3381. IF(Weg == "1")
  3382. {
  3383. break
  3384. }
  3385. geld := (geld-BilligWert)
  3386. SendChat("/releasefish " Billig "")
  3387. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303}" Billig ": {FF0303}" BilligName "{FFFFFF} im Wert von: {FF0303}" BilligWert "$ {FFFFFF} weggeworfen!")
  3388. Weg := 1
  3389. FischNummer := 5
  3390. }
  3391. else If InStr(Fang, "Du bist an keinem Angelplatz (Big Wheel Rods) oder an einem Fischerboot!"){
  3392. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Du kannst hier nicht Angeln!")
  3393. return
  3394. }
  3395. else If InStr(Fang, "Du kannst momentan nicht Angeln. Bitte warte einige Minuten."){
  3396. If (geld > 0){
  3397. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Gesamt Wert {FF0303}" geld "$")
  3398. return
  3399. }
  3400. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Du kannst noch nicht Angeln!")
  3401. return
  3402. }
  3403. }
  3404. return
  3405. FischPreis(FishName, FishLBS){
  3406. If(FishName == "Delphin")
  3407. Preis := FishLBS*7
  3408. else If(FishName == "Makrele")
  3409. Preis := FishLBS*8
  3410. else If(FishName == "Segelfisch")
  3411. Preis := FishLBS*7
  3412. else If(FishName == "Bernfisch")
  3413. Preis := FishLBS*1
  3414. else If(FishName == "Hai")
  3415. Preis := FishLBS*7
  3416. else If(FishName == "Schwertfisch")
  3417. Preis := FishLBS*3
  3418. else If(FishName == "Schildkröte")
  3419. Preis := FishLBS*10
  3420. else If(FishName == "Thunfisch")
  3421. Preis := FishLBS*12
  3422. else If(FishName == "Hecht")
  3423. Preis := FishLBS*9
  3424. else If(FishName == "Aal")
  3425. Preis := FishLBS*9
  3426. else If(FishName == "Forelle")
  3427. Preis := FishLBS*5
  3428. else If(FishName == "Wolfbarsch")
  3429. Preis := FishLBS*12
  3430. else If(FishName == "Zackenbarsch")
  3431. Preis := FishLBS*3
  3432. else If(FishName == "Katzenfisch")
  3433. Preis := FishLBS*4
  3434. else If(FishName == "Blauer Fächerfisch")
  3435. Preis := FishLBS*4
  3436. else If(FishName == "Roter Schnapper")
  3437. Preis := FishLBS*3
  3438. If(Preis == "")
  3439. Preis := 0
  3440. return Preis
  3441. }
  3442. :?:/fische::
  3443. Suspend Permit
  3444. SendChat("/cooked")
  3445. Sleep 250
  3446. GetChatLine(5, fish1)
  3447. GetChatLine(4, fish2)
  3448. GetChatLine(3, fish3)
  3449. GetChatLine(2, fish4)
  3450. GetChatLine(1, fish5)
  3451. RegExMatch(fish1, "\*\* \(1\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch1_)
  3452. RegExMatch(fish2, "\*\* \(2\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch2_)
  3453. RegExMatch(fish3, "\*\* \(3\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch3_)
  3454. RegExMatch(fish4, "\*\* \(4\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch4_)
  3455. RegExMatch(fish5, "\*\* \(5\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch5_)
  3456. HP1 = %fisch1_2%
  3457. HP1*=0.3
  3458. HP1 := Floor(HP1)
  3459. HP2 = %fisch2_2%
  3460. HP2*=0.3
  3461. HP2 := Floor(HP2)
  3462. HP3 = %fisch3_2%
  3463. HP3*=0.3
  3464. HP3 := Floor(HP3)
  3465. HP4 = %fisch4_2%
  3466. HP4*=0.3
  3467. HP4 := Floor(HP4)
  3468. HP5 = %fisch5_2%
  3469. HP5*=0.3
  3470. HP5 := Floor(HP5)
  3471. Gesamt=0
  3472. Gesamt+=%HP1%
  3473. Gesamt+=%HP2%
  3474. Gesamt+=%HP3%
  3475. Gesamt+=%HP4%
  3476. Gesamt+=%HP5%
  3477. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}" . fisch1_1 . " (" . fisch1_2 . " LBS) - {FF0303} " . HP1 . " HP")
  3478. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}" . fisch2_1 . " (" . fisch2_2 . " LBS) - {FF0303} " . HP2 . " HP")
  3479. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}" . fisch3_1 . " (" . fisch3_2 . " LBS) - {FF0303} " . HP3 . " HP")
  3480. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}" . fisch4_1 . " (" . fisch4_2 . " LBS) - {FF0303} " . HP4 . " HP")
  3481. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}" . fisch5_1 . " (" . fisch5_2 . " LBS) - {FF0303} " . HP5 . " HP")
  3482. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}-----------------------------------------------")
  3483. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Gesamt: {FF0303}" . Gesamt . " HP")
  3484. return
  3485. :?:/kochen::
  3486. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Fische werden gekocht ...")
  3487. sendChat("/cook fish 1")
  3488. sendChat("/cook fish 2")
  3489. sleep, 1000
  3490. sendChat("/cook fish 3")
  3491. sendChat("/cook fish 4")
  3492. sleep, 1000
  3493. sendChat("/cook fish 5")
  3494. sleep, 1000
  3495. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FF0303} " "{FFFFFF}Alle Fische wurden gekocht ...")
  3496. return
  3497. :?:/on::
  3498. Suspend Permit
  3499. SendChat("/hitsound")
  3500. SendChat("/tog")
  3501. Sleep, 200
  3502. SendInput {enter}
  3503. return
  3504. ~ä::
  3505. if(IsInChat())
  3506. {
  3507. return
  3508. }
  3509. Suspend Permit
  3510. SendInput t{up}{enter}
  3511. return
  3512. ~3::
  3513. if(IsInChat())
  3514. return
  3515. SendChat("/erstehilfe")
  3516. return
  3517. ~2::
  3518. if(IsInChat())
  3519. return
  3520. SendChat("/usedrugs")
  3521. return
  3522. ~8::
  3523. if(IsInChat())
  3524. return
  3525. SendChat("/hram")
  3526. return
  3527. :?:/setkills::
  3528. wID := PlayerInput("Kills: ")
  3529. IniRead, Kills , settings.ini, Killzähler, Kills
  3530. Kills :=wID
  3531. IniWrite, %Kills%, settings.ini, Killzähler, Kills
  3532. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Kills: {FF0303}" . Kills . "")
  3533. return
  3534. :?:/setdeaths::
  3535. wID := PlayerInput("Deaths: ")
  3536. IniRead, Deaths , settings.ini, Killzähler, Deaths
  3537. Deaths :=wID
  3538. IniWrite, %Deaths%, settings.ini, Killzähler, Deaths
  3539. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Tode: {FF0303}" . Deaths . "")
  3540. return
  3541. :?:/sek::
  3542. SetFormat, float, 0
  3543. wID := PlayerInput("Sekunden: ")
  3544. min := wid/60
  3545. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Minuten: " min )
  3546. return
  3547. ~p::
  3548. if(IsInChat())
  3549. return
  3550. GetPlayerName(name)
  3551. GetZoneName(Zone)
  3552. GetCityName(City)
  3553. HP := GetPlayerHealth()
  3554. id := GetID()
  3555. if(IsPlayerInAnyInterior() == 1){
  3556. SendChat("/f Ich befinde mich derzeit in einem Interior - ID: " . id . " HP: " . HP . " ")
  3557. }
  3558. else {
  3559. SendChat("/f Aktuelle Position: " Zone ", " city " - ID: " . id . " HP: " . HP . " ")
  3560. }
  3561. return
  3562. ~numpad9::
  3563. if(IsInChat())
  3564. return
  3565. GetPlayerName(name)
  3566. GetZoneName(Zone)
  3567. GetCityName(City)
  3568. HP := GetPlayerHealth()
  3569. id := GetID()
  3570. SendChat("/f Need Backup in " Zone ", " City " - ID: " . id . " HP: " . HP . "")
  3571. SendChat("/service")
  3572. sleep, 100
  3573. SendInput, {down}
  3574. SendInput, {down}
  3575. SendInput, {down}
  3576. SendInput, {down}
  3577. SendInput, {down}
  3578. SendInput, {enter}
  3579. return
  3580. ~!numpad9::
  3581. if(IsInChat())
  3582. return
  3583. SendChat("/f Backup wird nicht mehr benötigt !")
  3584. SendChat("/cancel wheelman")
  3585. return
  3586. ~!p::
  3587. if(IsInChat())
  3588. return
  3589. id := GetID()
  3590. GetZoneName(zone)
  3591. GetCityName(city)
  3592. HP := GetPlayerHealth()
  3593. if(IsPlayerInAnyInterior() == 1){
  3594. SendChat("/org Ich befinde mich derzeit in einem Interior - ID: " . id . " HP: " . HP . " ")
  3595. }
  3596. else {
  3597. SendChat("/org Aktuelle Position: " Zone ", " city " - ID: " . id . " HP: " . HP . " ")
  3598. }
  3599. return
  3600. *LWin::
  3601. if(IsInChat())
  3602. return
  3603. SendChat("/contracts")
  3604. sleep 100
  3605. Zähler := 0
  3606. Loop, 100
  3607. {
  3608. GetChatLine(Zähler, Chat)
  3609. If(InStr(Chat, "$"))
  3610. Zähler++
  3611. else
  3612. {
  3613. sleep, 500
  3614. if(Zähler == 0){
  3615. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Es sind keine Contracts verfügbar.")
  3616. }else
  3617. if(Zähler == 1){
  3618. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Es ist {FF0303}1{FFFFFF} Contract verfügbar.")
  3619. }else{
  3620. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Es sind {FF0303}" Zähler "{FFFFFF} Contracts verfügbar.")
  3621. return
  3622. }
  3623. return
  3624. }
  3625. }
  3626. return
  3627. ~m::
  3628. if(IsInChat())
  3629. return
  3630. sendChat("/mask")
  3631. return
  3632. :?:/ap::
  3633. Suspend Permit
  3634. SendInput, /accept paket{enter}
  3635. return
  3636. :?:/shutdown::
  3637. sID := PlayerInput("Zeit in Minuten: ")
  3638. if(sID == > 1){
  3639. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} 0 Minuten sind nicht möglich.")
  3640. return
  3641. }else{
  3642. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Timer auf " . sID . " Minuten gesetzt.")
  3643. sTime := 60000*sID
  3644. SetTimer, Shutdown1, %sTime%
  3645. }
  3646. return
  3647. Shutdown1:
  3648. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Computer wird in 30 Sekunden heruntergefahren.")
  3649. sleep, 30000
  3650. Shutdown, 1
  3651. return
  3652. :?:/stopshutdown::
  3653. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Shutdown Timer wurde abgebrochen.")
  3654. SetTimer, Shutdown1, off
  3655. return
  3656. :?:/awh::
  3657. SendChat("/accept wheelman")
  3658. return
  3659. :?:/cw::
  3660. SendChat("/cancel wheelman")
  3661. return
  3662. ~alt & r::
  3663. if(IsInChat())
  3664. return
  3665. SendChat("/revert")
  3666. return
  3667. :?:/profil1::
  3668. IniRead, Profil1_1, settings.ini, Ausruesten, Profil1_1
  3669. IniRead, Profil1_2, settings.ini, Ausruesten, Profil1_2
  3670. IniRead, Profil1_3, settings.ini, Ausruesten, Profil1_3
  3671. IniRead, Profil1_4, settings.ini, Ausruesten, Profil1_4
  3672. IniRead, Profil1_5, settings.ini, Ausruesten, Profil1_5
  3673. IniRead, Profil1_6, settings.ini, Ausruesten, Profil1_6
  3674. IniRead, Profil1_7, settings.ini, Ausruesten, Profil1_7
  3675. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Ausrüstprofil 1: " . Profil1_1 . " " . Profil1_2 . " " . Profil1_3 . " " . Profil1_4 . " " . Profil1_5 . " " . Profil1_6 . " " . Profil1_7 . "")
  3676. return
  3677. *F4::
  3678. if(IsInChat())
  3679. return
  3680. IniRead, Profil1_1, settings.ini, Ausruesten, Profil1_1
  3681. IniRead, Profil1_2, settings.ini, Ausruesten, Profil1_2
  3682. IniRead, Profil1_3, settings.ini, Ausruesten, Profil1_3
  3683. IniRead, Profil1_4, settings.ini, Ausruesten, Profil1_4
  3684. IniRead, Profil1_5, settings.ini, Ausruesten, Profil1_5
  3685. IniRead, Profil1_6, settings.ini, Ausruesten, Profil1_6
  3686. IniRead, Profil1_7, settings.ini, Ausruesten, Profil1_7
  3687. SendChat("/ausruesten " . Profil1_1 . " " . Profil1_2 . " " . Profil1_3 . " " . Profil1_4 . " " . Profil1_5 . " " . Profil1_6 . " " . Profil1_7 . "")
  3688. return
  3689. ~F5::
  3690. if(IsInChat())
  3691. return
  3692. IniRead, Profil2_1, settings.ini, Ausruesten, Profil2_1
  3693. IniRead, Profil2_2, settings.ini, Ausruesten, Profil2_2
  3694. IniRead, Profil2_3, settings.ini, Ausruesten, Profil2_3
  3695. IniRead, Profil2_4, settings.ini, Ausruesten, Profil2_4
  3696. IniRead, Profil2_5, settings.ini, Ausruesten, Profil2_5
  3697. IniRead, Profil2_6, settings.ini, Ausruesten, Profil2_6
  3698. IniRead, Profil2_7, settings.ini, Ausruesten, Profil2_7
  3699. IniRead, Profil2_8, settings.ini, Ausruesten, Profil2_8
  3700. IniRead, Profil2_9, settings.ini, Ausruesten, Profil2_9
  3701. SendChat("/ausruesten " . Profil2_1 . " " . Profil2_2 . " " . Profil2_3 . " " . Profil2_4 . " " . Profil2_5 . " " . Profil2_6 . " " . Profil2_7 . " " . Profil2_8 . " " . Profil2_9 . "")
  3702. return
  3703. ~F6::
  3704. if(IsInChat())
  3705. return
  3706. IniRead, Profil3_1, settings.ini, Ausruesten, Profil3_1
  3707. IniRead, Profil3_2, settings.ini, Ausruesten, Profil3_2
  3708. IniRead, Profil3_3, settings.ini, Ausruesten, Profil3_3
  3709. IniRead, Profil3_4, settings.ini, Ausruesten, Profil3_4
  3710. IniRead, Profil3_5, settings.ini, Ausruesten, Profil3_5
  3711. IniRead, Profil3_6, settings.ini, Ausruesten, Profil3_6
  3712. IniRead, Profil3_7, settings.ini, Ausruesten, Profil3_7
  3713. SendChat("/ausruesten " . Profil3_1 . " " . Profil3_2 . " " . Profil3_3 . " " . Profil3_4 . " " . Profil3_5 . " " . Profil3_6 . " " . Profil3_7 . "")
  3714. return
  3715. ~alt & F5::
  3716. if(IsInChat())
  3717. return
  3718. IniRead, Profil4_1, settings.ini, Ausruesten, Profil4_1
  3719. IniRead, Profil4_2, settings.ini, Ausruesten, Profil4_2
  3720. IniRead, Profil4_3, settings.ini, Ausruesten, Profil4_3
  3721. IniRead, Profil4_4, settings.ini, Ausruesten, Profil4_4
  3722. IniRead, Profil4_5, settings.ini, Ausruesten, Profil4_5
  3723. IniRead, Profil4_6, settings.ini, Ausruesten, Profil4_6
  3724. IniRead, Profil4_7, settings.ini, Ausruesten, Profil4_7
  3725. SendChat("/ausruesten " . Profil4_1 . " " . Profil4_2 . " " . Profil4_3 . " " . Profil4_4 . " " . Profil4_5 . " " . Profil4_6 . " " . Profil4_7 . "")
  3726. return
  3727. Statistiken:
  3728. if(!WinActive("GTA:SA:MP"))
  3729. return
  3730. GetChatLine(0, Chat0)
  3731. GetChatLine(1, Chat1)
  3732. GetChatLine(2, Chat2)
  3733. GetChatLine(3, Chat3)
  3734. if(InStr(Chat2, "Hitman " . Name . " hat den Auftrag ausgeführt") && inStr(Chat2, "$ getötet.")){
  3735. IniRead, Aufträge3, Statistiken.ini, Statistiken, Aufträge3
  3736. Aufträge3 +=1
  3737. IniWrite, %Aufträge3%, Statistiken.ini, Statistiken, Aufträge3
  3738. }
  3739. if(InStr(Chat2, "Hitman " . Name . " hat den Auftrag ausgeführt") && inStr(Chat2, "$ getötet.")){
  3740. RegExMatch(Chat2, ".+ für (.+)\$ getöt.+", contract_)
  3741. IniRead, Aufträge, Statistiken.ini, Statistiken, Aufträge
  3742. IniRead, kills, settings.ini, Killzähler, Kills
  3743. Kills += 1
  3744. Aufträge +=%contract_1%
  3745. IniWrite, %Aufträge%, Statistiken.ini, Statistiken, Aufträge
  3746. IniWrite, %kills%, settings.ini, Killzähler, Kills
  3747. IniRead, Aufträge3, Statistiken.ini, Statistiken, Aufträge3
  3748. AddCHatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Verdienst: {FF0303}" . Aufträge . "${FFFFFF} durch{FF0303} " . Aufträge3 . "{FFFFFF} Contracts | Kills: {FF0303}" . kills . "")
  3749. }
  3750. if(InStr(Chat0, "Du hast das Ticket von") && inStr(Chat0, "geschlossen")){
  3751. IniRead, sTickets, Statistiken.ini, Statistiken, sTickets
  3752. sTickets +=1
  3753. IniWrite, %sTickets%, Statistiken.ini, Statistiken, sTickets
  3754. AddChatMessage(0xFFFFFF, "{FF0000}[Hitman-Binder]{FFA500} (Support){FFFFFF} Bearbeitete Tickets: {FF0303}" . sTickets . "")
  3755. }
  3756. return
  3757. :?:/settickets::
  3758. Suspend Permit
  3759. sTID := PlayerInput("Tickets: ")
  3760. IniRead, sTickets, Statistiken.ini, Statistiken, sTickets
  3761. sTickets :=sTID
  3762. IniWrite, %sTickets%, Statistiken.ini, Statistiken, sTickets
  3763. AddChatMessage(0xFFFFFF, "{FF0000}[Hitman-Binder]{FFA500} (Support){FFFFFF} Bearbeitete Tickets auf {FF0303}" . sTickets . " {FFFFFF}gesetzt.")
  3764. return
  3765. :?:/rcm::
  3766. IniRead, Aufträge, Statistiken.ini, Statistiken, Aufträge
  3767. Aufträge := 0
  3768. IniWrite, %Aufträge%, Statistiken.ini, Statistiken, Aufträge
  3769. AddCHatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Verdientes Geld durch Contracts resettet.")
  3770. return
  3771. :?:/rc::
  3772. IniRead, Aufträge3, Statistiken.ini, Statistiken, Aufträge3
  3773. Aufträge3 := 0
  3774. IniWrite, %Aufträge3%, Statistiken.ini, Statistiken, Aufträge3
  3775. AddCHatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Contracts resettet.")
  3776. return
  3777. :?:/resetall::
  3778. IniRead, Aufträge, Statistiken.ini, Statistiken, Aufträge
  3779. IniRead, Aufträge3, Statistiken.ini, Statistiken, Aufträge3
  3780. Aufträge := 0
  3781. Aufträge3 := 0
  3782. IniWrite, %Aufträge%, Statistiken.ini, Statistiken, Aufträge
  3783. IniWrite, %Aufträge3%, Statistiken.ini, Statistiken, Aufträge3
  3784. AddCHatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Statistiken resettet.")
  3785. return
  3786. :?:/hitmanstats::
  3787. Suspend Permit
  3788. SetFormat, Float, 0.1
  3789. Send, {Enter}
  3790. Sleep, 500
  3791. IniRead, Aufträge, Statistiken.ini, Statistiken, Aufträge
  3792. IniRead, Aufträge3, Statistiken.ini, Statistiken, Aufträge3
  3793. IniRead, deaths, settings.ini, Killzähler, Deaths
  3794. IniRead, kills, settings.ini, Killzähler, Kills
  3795. IniRead, fishmoney, Statistiken.ini, Statistiken, FishMoney
  3796. if(Aufträge = "ERROR")
  3797. {
  3798. Aufträge = 0
  3799. }
  3800. if(Aufträge3 = "ERROR")
  3801. {
  3802. Aufträge3 = 0
  3803. }
  3804. if(deaths = "ERROR")
  3805. {
  3806. deaths = 0
  3807. }
  3808. if(kills = "ERROR")
  3809. {
  3810. kills = 0
  3811. }
  3812. GetCityName(City)
  3813. GetZoneName(Zone)
  3814. HP := GetPlayerHealth()
  3815. GetPlayerName(name)
  3816. PlayerID := getId()
  3817. if(PlayerID != "65535" && PlayerID != "" && PlayerID != "-1")
  3818. {
  3819. stats := "{FF0303}Spieler-Infos:{FFFFFF}`nStandort: {FF0303}" zone "{FFFFFF}, {FF0303}" City "`n{FFFFFF}Leben: {FF0303}" HP "{FFFFFF}`nKills: {FF0303}" Kills "{FFFFFF}`nDeaths: {FF0303}" Deaths "{FFFFFF}`nK/D: {FF0303}" Kills / Deaths "`n`n{FF0303}Hitman-Stats:{FFFFFF}`n{FFFFFF}Ausgeführte Contracts: {FF0303}" Aufträge3 "{FFFFFF}`n{FFFFFF}Verdientes Geld: {FF0303}" Aufträge "{FF0303} $`n{FFFFFF}Durchschnittlicher Verdienst: {FF0303}" Aufträge / Aufträge3 "{FF0303} $`n{FFFFFF}Verdientes Geld durch Fische: {FF0303}" fishmoney "$"
  3820. ShowDialog(0, "{FFFFFF}Hitmanstatistiken ( {FF0303}" Name "{FFFFFF} )", stats, "OK")
  3821. }
  3822. return
  3823. ~alt & b::
  3824. if(IsInChat())
  3825. return
  3826. SendInput t/bankrob{enter}
  3827. return
  3828. :?:/cops::
  3829. Suspend Permit
  3830. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Cops online: ")
  3831. ArrayCount := 0
  3832. players := Object()
  3833. Loop, Read, cops.txt
  3834. {
  3835. if(strlen(A_LoopReadLine) < 1)
  3836. continue
  3837. id := getPlayerIdByName(A_LoopReadLine)
  3838. if(id != -1){
  3839. ArrayCount++
  3840. players[ArrayCount] := A_LoopReadLine
  3841. }
  3842. }
  3843. Counter := 0
  3844. final := ""
  3845. Loop, %ArrayCount%
  3846. {
  3847. Counter++
  3848. if(Counter < 4 && A_Index != ArrayCount){
  3849. element := players[A_Index]
  3850. id := getPlayerIdByName(element)
  3851. if(Counter == 1){
  3852. final = %element% [ID: %id%]
  3853. }else{
  3854. final = %final%, %element% [ID: %id%]
  3855. }
  3856. }else{
  3857. element := players[A_Index]
  3858. id := getPlayerIdByName(element)
  3859. if(Counter == 1){
  3860. final = %element% [ID: %id%]
  3861. }else{
  3862. final = %final%, %element% [ID: %id%]
  3863. }
  3864. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} " . final)
  3865. Counter := 0
  3866. final := ""
  3867. }
  3868. }
  3869. if(ArrayCount == 0)
  3870. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] !!Fehler: Es ist kein Cop Online!!")
  3871. return
  3872. :?:/copadd::
  3873. Suspend Permit
  3874. addPlayer := PlayerInput("Name (muss der genaue Name sein): ")
  3875. if(addPlayer != ""){
  3876. string = `n%addPlayer%
  3877. FileAppend, %string%, cops.txt
  3878. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Du hast " . addPlayer . " auf der Copliste eingefügt.")
  3879. }
  3880. return
  3881. :?:/copdel::
  3882. Suspend Permit
  3883. delPlayer := PlayerInput("Name (muss der genaue Name sein): ")
  3884. if(delPlayer != ""){
  3885. found := 0
  3886. fileInhalt := ""
  3887. Loop, Read, cops.txt
  3888. {
  3889. if(strlen(A_LoopReadLine) < 1)
  3890. continue
  3891. if(A_LoopReadLine == delPlayer){
  3892. found := 1
  3893. continue
  3894. }
  3895. fileInhalt = %fileInhalt%`n%A_LoopReadLine%
  3896. }
  3897. FileDelete, cops.txt
  3898. FileAppend, %fileInhalt%, cops.txt
  3899. if(found == 0){
  3900. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Der Spieler " . delPlayer . " ist nicht auf der Liste der Cops.")
  3901. }else{
  3902. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Du hast " . delPlayer . " von der Copliste entfernt.")
  3903. }
  3904. }else{
  3905. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF} Es ist ein Fehler aufgetreten. Versuch es erneut.")
  3906. }
  3907. return
  3908. :?:/khelp::
  3909. {
  3910. help := "Keybinds `n____________________________________`n`n 1 - /motor -/lock -/licht`ny - /lock`n2 - /usedrugs`n3 - /erstehilfe`n4 - /eat 1-5`nNumpad9 - Backup (/f) + /service wheelman`nAlt&Numpad9 - ^Kein Backup mehr`nALT + m - /members`nALT + c - /contracts`nNumpad- - /auf`nALT + Numpad- - /zoll`nm - /mask`n8 - /hram`n`n`nKurzbinds `n____________________________________`n`n/fischen(schnell)`n/afish (wirft billigsten weg)`n /verkaufen - Fische verkaufen`n/kochen - /cook fish`n/af | /as - Findsystem (< ~ Ende)`n/setkills - Kills einstellen`n/setdeaths - Tode einstellen`n/kd - K/D`n/hitmanstats - Statistiken (noch nicht fertig)`n/ov - Overlay`n/gk - GK System`n/on - Hitsound+Handy`n/Fische - HP der gekochten Fische`n/aw - /accept wheelman`n/cw - /cancel wheelman`nALT+R - /revert`n/shutdown [Min] - Schaltet den PC nach der Zeit ab`n/stopshutdown - Beendet den Shutdowntimer`n/ap - /accept paket"
  3911. ShowDialog(0, "{FFFFFF}Keybinder-Hilfe", help, "OK")
  3912. }
  3913. return
  3914. :?:/fg::
  3915. suspend permit
  3916. SendChat("/festgeld 1250000")
  3917. return
  3918. :?:/kh::
  3919. Suspend Permit
  3920. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  3921. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  3922. posY := ReadMemory_(exe,0xC7DECC,"Float")
  3923. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  3924. CloseMemory_(exe)
  3925. posX := Floor(posX)
  3926. posY := Floor(posY)
  3927. posZ := Floor(posZ)
  3928. if(GetDistancebetween(1163.2358,-1323.2552,15.3945, posX, posY, posZ) <= 3)
  3929. {
  3930. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Spieler befindet sich im Krankenhaus.")
  3931. }
  3932. else
  3933. {
  3934. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Spieler befindet sich{FF0000} NICHT{FFFFFF} im Krankenhaus.")
  3935. }
  3936. return
  3937. Tankstelle:
  3938. if(Freigabe == 1)
  3939. {
  3940. if(IsPlayerInAnyVehicle() == 1 && IsPlayerDriver() == 1)
  3941. {
  3942. if(IsPlayerInRangeOfPoint_fast(614.7936,1689.5481,6.5567, 10) || IsPlayerInRangeOfPoint_fast(-1328.5437,2677.2109,49.6285, 10) || IsPlayerInRangeOfPoint_fast(1595.7455,2198.9319,10.3875, 10) || IsPlayerInRangeOfPoint_fast(2202.3479,2473.9041,10.3849, 10) || IsPlayerInRangeOfPoint_fast(2113.8887,920.1363,10.3840, 10) || IsPlayerInRangeOfPoint_fast(-2408.7478,975.8612,44.8655, 10) || IsPlayerInRangeOfPoint_fast(-2029.3025,156.4132,28.4108, 10) || IsPlayerInRangeOfPoint_fast(-1676.3165,414.2832,6.7490, 10) || IsPlayerInRangeOfPoint_fast(1004.1802,-939.2733,41.7504, 10) || IsPlayerInRangeOfPoint_fast(1944.1013,-1772.9907,12.9622, 10) || IsPlayerInRangeOfPoint_fast(-90.6283,-1169.5378,1.9707, 10) || IsPlayerInRangeOfPoint_fast(-1605.3982,-2714.4424,48.5335, 10) || IsPlayerInRangeOfPoint_fast(-2243.8896,-2560.5569,31.9219, 10) || IsPlayerInRangeOfPoint_fast(1380.9418,457.1429,19.4861, 10) || IsPlayerInRangeOfPoint_fast(70.4341,1218.6842,18.3743, 10) || IsPlayerInRangeOfPoint_fast(1555.4310,-1605.5901,13.1827, 10) || IsPlayerInRangeOfPoint_fast(700.0808,-1933.6973,3.6108, 20) || IsPlayerInRangeOfPoint_fast(1833,-2431,16.6, 20))
  3943. {
  3944. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Du kannst jetzt mit {FF0303}X{FFFFFF} tanken.")
  3945. KeyWait, X, D, T10
  3946. if !Errorlevel
  3947. {
  3948. Freigabe := 0
  3949. if(IsVehicleEngineEnabled() == 1)
  3950. {
  3951. SendChat("/motor")
  3952. }
  3953. SendChat("/fill")
  3954. Sleep, 10000
  3955. SendChat("/motor")
  3956. Sleep, 2600
  3957. SendChat("/licht")
  3958. SetTimer, Zähler, 5000
  3959. Var := 0
  3960. }
  3961. else
  3962. {
  3963. Freigabe := 1
  3964. }
  3965. }
  3966. }
  3967. else if(IsPlayerInAnyVehicle() == 0)
  3968. {
  3969. if(IsPlayerInRangeOfPoint_fast(614.7936,1689.5481,6.5567, 10) || IsPlayerInRangeOfPoint_fast(-1328.5437,2677.2109,49.6285, 10) || IsPlayerInRangeOfPoint_fast(1595.7455,2198.9319,10.3875, 10) || IsPlayerInRangeOfPoint_fast(2202.3479,2473.9041,10.3849, 10) || IsPlayerInRangeOfPoint_fast(2113.8887,920.1363,10.3840, 10) || IsPlayerInRangeOfPoint_fast(-2408.7478,975.8612,44.8655, 10) || IsPlayerInRangeOfPoint_fast(-2029.3025,156.4132,28.4108, 10) || IsPlayerInRangeOfPoint_fast(-1676.3165,414.2832,6.7490, 10) || IsPlayerInRangeOfPoint_fast(1004.1802,-939.2733,41.7504, 10) || IsPlayerInRangeOfPoint_fast(1944.1013,-1772.9907,12.9622, 10) || IsPlayerInRangeOfPoint_fast(-90.6283,-1169.5378,1.9707, 10) || IsPlayerInRangeOfPoint_fast(-1605.3982,-2714.4424,48.5335, 10) || IsPlayerInRangeOfPoint_fast(-2243.8896,-2560.5569,31.9219, 10) || IsPlayerInRangeOfPoint_fast(1380.9418,457.1429,19.4861, 10) || IsPlayerInRangeOfPoint_fast(70.4341,1218.6842,18.3743, 10) || IsPlayerInRangeOfPoint_fast(1555.4310,-1605.5901,13.1827, 10) || IsPlayerInRangeOfPoint_fast(700.0808,-1933.6973,3.6108, 20) || IsPlayerInRangeOfPoint_fast(1833,-2431,16.6, 20))
  3970. {
  3971. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Du kannst jetzt mit {FF0303}X{FFFFFF} einen Kanister kaufen.")
  3972. KeyWait, X, D, T10
  3973. if !Errorlevel
  3974. {
  3975. Freigabe := 0
  3976. if(IsPlayerInAnyVehicle() == 0)
  3977. {
  3978. SendChat("/kanister")
  3979. }
  3980. SetTimer, Zähler, 5000
  3981. Var := 0
  3982. }
  3983. else
  3984. {
  3985. Freigabe := 1
  3986. }
  3987. }
  3988. }
  3989. }
  3990. return
  3991. Drogen:
  3992. IniRead, DrogenSkill, settings.ini, Jobs, DrogenSkill
  3993. dpakete := Round(DrogenSkill * 2 + 2, 0)
  3994. if(Freigabe == 1)
  3995. {
  3996. if(IsPlayerInRangeOfPoint_fast(330.9,-40.5,2.2, 7))
  3997. {
  3998. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Du kannst jetzt mit {FF0303}X{FFFFFF} Drogen holen.")
  3999. KeyWait, X, D, T10
  4000. if !Errorlevel
  4001. {
  4002. Freigabe := 0
  4003. SendChat("/drogen get " dpakete "")
  4004. SetTimer, Zähler, 5000
  4005. Var := 0
  4006. }
  4007. else
  4008. {
  4009. Freigabe := 1
  4010. }
  4011. }
  4012. if(IsPlayerInRangeOfPoint_fast(-208.3,2712.7,62.9, 7))
  4013. {
  4014. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Du kannst jetzt mit {FF0303}X{FFFFFF} deine Drogen-Pakete in Drogen umwandeln.")
  4015. KeyWait, X, D, T10
  4016. if !Errorlevel
  4017. {
  4018. Freigabe := 0
  4019. if(IsPlayerInAnyVehicle() == 0)
  4020. {
  4021. SendChat("/drogen deliver")
  4022. }
  4023. SetTimer, Zähler, 5000
  4024. Var := 0
  4025. }
  4026. else
  4027. {
  4028. Freigabe := 1
  4029. }
  4030. }
  4031. }
  4032. return
  4033. FixVeh:
  4034. if(Freigabe == 1)
  4035. {
  4036. if(IsPlayerInAnyVehicle() == 1)
  4037. {
  4038. if(IsPlayerInRangeOfPoint_fast(700.0808,-1933.6973,3.6108, 20) || IsPlayerInRangeOfPoint_fast(1833,-2431,16.6, 20))
  4039. {
  4040. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Du kannst dein Fahrzeug jetzt mit {FF0303}R{FFFFFF} reparieren.")
  4041. KeyWait, R, D, T10
  4042. if !Errorlevel
  4043. {
  4044. Freigabe := 0
  4045. if(IsPlayerInAnyVehicle() == 1)
  4046. {
  4047. SendChat("/fixveh")
  4048. }
  4049. SetTimer, Zähler, 5000
  4050. Var := 0
  4051. }
  4052. }
  4053. }
  4054. }
  4055. return
  4056. Zähler:
  4057. var++
  4058. if(var = 4 || var > 4)
  4059. {
  4060. SetTimer, Zähler, off
  4061. Freigabe := 1
  4062. }
  4063. return
  4064. :?:/tankstellen::
  4065. Suspend Permit
  4066. text := "Name`tBesitzer`tTeilhaber`tLiterpreis`n"
  4067. URLDownloadToFile, http://knole.pf-control.de/RPGAPI/getPetrols.php, test.txt
  4068. FileRead, it, test.txt
  4069. FileDelete, text.txt
  4070. StringSplit, string, it, |
  4071. Loop, % string0
  4072. {
  4073. RegExMatch(string%A_Index%, "name=(.+):inhaber=(.+):teilhaber=(.+):literpreis=(.+)", it)
  4074. text .= it1 "`t" . it2 . "`t" . it3 . "`t" . it4 . "$`n"
  4075. }
  4076. ShowDialog(5, "Tankstellen (by Tom.Perry)", text, "Ok")
  4077. return
  4078. :?:/gebiete::
  4079. Suspend Permit
  4080. text := "Gebiet`tBesitzer`tNoch gesperrt`n"
  4081. URLDownloadToFile, http://knole.pf-control.de/RPGAPI/getCurrentZones.php, test.txt
  4082. FileRead, it, test.txt
  4083. FileDelete, text.txt
  4084. StringSplit, string, it, |
  4085. Loop, % string0
  4086. {
  4087. RegExMatch(string%A_Index%, "name=(.+):inhaber=(.+):gesperrt=(.+)", it)
  4088. text .= it1 "`t" . it2 . "`t" . it3 . "`n"
  4089. }
  4090. ShowDialog(5, "Gangfightgebiete (by Tom.Perry)", text, "Ok")
  4091. return
  4092. :?:/cords::
  4093. Suspend Permit
  4094. GetPlayerPosition(x, y, z, r)
  4095. cord1 := x
  4096. cord2 := y
  4097. cord3 := z
  4098. cord4 := r
  4099. sID := playerInput("Standortbeschreibung: ")
  4100. IniWrite, %cord1%, Standorte.ini, %sID%, X
  4101. IniWrite, %cord2%, Standorte.ini, %sID%, Y
  4102. IniWrite, %cord3%, Standorte.ini, %sID%, Z
  4103. IniWrite, %cord4%, Standorte.ini, %sID%, R
  4104. sleep, 100
  4105. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Standort: {FF0303}" sID "{FFFFFF} mit Koordinaten eingespeichert.")
  4106. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}X: {FF0303}" cord1 "")
  4107. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Y: {FF0303}" cord2 "")
  4108. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Z: {FF0303}" cord3 "")
  4109. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}R: {FF0303}" cord4 "")
  4110. return
  4111. xpath(ByRef doc, step, set = "") {
  4112. static sc, scb = ""
  4113. If step contains %scb%
  4114. Return
  4115. sid := scb . &doc . ":"
  4116. If (InStr(step, "select:") == 1) {
  4117. stsl = 1
  4118. StringTrimLeft, step, step, 7
  4119. }
  4120. If (InStr(step, "/") == 1)
  4121. str = 1
  4122. Else {
  4123. StringGetPos, p, sc, %sid%
  4124. If ErrorLevel = 1
  4125. t = /
  4126. Else StringMid, t, sc, p += StrLen(sid) + 1, InStr(sc, scb, "", p + 2) - p
  4127. step = %t%/%step%
  4128. }
  4129. step := RegExReplace(step, "(?<=^|/)(?:[^\[/@]+/\.{2}|\.)(?:/|$)|^.+(?=//)")
  4130. If (str == 1 or stsl == 1) {
  4131. xpr := RegExReplace(step, (str == 1 and stsl != 1 ? "/(?:\w+:)?\w+(?:\[[^\]]*])?" : "")
  4132. . "(?:/@.*?|/\w+\(\))*$")
  4133. StringReplace, xpr, xpr, [-1], [1], All
  4134. StringReplace, xpr, xpr, [+1], [last()], All
  4135. StringGetPos, p, sc, %sid%
  4136. If ErrorLevel = 1
  4137. sc = %sc%%sid%%xpr%%scb%
  4138. Else sc := SubStr(sc, 1, p += StrLen(sid)) . xpr . SubStr(sc, InStr(sc, scb, "", p))
  4139. }
  4140. If (InStr(step, "|")) {
  4141. StringSplit, s, step, |, `n`t `r
  4142. Loop, %s0%
  4143. res .= xpath(doc, s%A_Index%, set) . ","
  4144. Return, SubStr(res, 1, -1)
  4145. }
  4146. Else If (InStr(step, "//") == 1) {
  4147. StringTrimLeft, step, step, 2
  4148. re = 1
  4149. rew = 1
  4150. xp = /(?:(?:\w+:)?\w+)*/
  4151. }
  4152. NumPut(160, doc, 0, "UChar")
  4153. Loop, Parse, step, /
  4154. {
  4155. s = %A_LoopField%
  4156. If (InStr(s, "*") == 1)
  4157. {
  4158. re = 1
  4159. s := "(?:\w+:)?\w+" . SubStr(s, 2)
  4160. }
  4161. Else If (InStr(s, "@") == 1) {
  4162. StringTrimLeft, atr, s, 1
  4163. Continue
  4164. }
  4165. StringGetPos, p, s, [
  4166. If ErrorLevel = 0
  4167. {
  4168. If s contains [+1],[-1]
  4169. {
  4170. If A_Index = 2
  4171. {
  4172. StringLeft, t, s, p
  4173. t = <%t%/:: ></%t%/>
  4174. If (InStr(s, "+1")) {
  4175. If doc =
  4176. doc = .
  4177. doc = %doc%%t%
  4178. }
  4179. Else doc = .%t%%doc%
  4180. StringLeft, s, s, InStr(s, "[") - 1
  4181. }
  4182. Else {
  4183. nw = %nw%%s%
  4184. Continue
  4185. }
  4186. }
  4187. Else {
  4188. If (InStr(s, "last()")) {
  4189. StringLeft, t, s, p
  4190. t := "<" . SubStr(xp, 2) . t . "/:: "
  4191. If re
  4192. {
  4193. os = 0
  4194. Loop
  4195. If (!os := RegExMatch(doc, t, "", 1 + os)) {
  4196. t = %A_Index%
  4197. Break
  4198. }
  4199. t--
  4200. }
  4201. Else {
  4202. StringReplace, doc, doc, %t%, %t%, UseErrorLevel
  4203. t = %ErrorLevel%
  4204. }
  4205. If (RegExMatch(s, "i)last\(\)\s*\-\s*(\d+)", a))
  4206. StringReplace, s, s, %a%, % t - a1
  4207. Else StringReplace, s, s, last(), %t%
  4208. }
  4209. ax = %ax%%xp%%s%
  4210. StringLeft, s, s, p
  4211. }
  4212. }
  4213. Else If (InStr(s, "()")) {
  4214. fn = %fn%+%s%
  4215. Continue
  4216. }
  4217. xp = %xp%%s%/
  4218. }
  4219. If (xp == "" or xp == "/")
  4220. Return
  4221. StringTrimLeft, xp, xp, 1
  4222. StringTrimRight, ax, ax, 1
  4223. StringTrimRight, nw, nw, 1
  4224. ct = 0
  4225. os = 0
  4226. Loop {
  4227. If re
  4228. os := RegExMatch(doc, "<" . xp . ":: ", "", 1 + os)
  4229. , osx := RegExMatch(doc, "</" . xp . ">", rem, os) + StrLen(rem)
  4230. Else {
  4231. StringGetPos, osx, doc, </%xp%>, , os := InStr(doc, "<" . xp . ":: ", true, 1 + os)
  4232. osx += 4 + StrLen(xp)
  4233. }
  4234. If os = 0
  4235. Break
  4236. If ax !=
  4237. {
  4238. sk = 0
  4239. Loop, Parse, ax, ]
  4240. {
  4241. If (!RegExMatch(A_LoopField, "/?(.*?)\[(.+?)(?:\s*([<>!=]{1,2})\s*(['""])?(.+)(?(4)\4))?\s*$", a))
  4242. Continue
  4243. a1 = %a1%/
  4244. If re
  4245. RegExMatch(rem, "(?<=^</)" . a1, a1)
  4246. If a2 is integer
  4247. {
  4248. StringGetPos, t, a1, /, R2
  4249. StringMid, t, a1, 1, t + 1
  4250. t := InStr(SubStr(doc, 1, os), "<" . t . ":: ", true, 0)
  4251. StringMid, sub, doc, t, InStr(doc, ">", "", os) - t
  4252. xpf := "<" . a1 . ":: "
  4253. StringReplace, sub, sub, %xpf%, %xpf%, UseErrorLevel
  4254. If a2 != %ErrorLevel%
  4255. sk = 1
  4256. Continue
  4257. }
  4258. StringReplace, xp, xp, /, /, UseErrorLevel
  4259. t = %ErrorLevel%
  4260. StringReplace, a1, a1, /, /, UseErrorLevel
  4261. If t = %ErrorLevel%
  4262. StringMid, sub, doc, os, osx - os
  4263. Else StringMid, sub, doc
  4264. , t := InStr(SubStr(doc, 1, os), "<" . a1 . ":: ", true, 0)
  4265. , InStr(doc, "</" . a1 . ">", true, t) + 1
  4266. If a2 = position()
  4267. sub = %i%
  4268. Else If (InStr(a2, "@") == 1)
  4269. RegExMatch(SubStr(sub, 1, InStr(sub, ">"))
  4270. , a3 == "" ? "\b" . SubStr(a2, 2) . "=([""'])[^\1]*?\1"
  4271. : "\b(?<=" . SubStr(a2, 2) . "=([""']))[^\1]+?(?=\1)", sub)
  4272. Else
  4273. {
  4274. If a2 = .
  4275. a2 = /
  4276. Else a2 = %a2%/
  4277. StringMid, sub, sub
  4278. , t := InStr(sub, ">", "", InStr(sub, "<" . a1 . a2 . ":: ", true) + 1) + 1
  4279. , InStr(sub, "</" . a1 . a2 . ">", true) - t
  4280. }
  4281. sk += !(a3 == "" ? (sub != "")
  4282. : a3 == "=" ? sub == a5
  4283. : a3 == "!=" ? sub != a5
  4284. : a3 == ">" ? sub > a5
  4285. : a3 == ">=" ? sub >= a5
  4286. : a3 == "<" ? sub < a5
  4287. : a3 == "<=" ? sub <= a5)
  4288. }
  4289. If sk != 0
  4290. Continue
  4291. }
  4292. If nw !=
  4293. {
  4294. If re
  4295. nwp := SubStr(rem, 3, -1)
  4296. Else nwp = %xp%
  4297. Loop, Parse, nw, ]
  4298. {
  4299. StringLeft, nwn, A_LoopField, InStr(A_LoopField, "[") - 1
  4300. nwn = %nwn%/
  4301. nwt = <%nwp%%nwn%:: ></%nwp%%nwn%>
  4302. If (t := InStr(A_LoopField, "-1")
  4303. ? InStr(doc, ">", "", InStr(doc, "<" . nwp . ":: ", true, os) + 1) + 1
  4304. : InStr(doc, "</" . nwp . ">", true, os))
  4305. os := t
  4306. StringLen, osx, nwt
  4307. osx += os
  4308. doc := SubStr(doc, 1, os - 1) . nwt . SubStr(doc, os)
  4309. nwp = %nwp%%nwn%
  4310. }
  4311. StringLen, t, nwp
  4312. If (InStr(fn, "+text()") and atr == "")
  4313. os += t + 5, osx -= t + 3
  4314. }
  4315. If atr !=
  4316. {
  4317. If (t := RegExMatch(SubStr(doc, os, InStr(doc, ">", "", os) - os), InStr(fn, "+text()")
  4318. ? "(?<=\b" . atr . "=([""']))[^\1]*?(?=\1)"
  4319. : "\b" . atr . "=([""'])[^\1]*?\1", rem))
  4320. os += t - 1, osx := os + StrLen(rem)
  4321. Else {
  4322. os := InStr(doc, ">", "", os + 1)
  4323. , doc := SubStr(doc, 1, os - 1) . " " . atr . "=""""" . SubStr(doc, os)
  4324. , osx := ++os + StrLen(atr) + 3
  4325. If (InStr(fn, "+text()"))
  4326. osx := os += StrLen(atr) + 2
  4327. }
  4328. }
  4329. Else If (InStr(fn, "+text()") and nw == "")
  4330. os := InStr(doc, ">", "", os) + 1, osx := InStr(doc, re ? rem : "</" . xp . ">", true, os)
  4331. If InStr(fn, "+index-of()")
  4332. sub = %A_Index%
  4333. Else StringMid, sub, doc, os, osx - os
  4334. If (InStr(fn, "+count()"))
  4335. ct++
  4336. Else res = %res%%sub%,
  4337. If (set != "" or InStr(fn, "+remove()"))
  4338. setb = %setb%%os%.%osx%|
  4339. }
  4340. If setb !=
  4341. {
  4342. If (InStr(set, "node:") == 1) {
  4343. set := SubStr(xpath(doc, SubStr(set, 6) . "/rawsrc()"), 2)
  4344. StringReplace, set, set, <, <%xp%, All
  4345. StringReplace, set, set, <%xp%/, </%xp%, All
  4346. NumPut(160, doc, 0, "UChar")
  4347. }
  4348. StringTrimRight, setb, setb, 1
  4349. Loop, Parse, setb, |
  4350. {
  4351. StringSplit, setp, A_LoopField, .
  4352. StringLen, t, xp
  4353. If (InStr(fn, "+append()"))
  4354. setp2 := setp1 := setp2 - t - 3
  4355. Else If (InStr(fn, "+prepend()"))
  4356. setp2 := setp1 := InStr(doc, ">", "", setp1) + 2
  4357. doc := SubStr(doc, 1, setp1 - 1) . set . SubStr(doc, setp2)
  4358. }
  4359. }
  4360. If (InStr(fn, "+count()"))
  4361. res = %ct%,
  4362. nsid := scb . &doc . ":"
  4363. If nsid != %sid%
  4364. StringReplace, sc, sc, %sid%, %nsid%
  4365. NumPut(0, doc, 0, "UChar")
  4366. StringTrimRight, res, res, 1
  4367. If (InStr(fn, "+rawsrc()")) {
  4368. StringTrimLeft, t, xpr, 1
  4369. StringReplace, res, res, <%t%/, <, All
  4370. StringReplace, res, res, </%t%, <, All
  4371. StringReplace, res, res, `,, `,%scb%, All
  4372. Return, scb . res
  4373. }
  4374. Return, RegExReplace(res, "S)(?<=<)(\/)?(?:(\w+)\/)+(?(1)|:: )", "$1$2")
  4375. }
  4376. xpath_save(ByRef doc, src = "") {
  4377. xml := RegExReplace(SubStr(doc, 2), "S)(?<=<)(\/)?(?:(\w+)\/)+(?(1)|:: )", "$1$2")
  4378. xml := RegExReplace(xml, "<([\w:]+)([^>]*)><\/\1>", "<$1$2 />")
  4379. xml := RegExReplace(xml, "^\s+|\s+$")
  4380. If InStr(xml, "<?xml") != 1
  4381. xml = <?xml version="1.0" encoding="iso-8859-1"?>`n%xml%
  4382. StringReplace, xml, xml, `r, , All
  4383. StringReplace, xml, xml, `n, `r`n, All
  4384. sp := " "
  4385. StringLen, sl, sp
  4386. s =
  4387. VarSetCapacity(sxml, StrLen(xml) * 1.1)
  4388. Loop, Parse, xml, <, `n`t `r
  4389. {
  4390. If A_LoopField =
  4391. Continue
  4392. If (sb := InStr(A_LoopField, "/") == 1)
  4393. StringTrimRight, s, s, sl
  4394. sxml = %sxml%`n%s%<%A_LoopField%
  4395. If sb
  4396. StringTrimRight, s, s, sl
  4397. If (InStr(A_LoopField, "?") != 1 and InStr(A_LoopField, "!") != 1
  4398. and !InStr(A_LoopField, "/>"))
  4399. s .= sp
  4400. }
  4401. StringTrimLeft, sxml, sxml, 1
  4402. sxml := RegExReplace(sxml, "(\n(?:" . sp . ")*<((?:\w+:)?\w+\b)[^<]+?)\n(?:"
  4403. . sp . ")*</\2>", "$1</$2>")
  4404. If src =
  4405. Return, sxml
  4406. FileDelete, %src%
  4407. FileAppend, %sxml%, %src%
  4408. Return, ErrorLevel
  4409. }
  4410. xpath_load(ByRef doc, src = "") {
  4411. If src =
  4412. src = %doc%
  4413. Else If FileExist(src)
  4414. FileRead, src, %src%
  4415. If src not contains <?xml,?>
  4416. Return, false
  4417. src := RegExReplace(src, "<((?:\w+:)?\w+\b)([^>]*)\/\s*>", "<$1$2></$1>")
  4418. , VarSetCapacity(doc, VarSetCapacity(xml, StrLen(src) * 1.5) * 1.1)
  4419. Loop, Parse, src, <
  4420. {
  4421. If (A_Index == 2 and InStr(A_LoopField, "?xml") == 1)
  4422. Continue
  4423. Else If (InStr(A_LoopField, "?") == 1)
  4424. xml = %xml%<%A_LoopField%
  4425. Else If (InStr(A_LoopField, "![CDATA[") == 1) {
  4426. cdata := SubStr(A_LoopField, 9, -3)
  4427. StringReplace, cdata, cdata, ", &quot;, All
  4428. StringReplace, cdata, cdata, &, &amp;, All
  4429. StringReplace, cdata, cdata, ', &apos;, All
  4430. StringReplace, cdata, cdata, <, &lt;, All
  4431. StringReplace, cdata, cdata, >, &gt;, All
  4432. xml = %xml%%cdata%
  4433. }
  4434. Else If (!pos := RegExMatch(A_LoopField, "^\/?(?:\w+:)?\w+", tag))
  4435. {
  4436. If A_LoopField is not space
  4437. xml = %xml%&lt;%A_LoopField%
  4438. }
  4439. Else {
  4440. StringMid, ex, A_LoopField, pos + StrLen(tag)
  4441. If InStr(tag, "/") = 1 {
  4442. xml = %xml%</%pre%%ex%
  4443. StringGetPos, pos, pre, /, R2
  4444. StringLeft, pre, pre, pos + 1
  4445. }
  4446. Else {
  4447. pre = %pre%%tag%/
  4448. xml = %xml%<%pre%:: %ex%
  4449. }
  4450. }
  4451. }
  4452. StringReplace, doc, xml, `,, &#44;, All
  4453. Return, true
  4454. }
  4455. :?:/gk::
  4456. if(isChatOpen())
  4457. gk(playerInput("Gebäudekomplex: "))
  4458. Return
  4459. :?:/showmap::
  4460. if(isChatOpen())
  4461. showMap(playerInput("ID: "))
  4462. Return
  4463. :?:/hidemap::
  4464. if(isChatOpen())
  4465. hideMap()
  4466. Return
  4467. showMap(id) {
  4468. global mapimage_id
  4469. global mapbox_id
  4470. global maptext1_id
  4471. global maptext2_id
  4472. FoundPos := RegExMatch(id, "^(public|house|faction)\.(\d+)$", regex_)
  4473. if(FoundPos == 0)
  4474. return addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Fehler: Die ID wurde falsch formatiert.")
  4475. SuccessLevel := xpath_load(xpath, A_Temp . "\gk.xml")
  4476. if(SuccessLevel != 1)
  4477. return addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Fehler: Die Gebäudekomplexe konnten nicht geladen werden.")
  4478. count := xpath(xpath, "/gks[@filter=1]/" . regex_1 . "/gk[@id=" . regex_2 . "]/count()")
  4479. if(count > 0) {
  4480. name := xpath(xpath, "/gks[@filter=1]/" . regex_1 . "/gk[@id=" . regex_2 . "]/name/text()")
  4481. x := xpath(xpath, "/gks[@filter=1]/" . regex_1 . "/gk[@id=" . regex_2 . "]/x/text()")
  4482. y := xpath(xpath, "/gks[@filter=1]/" . regex_1 . "/gk[@id=" . regex_2 . "]/y/text()")
  4483. ImageDestroy(mapimage_id)
  4484. BoxDestroy(mapbox_id)
  4485. TextDestroy(maptext1_id)
  4486. TextDestroy(maptext2_id)
  4487. UrlDownloadToFile, http://cp.rpg-city.de/images/map_%x%_%y%.png?big, %A_Temp%\map.png
  4488. mapimage_id := ImageCreate(A_Temp . "\map.png", 580, 450, 0, mapbox_id, 1)
  4489. mapbox_id := BoxCreate(580, 450, 135, 24, 0xE0000000, 1)
  4490. maptext1_id := TextCreate("arial", "7", 1, 0, 583, 452, 0xFFFFFFFF, name . " (" . regex_1 . "." . regex_2 . ")", 1, 1)
  4491. maptext2_id := TextCreate("arial", "7", 1, 0, 583, 462, 0xFFFFFFFF, calculateZone(x, y, 0.0) . ", " calculateCity(x, y, 0.0), 1, 1)
  4492. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Die Map wurde geöffnet.")
  4493. }
  4494. else
  4495. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Es wurden keine Gebäudekomplexe gefunden.")
  4496. return
  4497. }
  4498. hideMap() {
  4499. global mapimage_id
  4500. global mapbox_id
  4501. global maptext1_id
  4502. global maptext2_id
  4503. ImageDestroy(mapimage_id)
  4504. BoxDestroy(mapbox_id)
  4505. TextDestroy(maptext1_id)
  4506. TextDestroy(maptext2_id)
  4507. mapimage_id := ""
  4508. mapbox_id := ""
  4509. maptext1_id := ""
  4510. maptext2_id := ""
  4511. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Die Map wurde geschlossen.")
  4512. return
  4513. }
  4514. gk(gk) {
  4515. FoundPos := RegExMatch(gk, "^(\d+)\.(\d+)$", regex_)
  4516. if(FoundPos == 0)
  4517. return addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Fehler: Der Gebäudekomplex wurde falsch formatiert.")
  4518. UrlDownloadToFile, http://www.sampcp.tk/gk/%regex_1%.%regex_2%, %A_Temp%\gk.xml
  4519. if(ErrorLevel == 1)
  4520. return addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Fehler: Serverdaten konnten nicht abgerufen werden.")
  4521. SuccessLevel := xpath_load(xpath, A_Temp . "\gk.xml")
  4522. if(SuccessLevel != 1)
  4523. return addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Fehler: Die Gebäudekomplexe konnten nicht geladen werden.")
  4524. public := xpath(xpath, "/gks[@filter=1]/public/gk/count()")
  4525. Loop, %public%
  4526. {
  4527. id := xpath(xpath, "/gks[@filter=1]/public/gk[" . A_Index . "]/@id/text()")
  4528. name := xpath(xpath, "/gks[@filter=1]/public/gk[" . A_Index . "]/name/text()")
  4529. x := xpath(xpath, "/gks[@filter=1]/public/gk[" . A_Index . "]/x/text()")
  4530. y := xpath(xpath, "/gks[@filter=1]/public/gk[" . A_Index . "]/y/text()")
  4531. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} [ID: public." . id . "] " . name . " (" . calculateZone(x, y, 0.0) . ", " . calculateCity(x, y, 0.0) . ")")
  4532. }
  4533. house := xpath(xpath, "/gks[@filter=1]/house/gk/count()")
  4534. Loop, %house%
  4535. {
  4536. id := xpath(xpath, "/gks[@filter=1]/house/gk[" . A_Index . "]/@id/text()")
  4537. name := xpath(xpath, "/gks[@filter=1]/house/gk[" . A_Index . "]/name/text()")
  4538. x := xpath(xpath, "/gks[@filter=1]/house/gk[" . A_Index . "]/x/text()")
  4539. y := xpath(xpath, "/gks[@filter=1]/house/gk[" . A_Index . "]/y/text()")
  4540. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} [ID: house." . id . "] " . name . " (" . calculateZone(x, y, 0.0) . ", " . calculateCity(x, y, 0.0) . ")")
  4541. }
  4542. faction := xpath(xpath, "/gks[@filter=1]/faction/gk/count()")
  4543. Loop, %faction%
  4544. {
  4545. id := xpath(xpath, "/gks[@filter=1]/faction/gk[" . A_Index . "]/@id/text()")
  4546. name := xpath(xpath, "/gks[@filter=1]/faction/gk[" . A_Index . "]/name/text()")
  4547. x := xpath(xpath, "/gks[@filter=1]/faction/gk[" . A_Index . "]/x/text()")
  4548. y := xpath(xpath, "/gks[@filter=1]/faction/gk[" . A_Index . "]/y/text()")
  4549. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} [ID: faction." . id . "] " . name . " (" . calculateZone(x, y, 0.0) . ", " . calculateCity(x, y, 0.0) . ")")
  4550. }
  4551. vehicle := xpath(xpath, "/gks[@filter=1]/vehicle/gk/count()")
  4552. Loop, %vehicle%
  4553. {
  4554. id := xpath(xpath, "/gks[@filter=1]/vehicle/gk[" . A_Index . "]/@id/text()")
  4555. name := xpath(xpath, "/gks[@filter=1]/vehicle/gk[" . A_Index . "]/name/text()")
  4556. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} [ID: N/A] " . name . " (N/A)")
  4557. }
  4558. if(!public & !house & !faction & !vehicle)
  4559. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Es wurden keine Gebäudekomplexe gefunden.")
  4560. return
  4561. }
  4562. :?:/overlay::
  4563. Suspend Permit
  4564. if(Ov_On != 1) {
  4565. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Overlay aktiviert.")
  4566. WHMMOV := TextCreate("Arial", 8, true, false, 50, 446, 0xFFFFFFFF, "{FFFFFF}Mask: {FF0303}-", true, true)
  4567. WHMWOV := TextCreate("Arial", 8, true, false, 50, 406, 0xFFFFFFFF, "{FFFFFF}Grab: {FF0303}-", true, true)
  4568. WHMOV := TextCreate("Arial", 8, true, false, 50, 426, 0xFFFFFFFF, "{FFFFFF}Hack: {FF0303}-", true, true)
  4569. OVID := TextCreate("Arial", 8, true, false, 50, 346, 0xFFFFFFFF, "", true, true)
  4570. OVHP := TextCreate("Arial", 8, true, false, 50, 386, 0xFFFFFFFF, "", true, true)
  4571. OVPOS := TextCreate("Arial", 8, true, false, 50, 366, 0xFFFFFFFF, "", true, true)
  4572. Ov_On := 1
  4573. Settimer, Update_Ov, 1000
  4574. Settimer, ID_Ov, 10
  4575. }
  4576. else
  4577. {
  4578. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Overlay deaktiviert.")
  4579. DestroyAllVisual()
  4580. Ov_On := 0
  4581. hpOv_On := 0
  4582. Settimer, Update_Ov, Off
  4583. SetTimer, ID_OV, Off
  4584. }
  4585. Return
  4586. Update_Ov:
  4587. IfWinNotExist, GTA:SA:MP
  4588. {
  4589. Ov_On := 0
  4590. Return
  4591. }
  4592. OV_Scan_Offset := 0
  4593. Loop, 1
  4594. {
  4595. getChatLine(A_Index - 1 + OV_Scan_Offset, OV_Scan_Chat)
  4596. if(InStr(OV_Scan_Chat, "in dein Fahrzeug zu ziehen.")) {
  4597. OV_Grab_Seconds := 10
  4598. addChatMessage(0x007FFF, "{FF0303}[Hitman-Binder]{FFFFFF} Grab Cooldown auf {FF0303}" . OV_Grab_Seconds . "{FFFFFF} Sekunden gesetzt.")
  4599. OV_Scan_Offset += 1
  4600. SetTimer, OV_Grab, 1000
  4601. GoSub, OV_Grab
  4602. }
  4603. if(InStr(OV_Scan_Chat, "hat einen Eintrag entfernt. Verbleibend:")) {
  4604. OV_Hack_Seconds := 58
  4605. addChatMessage(0x007FFF, "{FF0303}[Hitman-Binder]{FFFFFF} Hack Cooldown auf {FF0303}" . OV_Hack_Seconds . "{FFFFFF} Sekunden gesetzt.")
  4606. OV_Scan_Offset += 1
  4607. SetTimer, OV_Hack, 1000
  4608. GoSub, OV_Hack
  4609. }
  4610. if(InStr(OV_Scan_Chat, "Deine Identität ist nun verborgen")) {
  4611. OV_Mask_Seconds := 300
  4612. addChatMessage(0x007FFF, "{FF0303}[Hitman-Binder]{FFFFFF} Mask Cooldown auf {FF0303}" . OV_Mask_Seconds . "{FFFFFF} Sekunden gesetzt.")
  4613. OV_Scan_Offset += 1
  4614. SetTimer, OV_Mask, 1000
  4615. GoSub, OV_Mask
  4616. }
  4617. }
  4618. Return
  4619. OV_Mask:
  4620. if(!(OV_Mask_Seconds < 0)) {
  4621. TextSetString(WHMMOV, "{FFFFFF}Mask: {FF0303}" . OV_Mask_Seconds . "{FFFFFF} Sek")
  4622. OV_Mask_Seconds -= 1
  4623. }
  4624. else {
  4625. SetTimer, OV_Grab, Off
  4626. TextSetString(WHMMOV, "{FFFFFF}Mask: {FF0303}-")
  4627. }
  4628. Return
  4629. OV_Grab:
  4630. if(!(OV_Grab_Seconds < 0)) {
  4631. TextSetString(WHMWOV, "{FFFFFF}Grab: {FF0303}" . OV_Grab_Seconds . "{FFFFFF} Sek")
  4632. OV_Grab_Seconds -= 1
  4633. }
  4634. else {
  4635. SetTimer, OV_Grab, Off
  4636. TextSetString(WHMWOV, "{FFFFFF}Grab: {FF0303}-")
  4637. }
  4638. Return
  4639. OV_Hack:
  4640. if(!(OV_Hack_Seconds < 0)) {
  4641. TextSetString(WHMOV, "{FFFFFF}Hack: {FF0303}" . OV_Hack_Seconds . "{FFFFFF} Sek")
  4642. OV_Hack_Seconds -= 1
  4643. }
  4644. else {
  4645. SetTimer, OV_Hack, Off
  4646. TextSetString(WHMOV, "{FFFFFF}Hack: {FF0303}-")
  4647. }
  4648. Return
  4649. ID_OV:
  4650. GetPlayerName(name)
  4651. HP := GetPlayerHealth()
  4652. MyID := getID()
  4653. TextSetString(OVID, "{FF0303}" name "{FFFFFF} (ID: {FF0303}" MyID "{FFFFFF})")
  4654. TextSetString(OVHP, "{FFFFFF}HP: {FF0303}" GetPlayerHealth())
  4655. if(IsPlayerInAnyInterior() == 1){
  4656. TextSetString(OVPOS, "{FFFFFF}Position: {FF0303}Interior" )
  4657. }
  4658. else {
  4659. GetZoneName(Zone)
  4660. TextSetString(OVPOS, "{FFFFFF}Position: {FF0303}" Zone )
  4661. }
  4662. return
  4663. :?:/hpov::
  4664. Suspend Permit
  4665. if(hpOv_On != 1) {
  4666. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Overlay aktiviert.")
  4667. HPOV := TextCreate("Arial", 6, true, false, 689, 92.5, 0xFFFFFFFF, "" , true, true)
  4668. hpOv_On := 1
  4669. Settimer, HP, 10
  4670. }
  4671. else
  4672. {
  4673. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Overlay deaktiviert.")
  4674. DestroyAllVisual()
  4675. hpOv_On := 0
  4676. Ov_On := 0
  4677. SetTimer, HP, off
  4678. }
  4679. Return
  4680. HP:
  4681. id := getID()
  4682. hp := getPlayerHealth()
  4683. ping := getPlayerPingById(id)
  4684. TextSetString(HPOV, "ID:" id " | HP:" hp " | Ping:" ping "")
  4685. return
  4686. :?:/partner::
  4687. Suspend Permit
  4688. {
  4689. if(partner == -1)
  4690. {
  4691. pID := PlayerInput("Partner-ID: ")
  4692. GetPlayerNameByID(pID, Partnername)
  4693. Partner := 1
  4694. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}" partnername "{FFFFFF} wurde als Partner eingetragen.")
  4695. POV := TextCreate("Arial", 7, true, false, 700, 200, 0xFFFFFFFF, "" , true, true)
  4696. POV_1 := TextCreate("Arial", 7, true, false, 700, 215, 0xFFFFFFFF, "" , true, true)
  4697. pOv_On := 1
  4698. SetTimer, Partner, 400
  4699. SetTimer, Partner_ov, 100
  4700. }
  4701. else
  4702. if(partner == 1)
  4703. {
  4704. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Der Partner wurde entfernt")
  4705. Partner := -1
  4706. Partnername := -1
  4707. SetTimer, Partner, Off
  4708. SetTimer, Partner_ov, off
  4709. destroyallvisual()
  4710. Ov_On := 0
  4711. hpOv_On := 0
  4712. pOv_On := 0
  4713. sleep, 200
  4714. LastContract = 0
  4715. }
  4716. }
  4717. return
  4718. Partner:
  4719. if(!WinActive("GTA:SA:MP"))
  4720. return
  4721. GetPlayerName(name)
  4722. GetChatLine(3, Chat3)
  4723. if(InStr(Chat3, "Hitman " . Name . " hat den Auftrag ausgeführt") && inStr(Chat3, "$ getötet")){
  4724. RegExMatch(Chat3, ".+ für (.+)\$ getöt.+", contract_)
  4725. LastContract +=%contract_1%
  4726. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Partner-System: {FF0303}" contract_1 "${FFFFFF} addiert !")
  4727. AddChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder]{FFFFFF} Partner-System: Du kannst die Hälfte mit {FF0303}'i'{FFFFFF} an deinen Partner zahlen.")
  4728. }
  4729. return
  4730. ~i::
  4731. if(IsInChat() || partnername == -1)
  4732. return
  4733. if(lastcontract > 0)
  4734. {
  4735. SetFormat, float, 0
  4736. Verdienst := lastcontract/2
  4737. SendChat("/pay " partnername " " verdienst "")
  4738. sleep, 1000
  4739. LastContract = 0
  4740. }
  4741. return
  4742. :?:/pov::
  4743. Suspend Permit
  4744. if(pOv_On != 1) {
  4745. POV := TextCreate("Arial", 7, true, false, 700, 200, 0xFFFFFFFF, "" , true, true)
  4746. POV_1 := TextCreate("Arial", 7, true, false, 700, 215, 0xFFFFFFFF, "" , true, true)
  4747. pOv_On := 1
  4748. Settimer, Partner_ov, 100
  4749. }
  4750. else
  4751. {
  4752. addChatMessage(0xFFFFFF, "{FF0303}[Hitman-Binder] {FFFFFF}Overlay deaktiviert.")
  4753. DestroyAllVisual()
  4754. hpOv_On := 0
  4755. Ov_On := 0
  4756. pOv_On := 0
  4757. SetTimer, Partner_ov, off
  4758. }
  4759. Return
  4760. Partner_ov:
  4761. TextSetString(POV, "{FFFFFF}Partner:{FF0303} " partnername "")
  4762. TextSetString(POV_1, "{FFFFFF}Letzte Contracts:{FF0303} " lastcontract "$")
  4763. return
  4764. :?:/clear::
  4765. suspend permit
  4766. Loop, 50
  4767. AddChatMessage(0xFFFFFF, " ")
  4768. return
  4769. :?:/updatestats::
  4770. Suspend Permit
  4771. GetPlayerName(name)
  4772. URL = http://cp.rpg-city.de/api.php?type=level|job|fraction|rank|online|playtime|org|number|money|bank|deposit|kills|deaths|premium&player=%name%
  4773. URLDownloadToVar(URL, Var)
  4774. If(Var=="Des Spielers Profil ist privat.")
  4775. {
  4776. AddChatMessage(0xFFFFFF, "{FF0000}[Hitman-Binder]{FFFFFF} Dein Profil ist privat.")
  4777. return
  4778. }
  4779. RegExMatch(Var, "level:(.+)\|job:(.+)\|fraction:(.+)\|rank:(.+)\|online:(.+)\|playtime:(.+)\|org:(.+)\|number:(.+)\|money:(.+)\|bank:(.+)\|deposit:(.+)\|kills:(.+)\|deaths:(.+)\|premium:(.+)", Info_)
  4780. UserKills := Info_12
  4781. UserDeaths := Info_13
  4782. IniWrite, %UserDeaths%, settings.ini, Killzähler, Deaths
  4783. IniWrite, %UserKills%, settings.ini, Killzähler, Kills
  4784. Var =
  4785. AddChatMessage(0xFFFFFF, "{FF0000}[Hitman-Binder]{FFFFFF} Kills auf {FF0000}" UserKills " {FFFFFF}gesetzt und Tode auf {FF0000}" UserDeaths ".")
  4786. return
  4787. Numpad7::
  4788. if(IsInChat())
  4789. return
  4790. Random, killspruch, 1, 7
  4791. GoSub, ks%killspruch%
  4792. return
  4793. ks1:
  4794. Sendchat("So wie du schießt hättest du lieber ins O-Amt gehen sollen bro!")
  4795. Suspend Off
  4796. return
  4797. ks2:
  4798. Sendchat("Fang doch mal an zu schießen!")
  4799. Suspend Off
  4800. return
  4801. ks3:
  4802. Sendchat("ups sorry bro das wollte ich nicht!")
  4803. Suspend Off
  4804. return
  4805. ks4:
  4806. Sendchat("Wie wär's mit Skill, wenn Luck zur Gewohnheit wird?")
  4807. Suspend Off
  4808. return
  4809. ks5:
  4810. Sendchat("Eins ist Fakt: Du wurdest gefickt.")
  4811. Suspend Off
  4812. return
  4813. ks6:
  4814. Sendchat(" Niveau sieht nur von unten wie Arroganz aus.")
  4815. Suspend Off
  4816. return
  4817. ks7:
  4818. Sendchat(" Die Intelligenz verfolgt dich, du bist aber SCHNELLER!.")
  4819. Suspend Off
  4820. return
  4821. :?:/lack::
  4822. Suspend permit
  4823. lack1 := GetVehicleFirstColor()
  4824. lack2 := GetVehicleSecondColor()
  4825. sleep, 100
  4826. AddChatMessage(0xFFFFFF, "{FF0000}[Hitman-Binder]{FFFFFF} Lack:{FF0000} " lack1 "{FFFFFF}/{FF0000}" lack2 "")
  4827. return
  4828. GuiClose:
  4829. DestroyAllVisual()
  4830. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement