Advertisement
Guest User

Untitled

a guest
Jun 1st, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 96.01 KB | None | 0 0
  1. IfNotExist, dx9_overlay.dll
  2. {
  3. MsgBox, 64, Fehler, Die dx9_overlay.dll wurde nicht gefunden. Sie wird nun heruntergeladen.
  4. URLDownloadToFile, http://www.liamgrimes.square7.ch/Keybinder/FBI-Binder/dx9_overlay.dll, dx9_overlay.dll
  5. Sleep, 1000
  6. FileGetSize, overlayapi_size, dx9_overlay.dll, k
  7. if(overlayapi_size < 500)
  8. {
  9. MsgBox, 16, Fehler, Beim Download der dx9_overlay.dll ist ein Fehler aufgetreten. Bitte überprüfe deine Internetverbindung und stelle sicher, dass dein Virenschutz und deine Firewall den Keybinder nicht blockieren. `nDer Keybinder wird nun beendet.
  10. ExitApp
  11. }
  12. }
  13.  
  14.  
  15. bin = %A_ScriptDir%\bin
  16. IfNotExist, %A_ScriptDir%\bin
  17. {
  18. FileCreateDir, %A_ScriptDir%\bin
  19. }
  20. IfNotExist, %A_ScriptDir%\bin\settings.png
  21. {
  22. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/settings.png, %A_ScriptDir%\bin\settings.png
  23. }
  24. IfNotExist, %A_ScriptDir%\bin\hitman.png
  25. {
  26. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/hitman.png, %A_ScriptDir%\bin\hitman.png
  27. }
  28. IfNotExist, %A_ScriptDir%\API.dll
  29. {
  30. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/API.dll, %A_ScriptDir%\API.dll
  31. }
  32. IfNotExist, %A_ScriptDir%\dx9_overlay.dll
  33. {
  34. URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/overlay.dll, %A_ScriptDir%\dx9_overlay.dll
  35. }
  36.  
  37. global ERROR_OK := 0
  38. global ERROR_PROCESS_NOT_FOUND := 1
  39. global ERROR_OPEN_PROCESS := 2
  40. global ERROR_INVALID_HANDLE := 3
  41. global ERROR_MODULE_NOT_FOUND := 4
  42. global ERROR_ENUM_PROCESS_MODULES := 5
  43. global ERROR_ZONE_NOT_FOUND := 6
  44. global ERROR_CITY_NOT_FOUND := 7
  45. global ERROR_READ_MEMORY := 8
  46. global ERROR_WRITE_MEMORY := 9
  47. global ERROR_ALLOC_MEMORY := 10
  48. global ERROR_FREE_MEMORY := 11
  49. global ERROR_WAIT_FOR_OBJECT := 12
  50. global ERROR_CREATE_THREAD := 13
  51. global ADDR_ZONECODE := 0xA49AD4
  52. global ADDR_POSITION_X := 0xB6F2E4
  53. global ADDR_POSITION_Y := 0xB6F2E8
  54. global ADDR_POSITION_Z := 0xB6F2EC
  55. global ADDR_CPED_PTR := 0xB6F5F0
  56. global ADDR_CPED_HPOFF := 0x540
  57. global ADDR_CPED_ARMOROFF := 0x548
  58. global ADDR_VEHICLE_PTR := 0xBA18FC
  59. global ADDR_VEHICLE_HPOFF := 0x4C0
  60. global ADDR_CPED_MONEY := 0x0B7CE54
  61. global ADDR_CPED_INTID := 0xA4ACE8
  62. global ADDR_VEHICLE_DOORSTATE := 0x4F8
  63. global ADDR_VEHICLE_ENGINESTATE := 0x428
  64. global ADDR_VEHICLE_LIGHTSTATE := 0x584
  65. global ADDR_VEHICLE_MODEL := 0x22
  66. global ADDR_VEHICLE_TYPE := 0x590
  67. global ADDR_VEHICLE_DRIVER := 0x460
  68. global ADDR_VEHICLE_CVEH := 0xB6F980
  69. global ADDR_VEHICLE_SPEED_X := 0x44
  70. global ADDR_VEHICLE_SPEED_Y := 0x48
  71. global ADDR_VEHICLE_SPEED_Z := 0x4C
  72. global oAirplaneModels := [417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593]
  73. global oBikeModels := [481,509,510]
  74. 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"]
  75. global ADDR_SAMP_INCHAT_PTR := 0x21a10c
  76. global ADDR_SAMP_INCHAT_PTR_OFF := 0x55
  77. global ADDR_SAMP_USERNAME := 0x219A6F
  78. global ADDR_SAMP_CHATMSG_PTR := 0x21A0E4
  79. global ADDR_SAMP_SHOWDLG_PTR := 0x21A0B8
  80. global FUNC_SAMP_SENDCMD := 0x65c60
  81. global FUNC_SAMP_SENDSAY := 0x57f0
  82. global FUNC_SAMP_ADDTOCHATWND := 0x64520
  83. global FUNC_SAMP_SHOWGAMETEXT := 0x9C2C0
  84. global FUNC_SAMP_PLAYAUDIOSTR := 0x62dA0
  85. global FUNC_SAMP_STOPAUDIOSTR := 0x629A0
  86. global FUNC_SAMP_SHOWDIALOG := 0x6B9C0
  87. global FUNC_UPDATESCOREBOARD := 0x8A10
  88. global SAMP_INFO_OFFSET := 0x21A0F8
  89. global SAMP_PPOOLS_OFFSET := 0x3CD
  90. global SAMP_PPOOL_PLAYER_OFFSET := 0x18
  91. global SAMP_SLOCALPLAYERID_OFFSET := 0x4
  92. global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
  93. global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
  94. global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
  95. global SAMP_PREMOTEPLAYER_OFFSET := 0x2E
  96. global SAMP_ISTRLENNAME___OFFSET := 0x1C
  97. global SAMP_SZPLAYERNAME_OFFSET := 0xC
  98. global SAMP_PSZPLAYERNAME_OFFSET := 0xC
  99. global SAMP_ILOCALPLAYERPING_OFFSET := 0x26
  100. global SAMP_ILOCALPLAYERSCORE_OFFSET := 0x2A
  101. global SAMP_IPING_OFFSET := 0x28
  102. global SAMP_ISCORE_OFFSET := 0x24
  103. global SAMP_ISNPC_OFFSET := 0x4
  104. global SAMP_SZIP_OFFSET := 0x20
  105. global SAMP_SZHOSTNAME_OFFSET := 0x121
  106. global SAMP_PLAYER_MAX := 1004
  107. global SIZE_SAMP_CHATMSG := 0xFC
  108. global hGTA := 0x0
  109. global dwGTAPID := 0x0
  110. global dwSAMP := 0x0
  111. global pMemory := 0x0
  112. global pParam1 := 0x0
  113. global pParam2 := 0x0
  114. global pParam3 := 0x0
  115. global pParam4 := 0x0
  116. global pParam5 := 0x0
  117. global pInjectFunc := 0x0
  118. global nZone := 1
  119. global nCity := 1
  120. global bInitZaC := 0
  121. global iRefreshScoreboard := 0
  122. global oScoreboardData := ""
  123. global iRefreshHandles := 0
  124. global iUpdateTick := 2500
  125. isInChat() {
  126. if(!checkHandles())
  127. return -1
  128. dwPtr := dwSAMP + ADDR_SAMP_INCHAT_PTR
  129. dwAddress := readDWORD(hGTA, dwPtr) + ADDR_SAMP_INCHAT_PTR_OFF
  130. if(ErrorLevel) {
  131. ErrorLevel := ERROR_READ_MEMORY
  132. return -1
  133. }
  134. dwInChat := readDWORD(hGTA, dwAddress)
  135. if(ErrorLevel) {
  136. ErrorLevel := ERROR_READ_MEMORY
  137. return -1
  138. }
  139. ErrorLevel := ERROR_OK
  140. if(dwInChat > 0) {
  141. return true
  142. } else {
  143. return false
  144. }
  145. }
  146. getUsername() {
  147. if(!checkHandles())
  148. return ""
  149. dwAddress := dwSAMP + ADDR_SAMP_USERNAME
  150. sUsername := readString(hGTA, dwAddress, 25)
  151. if(ErrorLevel) {
  152. ErrorLevel := ERROR_READ_MEMORY
  153. return ""
  154. }
  155. ErrorLevel := ERROR_OK
  156. return sUsername
  157. }
  158. getId() {
  159. s:=getUsername()
  160. return getPlayerIdByName(s)
  161. }
  162. IsPlayerInNoDM(x, y, z)
  163. {
  164. result := ""
  165. if(x<1561.5 && x>1387.8 && y<-1727.6 && y>-1870)
  166. {
  167. result := 1
  168. }
  169. else if(x>1688.8 && x<1820.8 && y<-1859.5 && y>-1961.2)
  170. {
  171. result := 1
  172. }
  173. return result
  174. }
  175. restart() {
  176. restartGameEx()
  177. disconnectEx()
  178. Sleep 1000
  179. setrestart()
  180. }
  181. getCoordinates() {
  182. if(!checkHandles())
  183. return ""
  184. fX := readFloat(hGTA, ADDR_POSITION_X)
  185. if(ErrorLevel) {
  186. ErrorLevel := ERROR_READ_MEMORY
  187. return ""
  188. }
  189. fY := readFloat(hGTA, ADDR_POSITION_Y)
  190. if(ErrorLevel) {
  191. ErrorLevel := ERROR_READ_MEMORY
  192. return ""
  193. }
  194. fZ := readFloat(hGTA, ADDR_POSITION_Z)
  195. if(ErrorLevel) {
  196. ErrorLevel := ERROR_READ_MEMORY
  197. return ""
  198. }
  199. ErrorLevel := ERROR_OK
  200. return [fX, fY, fZ]
  201. }
  202. GetPlayerPos(ByRef fX,ByRef fY,ByRef fZ) {
  203. if(!checkHandles())
  204. return 0
  205. fX := readFloat(hGTA, ADDR_POSITION_X)
  206. if(ErrorLevel) {
  207. ErrorLevel := ERROR_READ_MEMORY
  208. return 0
  209. }
  210. fY := readFloat(hGTA, ADDR_POSITION_Y)
  211. if(ErrorLevel) {
  212. ErrorLevel := ERROR_READ_MEMORY
  213. return 0
  214. }
  215. fZ := readFloat(hGTA, ADDR_POSITION_Z)
  216. if(ErrorLevel) {
  217. ErrorLevel := ERROR_READ_MEMORY
  218. return 0
  219. }
  220. ErrorLevel := ERROR_OK
  221. }
  222. initZonesAndCities() {
  223. AddCity("Las Venturas", 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0)
  224. AddCity("San Fierro", -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0)
  225. AddCity("San Fierro", -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0)
  226. AddCity("San Fierro", -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0)
  227. AddCity("Los Santos", 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0)
  228. AddCity("Los Santos", 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0)
  229. AddCity("Tierra Robada", -1213.91, 596.349, -242.99, -480.539, 1659.68, 900.0)
  230. AddCity("Red County", -1213.91, -768.027, -242.99, 2997.06, 596.349, 900.0)
  231. AddCity("Flint County", -1213.91, -2892.97, -242.99, 44.6147, -768.027, 900.0)
  232. AddCity("Whetstone", -2997.47, -2892.97, -242.99, -1213.91, -1115.58, 900.0)
  233. AddZone("Avispa Country Club", -2667.810, -302.135, -28.831, -2646.400, -262.320, 71.169)
  234. AddZone("Easter Bay Airport", -1315.420, -405.388, 15.406, -1264.400, -209.543, 25.406)
  235. AddZone("Avispa Country Club", -2550.040, -355.493, 0.000, -2470.040, -318.493, 39.700)
  236. AddZone("Easter Bay Airport", -1490.330, -209.543, 15.406, -1264.400, -148.388, 25.406)
  237. AddZone("Garcia", -2395.140, -222.589, -5.3, -2354.090, -204.792, 200.000)
  238. AddZone("Shady Cabin", -1632.830, -2263.440, -3.0, -1601.330, -2231.790, 200.000)
  239. AddZone("East Los Santos", 2381.680, -1494.030, -89.084, 2421.030, -1454.350, 110.916)
  240. AddZone("LVA Freight Depot", 1236.630, 1163.410, -89.084, 1277.050, 1203.280, 110.916)
  241. AddZone("Blackfield Intersection", 1277.050, 1044.690, -89.084, 1315.350, 1087.630, 110.916)
  242. AddZone("Avispa Country Club", -2470.040, -355.493, 0.000, -2270.040, -318.493, 46.100)
  243. AddZone("Temple", 1252.330, -926.999, -89.084, 1357.000, -910.170, 110.916)
  244. AddZone("Unity Station", 1692.620, -1971.800, -20.492, 1812.620, -1932.800, 79.508)
  245. AddZone("LVA Freight Depot", 1315.350, 1044.690, -89.084, 1375.600, 1087.630, 110.916)
  246. AddZone("Los Flores", 2581.730, -1454.350, -89.084, 2632.830, -1393.420, 110.916)
  247. AddZone("Starfish Casino", 2437.390, 1858.100, -39.084, 2495.090, 1970.850, 60.916)
  248. AddZone("Easter Bay Chemicals", -1132.820, -787.391, 0.000, -956.476, -768.027, 200.000)
  249. AddZone("Downtown Los Santos", 1370.850, -1170.870, -89.084, 1463.900, -1130.850, 110.916)
  250. AddZone("Esplanade East", -1620.300, 1176.520, -4.5, -1580.010, 1274.260, 200.000)
  251. AddZone("Market Station", 787.461, -1410.930, -34.126, 866.009, -1310.210, 65.874)
  252. AddZone("Linden Station", 2811.250, 1229.590, -39.594, 2861.250, 1407.590, 60.406)
  253. AddZone("Montgomery Intersection", 1582.440, 347.457, 0.000, 1664.620, 401.750, 200.000)
  254. AddZone("Frederick Bridge", 2759.250, 296.501, 0.000, 2774.250, 594.757, 200.000)
  255. AddZone("Yellow Bell Station", 1377.480, 2600.430, -21.926, 1492.450, 2687.360, 78.074)
  256. AddZone("Downtown Los Santos", 1507.510, -1385.210, 110.916, 1582.550, -1325.310, 335.916)
  257. AddZone("Jefferson", 2185.330, -1210.740, -89.084, 2281.450, -1154.590, 110.916)
  258. AddZone("Mulholland", 1318.130, -910.170, -89.084, 1357.000, -768.027, 110.916)
  259. AddZone("Avispa Country Club", -2361.510, -417.199, 0.000, -2270.040, -355.493, 200.000)
  260. AddZone("Jefferson", 1996.910, -1449.670, -89.084, 2056.860, -1350.720, 110.916)
  261. AddZone("Julius Thruway West", 1236.630, 2142.860, -89.084, 1297.470, 2243.230, 110.916)
  262. AddZone("Jefferson", 2124.660, -1494.030, -89.084, 2266.210, -1449.670, 110.916)
  263. AddZone("Julius Thruway North", 1848.400, 2478.490, -89.084, 1938.800, 2553.490, 110.916)
  264. AddZone("Rodeo", 422.680, -1570.200, -89.084, 466.223, -1406.050, 110.916)
  265. AddZone("Cranberry Station", -2007.830, 56.306, 0.000, -1922.000, 224.782, 100.000)
  266. AddZone("Downtown Los Santos", 1391.050, -1026.330, -89.084, 1463.900, -926.999, 110.916)
  267. AddZone("Redsands West", 1704.590, 2243.230, -89.084, 1777.390, 2342.830, 110.916)
  268. AddZone("Little Mexico", 1758.900, -1722.260, -89.084, 1812.620, -1577.590, 110.916)
  269. AddZone("Blackfield Intersection", 1375.600, 823.228, -89.084, 1457.390, 919.447, 110.916)
  270. AddZone("Los Santos International", 1974.630, -2394.330, -39.084, 2089.000, -2256.590, 60.916)
  271. AddZone("Beacon Hill", -399.633, -1075.520, -1.489, -319.033, -977.516, 198.511)
  272. AddZone("Rodeo", 334.503, -1501.950, -89.084, 422.680, -1406.050, 110.916)
  273. AddZone("Richman", 225.165, -1369.620, -89.084, 334.503, -1292.070, 110.916)
  274. AddZone("Downtown Los Santos", 1724.760, -1250.900, -89.084, 1812.620, -1150.870, 110.916)
  275. AddZone("The Strip", 2027.400, 1703.230, -89.084, 2137.400, 1783.230, 110.916)
  276. AddZone("Downtown Los Santos", 1378.330, -1130.850, -89.084, 1463.900, -1026.330, 110.916)
  277. AddZone("Blackfield Intersection", 1197.390, 1044.690, -89.084, 1277.050, 1163.390, 110.916)
  278. AddZone("Conference Center", 1073.220, -1842.270, -89.084, 1323.900, -1804.210, 110.916)
  279. AddZone("Montgomery", 1451.400, 347.457, -6.1, 1582.440, 420.802, 200.000)
  280. AddZone("Foster Valley", -2270.040, -430.276, -1.2, -2178.690, -324.114, 200.000)
  281. AddZone("Blackfield Chapel", 1325.600, 596.349, -89.084, 1375.600, 795.010, 110.916)
  282. AddZone("Los Santos International", 2051.630, -2597.260, -39.084, 2152.450, -2394.330, 60.916)
  283. AddZone("Mulholland", 1096.470, -910.170, -89.084, 1169.130, -768.027, 110.916)
  284. AddZone("Yellow Bell Gol Course", 1457.460, 2723.230, -89.084, 1534.560, 2863.230, 110.916)
  285. AddZone("The Strip", 2027.400, 1783.230, -89.084, 2162.390, 1863.230, 110.916)
  286. AddZone("Jefferson", 2056.860, -1210.740, -89.084, 2185.330, -1126.320, 110.916)
  287. AddZone("Mulholland", 952.604, -937.184, -89.084, 1096.470, -860.619, 110.916)
  288. AddZone("Aldea Malvada", -1372.140, 2498.520, 0.000, -1277.590, 2615.350, 200.000)
  289. AddZone("Las Colinas", 2126.860, -1126.320, -89.084, 2185.330, -934.489, 110.916)
  290. AddZone("Las Colinas", 1994.330, -1100.820, -89.084, 2056.860, -920.815, 110.916)
  291. AddZone("Richman", 647.557, -954.662, -89.084, 768.694, -860.619, 110.916)
  292. AddZone("LVA Freight Depot", 1277.050, 1087.630, -89.084, 1375.600, 1203.280, 110.916)
  293. AddZone("Julius Thruway North", 1377.390, 2433.230, -89.084, 1534.560, 2507.230, 110.916)
  294. AddZone("Willowfield", 2201.820, -2095.000, -89.084, 2324.000, -1989.900, 110.916)
  295. AddZone("Julius Thruway North", 1704.590, 2342.830, -89.084, 1848.400, 2433.230, 110.916)
  296. AddZone("Temple", 1252.330, -1130.850, -89.084, 1378.330, -1026.330, 110.916)
  297. AddZone("Little Mexico", 1701.900, -1842.270, -89.084, 1812.620, -1722.260, 110.916)
  298. AddZone("Queens", -2411.220, 373.539, 0.000, -2253.540, 458.411, 200.000)
  299. AddZone("Las Venturas Airport", 1515.810, 1586.400, -12.500, 1729.950, 1714.560, 87.500)
  300. AddZone("Richman", 225.165, -1292.070, -89.084, 466.223, -1235.070, 110.916)
  301. AddZone("Temple", 1252.330, -1026.330, -89.084, 1391.050, -926.999, 110.916)
  302. AddZone("East Los Santos", 2266.260, -1494.030, -89.084, 2381.680, -1372.040, 110.916)
  303. AddZone("Julius Thruway East", 2623.180, 943.235, -89.084, 2749.900, 1055.960, 110.916)
  304. AddZone("Willowfield", 2541.700, -1941.400, -89.084, 2703.580, -1852.870, 110.916)
  305. AddZone("Las Colinas", 2056.860, -1126.320, -89.084, 2126.860, -920.815, 110.916)
  306. AddZone("Julius Thruway East", 2625.160, 2202.760, -89.084, 2685.160, 2442.550, 110.916)
  307. AddZone("Rodeo", 225.165, -1501.950, -89.084, 334.503, -1369.620, 110.916)
  308. AddZone("Las Brujas", -365.167, 2123.010, -3.0, -208.570, 2217.680, 200.000)
  309. AddZone("Julius Thruway East", 2536.430, 2442.550, -89.084, 2685.160, 2542.550, 110.916)
  310. AddZone("Rodeo", 334.503, -1406.050, -89.084, 466.223, -1292.070, 110.916)
  311. AddZone("Vinewood", 647.557, -1227.280, -89.084, 787.461, -1118.280, 110.916)
  312. AddZone("Rodeo", 422.680, -1684.650, -89.084, 558.099, -1570.200, 110.916)
  313. AddZone("Julius Thruway North", 2498.210, 2542.550, -89.084, 2685.160, 2626.550, 110.916)
  314. AddZone("Downtown Los Santos", 1724.760, -1430.870, -89.084, 1812.620, -1250.900, 110.916)
  315. AddZone("Rodeo", 225.165, -1684.650, -89.084, 312.803, -1501.950, 110.916)
  316. AddZone("Jefferson", 2056.860, -1449.670, -89.084, 2266.210, -1372.040, 110.916)
  317. AddZone("Hampton Barns", 603.035, 264.312, 0.000, 761.994, 366.572, 200.000)
  318. AddZone("Temple", 1096.470, -1130.840, -89.084, 1252.330, -1026.330, 110.916)
  319. AddZone("Kincaid Bridge", -1087.930, 855.370, -89.084, -961.950, 986.281, 110.916)
  320. AddZone("Verona Beach", 1046.150, -1722.260, -89.084, 1161.520, -1577.590, 110.916)
  321. AddZone("Commerce", 1323.900, -1722.260, -89.084, 1440.900, -1577.590, 110.916)
  322. AddZone("Mulholland", 1357.000, -926.999, -89.084, 1463.900, -768.027, 110.916)
  323. AddZone("Rodeo", 466.223, -1570.200, -89.084, 558.099, -1385.070, 110.916)
  324. AddZone("Mulholland", 911.802, -860.619, -89.084, 1096.470, -768.027, 110.916)
  325. AddZone("Mulholland", 768.694, -954.662, -89.084, 952.604, -860.619, 110.916)
  326. AddZone("Julius Thruway South", 2377.390, 788.894, -89.084, 2537.390, 897.901, 110.916)
  327. AddZone("Idlewood", 1812.620, -1852.870, -89.084, 1971.660, -1742.310, 110.916)
  328. AddZone("Ocean Docks", 2089.000, -2394.330, -89.084, 2201.820, -2235.840, 110.916)
  329. AddZone("Commerce", 1370.850, -1577.590, -89.084, 1463.900, -1384.950, 110.916)
  330. AddZone("Julius Thruway North", 2121.400, 2508.230, -89.084, 2237.400, 2663.170, 110.916)
  331. AddZone("Temple", 1096.470, -1026.330, -89.084, 1252.330, -910.170, 110.916)
  332. AddZone("Glen Park", 1812.620, -1449.670, -89.084, 1996.910, -1350.720, 110.916)
  333. AddZone("Easter Bay Airport", -1242.980, -50.096, 0.000, -1213.910, 578.396, 200.000)
  334. AddZone("Martin Bridge", -222.179, 293.324, 0.000, -122.126, 476.465, 200.000)
  335. AddZone("The Strip", 2106.700, 1863.230, -89.084, 2162.390, 2202.760, 110.916)
  336. AddZone("Willowfield", 2541.700, -2059.230, -89.084, 2703.580, -1941.400, 110.916)
  337. AddZone("Marina", 807.922, -1577.590, -89.084, 926.922, -1416.250, 110.916)
  338. AddZone("Las Venturas Airport", 1457.370, 1143.210, -89.084, 1777.400, 1203.280, 110.916)
  339. AddZone("Idlewood", 1812.620, -1742.310, -89.084, 1951.660, -1602.310, 110.916)
  340. AddZone("Esplanade East", -1580.010, 1025.980, -6.1, -1499.890, 1274.260, 200.000)
  341. AddZone("Downtown Los Santos", 1370.850, -1384.950, -89.084, 1463.900, -1170.870, 110.916)
  342. AddZone("The Mako Span", 1664.620, 401.750, 0.000, 1785.140, 567.203, 200.000)
  343. AddZone("Rodeo", 312.803, -1684.650, -89.084, 422.680, -1501.950, 110.916)
  344. AddZone("Pershing Square", 1440.900, -1722.260, -89.084, 1583.500, -1577.590, 110.916)
  345. AddZone("Mulholland", 687.802, -860.619, -89.084, 911.802, -768.027, 110.916)
  346. AddZone("Gant Bridge", -2741.070, 1490.470, -6.1, -2616.400, 1659.680, 200.000)
  347. AddZone("Las Colinas", 2185.330, -1154.590, -89.084, 2281.450, -934.489, 110.916)
  348. AddZone("Mulholland", 1169.130, -910.170, -89.084, 1318.130, -768.027, 110.916)
  349. AddZone("Julius Thruway North", 1938.800, 2508.230, -89.084, 2121.400, 2624.230, 110.916)
  350. AddZone("Commerce", 1667.960, -1577.590, -89.084, 1812.620, -1430.870, 110.916)
  351. AddZone("Rodeo", 72.648, -1544.170, -89.084, 225.165, -1404.970, 110.916)
  352. AddZone("Roca Escalante", 2536.430, 2202.760, -89.084, 2625.160, 2442.550, 110.916)
  353. AddZone("Rodeo", 72.648, -1684.650, -89.084, 225.165, -1544.170, 110.916)
  354. AddZone("Market", 952.663, -1310.210, -89.084, 1072.660, -1130.850, 110.916)
  355. AddZone("Las Colinas", 2632.740, -1135.040, -89.084, 2747.740, -945.035, 110.916)
  356. AddZone("Mulholland", 861.085, -674.885, -89.084, 1156.550, -600.896, 110.916)
  357. AddZone("King's", -2253.540, 373.539, -9.1, -1993.280, 458.411, 200.000)
  358. AddZone("Redsands East", 1848.400, 2342.830, -89.084, 2011.940, 2478.490, 110.916)
  359. AddZone("Downtown", -1580.010, 744.267, -6.1, -1499.890, 1025.980, 200.000)
  360. AddZone("Conference Center", 1046.150, -1804.210, -89.084, 1323.900, -1722.260, 110.916)
  361. AddZone("Richman", 647.557, -1118.280, -89.084, 787.461, -954.662, 110.916)
  362. AddZone("Ocean Flats", -2994.490, 277.411, -9.1, -2867.850, 458.411, 200.000)
  363. AddZone("Greenglass College", 964.391, 930.890, -89.084, 1166.530, 1044.690, 110.916)
  364. AddZone("Glen Park", 1812.620, -1100.820, -89.084, 1994.330, -973.380, 110.916)
  365. AddZone("LVA Freight Depot", 1375.600, 919.447, -89.084, 1457.370, 1203.280, 110.916)
  366. AddZone("Regular Tom", -405.770, 1712.860, -3.0, -276.719, 1892.750, 200.000)
  367. AddZone("Verona Beach", 1161.520, -1722.260, -89.084, 1323.900, -1577.590, 110.916)
  368. AddZone("East Los Santos", 2281.450, -1372.040, -89.084, 2381.680, -1135.040, 110.916)
  369. AddZone("Caligula's Palace", 2137.400, 1703.230, -89.084, 2437.390, 1783.230, 110.916)
  370. AddZone("Idlewood", 1951.660, -1742.310, -89.084, 2124.660, -1602.310, 110.916)
  371. AddZone("Pilgrim", 2624.400, 1383.230, -89.084, 2685.160, 1783.230, 110.916)
  372. AddZone("Idlewood", 2124.660, -1742.310, -89.084, 2222.560, -1494.030, 110.916)
  373. AddZone("Queens", -2533.040, 458.411, 0.000, -2329.310, 578.396, 200.000)
  374. AddZone("Downtown", -1871.720, 1176.420, -4.5, -1620.300, 1274.260, 200.000)
  375. AddZone("Commerce", 1583.500, -1722.260, -89.084, 1758.900, -1577.590, 110.916)
  376. AddZone("East Los Santos", 2381.680, -1454.350, -89.084, 2462.130, -1135.040, 110.916)
  377. AddZone("Marina", 647.712, -1577.590, -89.084, 807.922, -1416.250, 110.916)
  378. AddZone("Richman", 72.648, -1404.970, -89.084, 225.165, -1235.070, 110.916)
  379. AddZone("Vinewood", 647.712, -1416.250, -89.084, 787.461, -1227.280, 110.916)
  380. AddZone("East Los Santos", 2222.560, -1628.530, -89.084, 2421.030, -1494.030, 110.916)
  381. AddZone("Rodeo", 558.099, -1684.650, -89.084, 647.522, -1384.930, 110.916)
  382. AddZone("Easter Tunnel", -1709.710, -833.034, -1.5, -1446.010, -730.118, 200.000)
  383. AddZone("Rodeo", 466.223, -1385.070, -89.084, 647.522, -1235.070, 110.916)
  384. AddZone("Redsands East", 1817.390, 2202.760, -89.084, 2011.940, 2342.830, 110.916)
  385. AddZone("The Clown's Pocket", 2162.390, 1783.230, -89.084, 2437.390, 1883.230, 110.916)
  386. AddZone("Idlewood", 1971.660, -1852.870, -89.084, 2222.560, -1742.310, 110.916)
  387. AddZone("Montgomery Intersection", 1546.650, 208.164, 0.000, 1745.830, 347.457, 200.000)
  388. AddZone("Willowfield", 2089.000, -2235.840, -89.084, 2201.820, -1989.900, 110.916)
  389. AddZone("Temple", 952.663, -1130.840, -89.084, 1096.470, -937.184, 110.916)
  390. AddZone("Prickle Pine", 1848.400, 2553.490, -89.084, 1938.800, 2863.230, 110.916)
  391. AddZone("Los Santos International", 1400.970, -2669.260, -39.084, 2189.820, -2597.260, 60.916)
  392. AddZone("Garver Bridge", -1213.910, 950.022, -89.084, -1087.930, 1178.930, 110.916)
  393. AddZone("Garver Bridge", -1339.890, 828.129, -89.084, -1213.910, 1057.040, 110.916)
  394. AddZone("Kincaid Bridge", -1339.890, 599.218, -89.084, -1213.910, 828.129, 110.916)
  395. AddZone("Kincaid Bridge", -1213.910, 721.111, -89.084, -1087.930, 950.022, 110.916)
  396. AddZone("Verona Beach", 930.221, -2006.780, -89.084, 1073.220, -1804.210, 110.916)
  397. AddZone("Verdant Bluffs", 1073.220, -2006.780, -89.084, 1249.620, -1842.270, 110.916)
  398. AddZone("Vinewood", 787.461, -1130.840, -89.084, 952.604, -954.662, 110.916)
  399. AddZone("Vinewood", 787.461, -1310.210, -89.084, 952.663, -1130.840, 110.916)
  400. AddZone("Commerce", 1463.900, -1577.590, -89.084, 1667.960, -1430.870, 110.916)
  401. AddZone("Market", 787.461, -1416.250, -89.084, 1072.660, -1310.210, 110.916)
  402. AddZone("Rockshore West", 2377.390, 596.349, -89.084, 2537.390, 788.894, 110.916)
  403. AddZone("Julius Thruway North", 2237.400, 2542.550, -89.084, 2498.210, 2663.170, 110.916)
  404. AddZone("East Beach", 2632.830, -1668.130, -89.084, 2747.740, -1393.420, 110.916)
  405. AddZone("Fallow Bridge", 434.341, 366.572, 0.000, 603.035, 555.680, 200.000)
  406. AddZone("Willowfield", 2089.000, -1989.900, -89.084, 2324.000, -1852.870, 110.916)
  407. AddZone("Chinatown", -2274.170, 578.396, -7.6, -2078.670, 744.170, 200.000)
  408. AddZone("El Castillo del Diablo", -208.570, 2337.180, 0.000, 8.430, 2487.180, 200.000)
  409. AddZone("Ocean Docks", 2324.000, -2145.100, -89.084, 2703.580, -2059.230, 110.916)
  410. AddZone("Easter Bay Chemicals", -1132.820, -768.027, 0.000, -956.476, -578.118, 200.000)
  411. AddZone("The Visage", 1817.390, 1703.230, -89.084, 2027.400, 1863.230, 110.916)
  412. AddZone("Ocean Flats", -2994.490, -430.276, -1.2, -2831.890, -222.589, 200.000)
  413. AddZone("Richman", 321.356, -860.619, -89.084, 687.802, -768.027, 110.916)
  414. AddZone("Green Palms", 176.581, 1305.450, -3.0, 338.658, 1520.720, 200.000)
  415. AddZone("Richman", 321.356, -768.027, -89.084, 700.794, -674.885, 110.916)
  416. AddZone("Starfish Casino", 2162.390, 1883.230, -89.084, 2437.390, 2012.180, 110.916)
  417. AddZone("East Beach", 2747.740, -1668.130, -89.084, 2959.350, -1498.620, 110.916)
  418. AddZone("Jefferson", 2056.860, -1372.040, -89.084, 2281.450, -1210.740, 110.916)
  419. AddZone("Downtown Los Santos", 1463.900, -1290.870, -89.084, 1724.760, -1150.870, 110.916)
  420. AddZone("Downtown Los Santos", 1463.900, -1430.870, -89.084, 1724.760, -1290.870, 110.916)
  421. AddZone("Garver Bridge", -1499.890, 696.442, -179.615, -1339.890, 925.353, 20.385)
  422. AddZone("Julius Thruway South", 1457.390, 823.228, -89.084, 2377.390, 863.229, 110.916)
  423. AddZone("East Los Santos", 2421.030, -1628.530, -89.084, 2632.830, -1454.350, 110.916)
  424. AddZone("Greenglass College", 964.391, 1044.690, -89.084, 1197.390, 1203.220, 110.916)
  425. AddZone("Las Colinas", 2747.740, -1120.040, -89.084, 2959.350, -945.035, 110.916)
  426. AddZone("Mulholland", 737.573, -768.027, -89.084, 1142.290, -674.885, 110.916)
  427. AddZone("Ocean Docks", 2201.820, -2730.880, -89.084, 2324.000, -2418.330, 110.916)
  428. AddZone("East Los Santos", 2462.130, -1454.350, -89.084, 2581.730, -1135.040, 110.916)
  429. AddZone("Ganton", 2222.560, -1722.330, -89.084, 2632.830, -1628.530, 110.916)
  430. AddZone("Avispa Country Club", -2831.890, -430.276, -6.1, -2646.400, -222.589, 200.000)
  431. AddZone("Willowfield", 1970.620, -2179.250, -89.084, 2089.000, -1852.870, 110.916)
  432. AddZone("Esplanade North", -1982.320, 1274.260, -4.5, -1524.240, 1358.900, 200.000)
  433. AddZone("The High Roller", 1817.390, 1283.230, -89.084, 2027.390, 1469.230, 110.916)
  434. AddZone("Ocean Docks", 2201.820, -2418.330, -89.084, 2324.000, -2095.000, 110.916)
  435. AddZone("Last Dime Motel", 1823.080, 596.349, -89.084, 1997.220, 823.228, 110.916)
  436. AddZone("Bayside Marina", -2353.170, 2275.790, 0.000, -2153.170, 2475.790, 200.000)
  437. AddZone("King's", -2329.310, 458.411, -7.6, -1993.280, 578.396, 200.000)
  438. AddZone("El Corona", 1692.620, -2179.250, -89.084, 1812.620, -1842.270, 110.916)
  439. AddZone("Blackfield Chapel", 1375.600, 596.349, -89.084, 1558.090, 823.228, 110.916)
  440. AddZone("The Pink Swan", 1817.390, 1083.230, -89.084, 2027.390, 1283.230, 110.916)
  441. AddZone("Julius Thruway West", 1197.390, 1163.390, -89.084, 1236.630, 2243.230, 110.916)
  442. AddZone("Los Flores", 2581.730, -1393.420, -89.084, 2747.740, -1135.040, 110.916)
  443. AddZone("The Visage", 1817.390, 1863.230, -89.084, 2106.700, 2011.830, 110.916)
  444. AddZone("Prickle Pine", 1938.800, 2624.230, -89.084, 2121.400, 2861.550, 110.916)
  445. AddZone("Verona Beach", 851.449, -1804.210, -89.084, 1046.150, -1577.590, 110.916)
  446. AddZone("Robada Intersection", -1119.010, 1178.930, -89.084, -862.025, 1351.450, 110.916)
  447. AddZone("Linden Side", 2749.900, 943.235, -89.084, 2923.390, 1198.990, 110.916)
  448. AddZone("Ocean Docks", 2703.580, -2302.330, -89.084, 2959.350, -2126.900, 110.916)
  449. AddZone("Willowfield", 2324.000, -2059.230, -89.084, 2541.700, -1852.870, 110.916)
  450. AddZone("King's", -2411.220, 265.243, -9.1, -1993.280, 373.539, 200.000)
  451. AddZone("Commerce", 1323.900, -1842.270, -89.084, 1701.900, -1722.260, 110.916)
  452. AddZone("Mulholland", 1269.130, -768.027, -89.084, 1414.070, -452.425, 110.916)
  453. AddZone("Marina", 647.712, -1804.210, -89.084, 851.449, -1577.590, 110.916)
  454. AddZone("Battery Point", -2741.070, 1268.410, -4.5, -2533.040, 1490.470, 200.000)
  455. AddZone("The Four Dragons Casino", 1817.390, 863.232, -89.084, 2027.390, 1083.230, 110.916)
  456. AddZone("Blackfield", 964.391, 1203.220, -89.084, 1197.390, 1403.220, 110.916)
  457. AddZone("Julius Thruway North", 1534.560, 2433.230, -89.084, 1848.400, 2583.230, 110.916)
  458. AddZone("Yellow Bell Gol Course", 1117.400, 2723.230, -89.084, 1457.460, 2863.230, 110.916)
  459. AddZone("Idlewood", 1812.620, -1602.310, -89.084, 2124.660, -1449.670, 110.916)
  460. AddZone("Redsands West", 1297.470, 2142.860, -89.084, 1777.390, 2243.230, 110.916)
  461. AddZone("Doherty", -2270.040, -324.114, -1.2, -1794.920, -222.589, 200.000)
  462. AddZone("Hilltop Farm", 967.383, -450.390, -3.0, 1176.780, -217.900, 200.000)
  463. AddZone("Las Barrancas", -926.130, 1398.730, -3.0, -719.234, 1634.690, 200.000)
  464. AddZone("Pirates in Men's Pants", 1817.390, 1469.230, -89.084, 2027.400, 1703.230, 110.916)
  465. AddZone("City Hall", -2867.850, 277.411, -9.1, -2593.440, 458.411, 200.000)
  466. AddZone("Avispa Country Club", -2646.400, -355.493, 0.000, -2270.040, -222.589, 200.000)
  467. AddZone("The Strip", 2027.400, 863.229, -89.084, 2087.390, 1703.230, 110.916)
  468. AddZone("Hashbury", -2593.440, -222.589, -1.0, -2411.220, 54.722, 200.000)
  469. AddZone("Los Santos International", 1852.000, -2394.330, -89.084, 2089.000, -2179.250, 110.916)
  470. AddZone("Whitewood Estates", 1098.310, 1726.220, -89.084, 1197.390, 2243.230, 110.916)
  471. AddZone("Sherman Reservoir", -789.737, 1659.680, -89.084, -599.505, 1929.410, 110.916)
  472. AddZone("El Corona", 1812.620, -2179.250, -89.084, 1970.620, -1852.870, 110.916)
  473. AddZone("Downtown", -1700.010, 744.267, -6.1, -1580.010, 1176.520, 200.000)
  474. AddZone("Foster Valley", -2178.690, -1250.970, 0.000, -1794.920, -1115.580, 200.000)
  475. AddZone("Las Payasadas", -354.332, 2580.360, 2.0, -133.625, 2816.820, 200.000)
  476. AddZone("Valle Ocultado", -936.668, 2611.440, 2.0, -715.961, 2847.900, 200.000)
  477. AddZone("Blackfield Intersection", 1166.530, 795.010, -89.084, 1375.600, 1044.690, 110.916)
  478. AddZone("Ganton", 2222.560, -1852.870, -89.084, 2632.830, -1722.330, 110.916)
  479. AddZone("Easter Bay Airport", -1213.910, -730.118, 0.000, -1132.820, -50.096, 200.000)
  480. AddZone("Redsands East", 1817.390, 2011.830, -89.084, 2106.700, 2202.760, 110.916)
  481. AddZone("Esplanade East", -1499.890, 578.396, -79.615, -1339.890, 1274.260, 20.385)
  482. AddZone("Caligula's Palace", 2087.390, 1543.230, -89.084, 2437.390, 1703.230, 110.916)
  483. AddZone("Royal Casino", 2087.390, 1383.230, -89.084, 2437.390, 1543.230, 110.916)
  484. AddZone("Richman", 72.648, -1235.070, -89.084, 321.356, -1008.150, 110.916)
  485. AddZone("Starfish Casino", 2437.390, 1783.230, -89.084, 2685.160, 2012.180, 110.916)
  486. AddZone("Mulholland", 1281.130, -452.425, -89.084, 1641.130, -290.913, 110.916)
  487. AddZone("Downtown", -1982.320, 744.170, -6.1, -1871.720, 1274.260, 200.000)
  488. AddZone("Hankypanky Point", 2576.920, 62.158, 0.000, 2759.250, 385.503, 200.000)
  489. AddZone("K.A.C.C. Military Fuels", 2498.210, 2626.550, -89.084, 2749.900, 2861.550, 110.916)
  490. AddZone("Harry Gold Parkway", 1777.390, 863.232, -89.084, 1817.390, 2342.830, 110.916)
  491. AddZone("Bayside Tunnel", -2290.190, 2548.290, -89.084, -1950.190, 2723.290, 110.916)
  492. AddZone("Ocean Docks", 2324.000, -2302.330, -89.084, 2703.580, -2145.100, 110.916)
  493. AddZone("Richman", 321.356, -1044.070, -89.084, 647.557, -860.619, 110.916)
  494. AddZone("Randolph Industrial Estate", 1558.090, 596.349, -89.084, 1823.080, 823.235, 110.916)
  495. AddZone("East Beach", 2632.830, -1852.870, -89.084, 2959.350, -1668.130, 110.916)
  496. AddZone("Flint Water", -314.426, -753.874, -89.084, -106.339, -463.073, 110.916)
  497. AddZone("Blueberry", 19.607, -404.136, 3.8, 349.607, -220.137, 200.000)
  498. AddZone("Linden Station", 2749.900, 1198.990, -89.084, 2923.390, 1548.990, 110.916)
  499. AddZone("Glen Park", 1812.620, -1350.720, -89.084, 2056.860, -1100.820, 110.916)
  500. AddZone("Downtown", -1993.280, 265.243, -9.1, -1794.920, 578.396, 200.000)
  501. AddZone("Redsands West", 1377.390, 2243.230, -89.084, 1704.590, 2433.230, 110.916)
  502. AddZone("Richman", 321.356, -1235.070, -89.084, 647.522, -1044.070, 110.916)
  503. AddZone("Gant Bridge", -2741.450, 1659.680, -6.1, -2616.400, 2175.150, 200.000)
  504. AddZone("Lil' Probe Inn", -90.218, 1286.850, -3.0, 153.859, 1554.120, 200.000)
  505. AddZone("Flint Intersection", -187.700, -1596.760, -89.084, 17.063, -1276.600, 110.916)
  506. AddZone("Las Colinas", 2281.450, -1135.040, -89.084, 2632.740, -945.035, 110.916)
  507. AddZone("Sobell Rail Yards", 2749.900, 1548.990, -89.084, 2923.390, 1937.250, 110.916)
  508. AddZone("The Emerald Isle", 2011.940, 2202.760, -89.084, 2237.400, 2508.230, 110.916)
  509. AddZone("El Castillo del Diablo", -208.570, 2123.010, -7.6, 114.033, 2337.180, 200.000)
  510. AddZone("Santa Flora", -2741.070, 458.411, -7.6, -2533.040, 793.411, 200.000)
  511. AddZone("Playa del Seville", 2703.580, -2126.900, -89.084, 2959.350, -1852.870, 110.916)
  512. AddZone("Market", 926.922, -1577.590, -89.084, 1370.850, -1416.250, 110.916)
  513. AddZone("Queens", -2593.440, 54.722, 0.000, -2411.220, 458.411, 200.000)
  514. AddZone("Pilson Intersection", 1098.390, 2243.230, -89.084, 1377.390, 2507.230, 110.916)
  515. AddZone("Spinybed", 2121.400, 2663.170, -89.084, 2498.210, 2861.550, 110.916)
  516. AddZone("Pilgrim", 2437.390, 1383.230, -89.084, 2624.400, 1783.230, 110.916)
  517. AddZone("Blackfield", 964.391, 1403.220, -89.084, 1197.390, 1726.220, 110.916)
  518. AddZone("'The Big Ear'", -410.020, 1403.340, -3.0, -137.969, 1681.230, 200.000)
  519. AddZone("Dillimore", 580.794, -674.885, -9.5, 861.085, -404.790, 200.000)
  520. AddZone("El Quebrados", -1645.230, 2498.520, 0.000, -1372.140, 2777.850, 200.000)
  521. AddZone("Esplanade North", -2533.040, 1358.900, -4.5, -1996.660, 1501.210, 200.000)
  522. AddZone("Easter Bay Airport", -1499.890, -50.096, -1.0, -1242.980, 249.904, 200.000)
  523. AddZone("Fisher's Lagoon", 1916.990, -233.323, -100.000, 2131.720, 13.800, 200.000)
  524. AddZone("Mulholland", 1414.070, -768.027, -89.084, 1667.610, -452.425, 110.916)
  525. AddZone("East Beach", 2747.740, -1498.620, -89.084, 2959.350, -1120.040, 110.916)
  526. AddZone("San Andreas Sound", 2450.390, 385.503, -100.000, 2759.250, 562.349, 200.000)
  527. AddZone("Shady Creeks", -2030.120, -2174.890, -6.1, -1820.640, -1771.660, 200.000)
  528. AddZone("Market", 1072.660, -1416.250, -89.084, 1370.850, -1130.850, 110.916)
  529. AddZone("Rockshore West", 1997.220, 596.349, -89.084, 2377.390, 823.228, 110.916)
  530. AddZone("Prickle Pine", 1534.560, 2583.230, -89.084, 1848.400, 2863.230, 110.916)
  531. AddZone("Easter Basin", -1794.920, -50.096, -1.04, -1499.890, 249.904, 200.000)
  532. AddZone("Leafy Hollow", -1166.970, -1856.030, 0.000, -815.624, -1602.070, 200.000)
  533. AddZone("LVA Freight Depot", 1457.390, 863.229, -89.084, 1777.400, 1143.210, 110.916)
  534. AddZone("Prickle Pine", 1117.400, 2507.230, -89.084, 1534.560, 2723.230, 110.916)
  535. AddZone("Blueberry", 104.534, -220.137, 2.3, 349.607, 152.236, 200.000)
  536. AddZone("El Castillo del Diablo", -464.515, 2217.680, 0.000, -208.570, 2580.360, 200.000)
  537. AddZone("Downtown", -2078.670, 578.396, -7.6, -1499.890, 744.267, 200.000)
  538. AddZone("Rockshore East", 2537.390, 676.549, -89.084, 2902.350, 943.235, 110.916)
  539. AddZone("San Fierro Bay", -2616.400, 1501.210, -3.0, -1996.660, 1659.680, 200.000)
  540. AddZone("Paradiso", -2741.070, 793.411, -6.1, -2533.040, 1268.410, 200.000)
  541. AddZone("The Camel's Toe", 2087.390, 1203.230, -89.084, 2640.400, 1383.230, 110.916)
  542. AddZone("Old Venturas Strip", 2162.390, 2012.180, -89.084, 2685.160, 2202.760, 110.916)
  543. AddZone("Juniper Hill", -2533.040, 578.396, -7.6, -2274.170, 968.369, 200.000)
  544. AddZone("Juniper Hollow", -2533.040, 968.369, -6.1, -2274.170, 1358.900, 200.000)
  545. AddZone("Roca Escalante", 2237.400, 2202.760, -89.084, 2536.430, 2542.550, 110.916)
  546. AddZone("Julius Thruway East", 2685.160, 1055.960, -89.084, 2749.900, 2626.550, 110.916)
  547. AddZone("Verona Beach", 647.712, -2173.290, -89.084, 930.221, -1804.210, 110.916)
  548. AddZone("Foster Valley", -2178.690, -599.884, -1.2, -1794.920, -324.114, 200.000)
  549. AddZone("Arco del Oeste", -901.129, 2221.860, 0.000, -592.090, 2571.970, 200.000)
  550. AddZone("Fallen Tree", -792.254, -698.555, -5.3, -452.404, -380.043, 200.000)
  551. AddZone("The Farm", -1209.670, -1317.100, 114.981, -908.161, -787.391, 251.981)
  552. AddZone("The Sherman Dam", -968.772, 1929.410, -3.0, -481.126, 2155.260, 200.000)
  553. AddZone("Esplanade North", -1996.660, 1358.900, -4.5, -1524.240, 1592.510, 200.000)
  554. AddZone("Financial", -1871.720, 744.170, -6.1, -1701.300, 1176.420, 300.000)
  555. AddZone("Garcia", -2411.220, -222.589, -1.14, -2173.040, 265.243, 200.000)
  556. AddZone("Montgomery", 1119.510, 119.526, -3.0, 1451.400, 493.323, 200.000)
  557. AddZone("Creek", 2749.900, 1937.250, -89.084, 2921.620, 2669.790, 110.916)
  558. AddZone("Los Santos International", 1249.620, -2394.330, -89.084, 1852.000, -2179.250, 110.916)
  559. AddZone("Santa Maria Beach", 72.648, -2173.290, -89.084, 342.648, -1684.650, 110.916)
  560. AddZone("Mulholland Intersection", 1463.900, -1150.870, -89.084, 1812.620, -768.027, 110.916)
  561. AddZone("Angel Pine", -2324.940, -2584.290, -6.1, -1964.220, -2212.110, 200.000)
  562. AddZone("Verdant Meadows", 37.032, 2337.180, -3.0, 435.988, 2677.900, 200.000)
  563. AddZone("Octane Springs", 338.658, 1228.510, 0.000, 664.308, 1655.050, 200.000)
  564. AddZone("Come-A-Lot", 2087.390, 943.235, -89.084, 2623.180, 1203.230, 110.916)
  565. AddZone("Redsands West", 1236.630, 1883.110, -89.084, 1777.390, 2142.860, 110.916)
  566. AddZone("Santa Maria Beach", 342.648, -2173.290, -89.084, 647.712, -1684.650, 110.916)
  567. AddZone("Verdant Bluffs", 1249.620, -2179.250, -89.084, 1692.620, -1842.270, 110.916)
  568. AddZone("Las Venturas Airport", 1236.630, 1203.280, -89.084, 1457.370, 1883.110, 110.916)
  569. AddZone("Flint Range", -594.191, -1648.550, 0.000, -187.700, -1276.600, 200.000)
  570. AddZone("Verdant Bluffs", 930.221, -2488.420, -89.084, 1249.620, -2006.780, 110.916)
  571. AddZone("Palomino Creek", 2160.220, -149.004, 0.000, 2576.920, 228.322, 200.000)
  572. AddZone("Ocean Docks", 2373.770, -2697.090, -89.084, 2809.220, -2330.460, 110.916)
  573. AddZone("Easter Bay Airport", -1213.910, -50.096, -4.5, -947.980, 578.396, 200.000)
  574. AddZone("Whitewood Estates", 883.308, 1726.220, -89.084, 1098.310, 2507.230, 110.916)
  575. AddZone("Calton Heights", -2274.170, 744.170, -6.1, -1982.320, 1358.900, 200.000)
  576. AddZone("Easter Basin", -1794.920, 249.904, -9.1, -1242.980, 578.396, 200.000)
  577. AddZone("Los Santos Inlet", -321.744, -2224.430, -89.084, 44.615, -1724.430, 110.916)
  578. AddZone("Doherty", -2173.040, -222.589, -1.0, -1794.920, 265.243, 200.000)
  579. AddZone("Mount Chiliad", -2178.690, -2189.910, -47.917, -2030.120, -1771.660, 576.083)
  580. AddZone("Fort Carson", -376.233, 826.326, -3.0, 123.717, 1220.440, 200.000)
  581. AddZone("Foster Valley", -2178.690, -1115.580, 0.000, -1794.920, -599.884, 200.000)
  582. AddZone("Ocean Flats", -2994.490, -222.589, -1.0, -2593.440, 277.411, 200.000)
  583. AddZone("Fern Ridge", 508.189, -139.259, 0.000, 1306.660, 119.526, 200.000)
  584. AddZone("Bayside", -2741.070, 2175.150, 0.000, -2353.170, 2722.790, 200.000)
  585. AddZone("Las Venturas Airport", 1457.370, 1203.280, -89.084, 1777.390, 1883.110, 110.916)
  586. AddZone("Blueberry Acres", -319.676, -220.137, 0.000, 104.534, 293.324, 200.000)
  587. AddZone("Palisades", -2994.490, 458.411, -6.1, -2741.070, 1339.610, 200.000)
  588. AddZone("North Rock", 2285.370, -768.027, 0.000, 2770.590, -269.740, 200.000)
  589. AddZone("Hunter Quarry", 337.244, 710.840, -115.239, 860.554, 1031.710, 203.761)
  590. AddZone("Los Santos International", 1382.730, -2730.880, -89.084, 2201.820, -2394.330, 110.916)
  591. AddZone("Missionary Hill", -2994.490, -811.276, 0.000, -2178.690, -430.276, 200.000)
  592. AddZone("San Fierro Bay", -2616.400, 1659.680, -3.0, -1996.660, 2175.150, 200.000)
  593. AddZone("Restricted Area", -91.586, 1655.050, -50.000, 421.234, 2123.010, 250.000)
  594. AddZone("Mount Chiliad", -2997.470, -1115.580, -47.917, -2178.690, -971.913, 576.083)
  595. AddZone("Mount Chiliad", -2178.690, -1771.660, -47.917, -1936.120, -1250.970, 576.083)
  596. AddZone("Easter Bay Airport", -1794.920, -730.118, -3.0, -1213.910, -50.096, 200.000)
  597. AddZone("The Panopticon", -947.980, -304.320, -1.1, -319.676, 327.071, 200.000)
  598. AddZone("Shady Creeks", -1820.640, -2643.680, -8.0, -1226.780, -1771.660, 200.000)
  599. AddZone("Back o Beyond", -1166.970, -2641.190, 0.000, -321.744, -1856.030, 200.000)
  600. AddZone("Mount Chiliad", -2994.490, -2189.910, -47.917, -2178.690, -1115.580, 576.083)
  601. AddZone("Tierra Robada", -1213.910, 596.349, -242.990, -480.539, 1659.680, 900.000)
  602. AddZone("Flint County", -1213.910, -2892.970, -242.990, 44.615, -768.027, 900.000)
  603. AddZone("Whetstone", -2997.470, -2892.970, -242.990, -1213.910, -1115.580, 900.000)
  604. AddZone("Bone County", -480.539, 596.349, -242.990, 869.461, 2993.870, 900.000)
  605. AddZone("Tierra Robada", -2997.470, 1659.680, -242.990, -480.539, 2993.870, 900.000)
  606. AddZone("San Fierro", -2997.470, -1115.580, -242.990, -1213.910, 1659.680, 900.000)
  607. AddZone("Las Venturas", 869.461, 596.349, -242.990, 2997.060, 2993.870, 900.000)
  608. AddZone("Red County", -1213.910, -768.027, -242.990, 2997.060, 596.349, 900.000)
  609. AddZone("Los Santos", 44.615, -2892.970, -242.990, 2997.060, -768.027, 900.000)
  610. }
  611. calculateZone(posX, posY, posZ) {
  612. if ( bInitZaC == 0 )
  613. {
  614. initZonesAndCities()
  615. bInitZaC := 1
  616. }
  617. Loop % nZone-1
  618. {
  619. 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)
  620. {
  621. ErrorLevel := ERROR_OK
  622. return zone%A_Index%_name
  623. }
  624. }
  625. ErrorLevel := ERROR_ZONE_NOT_FOUND
  626. return "Unbekannt"
  627. }
  628. calculateCity(posX, posY, posZ) {
  629. if ( bInitZaC == 0 )
  630. {
  631. initZonesAndCities()
  632. bInitZaC := 1
  633. }
  634. smallestCity := "Unbekannt"
  635. currentCitySize := 0
  636. smallestCitySize := 0
  637. Loop % nCity-1
  638. {
  639. 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)
  640. {
  641. 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))
  642. if (smallestCity == "Unbekannt") || (currentCitySize < smallestCitySize)
  643. {
  644. smallestCity := city%A_Index%_name
  645. smallestCitySize := currentCitySize
  646. }
  647. }
  648. }
  649. if(smallestCity == "Unbekannt") {
  650. ErrorLevel := ERROR_CITY_NOT_FOUND
  651. } else {
  652. ErrorLevel := ERROR_OK
  653. }
  654. return smallestCity
  655. }
  656. AddZone(sName, x1, y1, z1, x2, y2, z2) {
  657. global
  658. zone%nZone%_name := sName
  659. zone%nZone%_x1 := x1
  660. zone%nZone%_y1 := y1
  661. zone%nZone%_z1 := z1
  662. zone%nZone%_x2 := x2
  663. zone%nZone%_y2 := y2
  664. zone%nZone%_z2 := z2
  665. nZone := nZone + 1
  666. }
  667. AddCity(sName, x1, y1, z1, x2, y2, z2) {
  668. global
  669. city%nCity%_name := sName
  670. city%nCity%_x1 := x1
  671. city%nCity%_y1 := y1
  672. city%nCity%_z1 := z1
  673. city%nCity%_x2 := x2
  674. city%nCity%_y2 := y2
  675. city%nCity%_z2 := z2
  676. nCity := nCity + 1
  677. }
  678. getPlayerInteriorId() {
  679. if(!checkHandles())
  680. return -1
  681. iid := readMem(hGTA, ADDR_CPED_INTID, 4, "Int")
  682. if(ErrorLevel) {
  683. ErrorLevel := ERROR_READ_MEMORY
  684. return -1
  685. }
  686. ErrorLevel := ERROR_OK
  687. return iid
  688. }
  689. getPlayerZone()
  690. {
  691. aktPos := getCoordinates()
  692. return calculateZone(aktPos[1], aktPos[2], aktPos[3])
  693. }
  694. getPlayerCity()
  695. {
  696. aktPos := getCoordinates()
  697. return calculateCity(aktPos[1], aktPos[2], aktPos[3])
  698. }
  699. checkHandles() {
  700. if(iRefreshHandles+500>A_TickCount)
  701. return true
  702. iRefreshHandles:=A_TickCount
  703. if(!refreshGTA() || !refreshSAMP() || !refreshMemory()) {
  704. return false
  705. } else {
  706. return true
  707. }
  708. return true
  709. }
  710. refreshGTA() {
  711. newPID := getPID("GTA:SA:MP")
  712. if(!newPID) {
  713. if(hGTA) {
  714. virtualFreeEx(hGTA, pMemory, 0, 0x8000)
  715. closeProcess(hGTA)
  716. hGTA := 0x0
  717. }
  718. dwGTAPID := 0
  719. hGTA := 0x0
  720. dwSAMP := 0x0
  721. pMemory := 0x0
  722. return false
  723. }
  724. if(!hGTA || (dwGTAPID != newPID)) {
  725. hGTA := openProcess(newPID)
  726. if(ErrorLevel) {
  727. dwGTAPID := 0
  728. hGTA := 0x0
  729. dwSAMP := 0x0
  730. pMemory := 0x0
  731. return false
  732. }
  733. dwGTAPID := newPID
  734. dwSAMP := 0x0
  735. pMemory := 0x0
  736. return true
  737. }
  738. return true
  739. }
  740. refreshSAMP() {
  741. if(dwSAMP)
  742. return true
  743. dwSAMP := getModuleBaseAddress("samp.dll", hGTA)
  744. if(!dwSAMP)
  745. return false
  746. return true
  747. }
  748. refreshMemory() {
  749. if(!pMemory) {
  750. pMemory := virtualAllocEx(hGTA, 6144, 0x1000 | 0x2000, 0x40)
  751. if(ErrorLevel) {
  752. pMemory := 0x0
  753. return false
  754. }
  755. pParam1 := pMemory
  756. pParam2 := pMemory + 1024
  757. pParam3 := pMemory + 2048
  758. pParam4 := pMemory + 3072
  759. pParam5 := pMemory + 4096
  760. pInjectFunc := pMemory + 5120
  761. }
  762. return true
  763. }
  764. getPID(szWindow) {
  765. local dwPID := 0
  766. WinGet, dwPID, PID, %szWindow%
  767. return dwPID
  768. }
  769. openProcess(dwPID, dwRights = 0x1F0FFF) {
  770. hProcess := DllCall("OpenProcess"
  771. , "UInt", dwRights
  772. , "int", 0
  773. , "UInt", dwPID
  774. , "Uint")
  775. if(hProcess == 0) {
  776. ErrorLevel := ERROR_OPEN_PROCESS
  777. return 0
  778. }
  779. ErrorLevel := ERROR_OK
  780. return hProcess
  781. }
  782. closeProcess(hProcess) {
  783. if(hProcess == 0) {
  784. ErrorLevel := ERROR_INVALID_HANDLE
  785. return 0
  786. }
  787. dwRet := DllCall( "CloseHandle"
  788. , "Uint", hProcess
  789. , "UInt")
  790. ErrorLevel := ERROR_OK
  791. }
  792. getModuleBaseAddress(sModule, hProcess) {
  793. if(!sModule) {
  794. ErrorLevel := ERROR_MODULE_NOT_FOUND
  795. return 0
  796. }
  797. if(!hProcess) {
  798. ErrorLevel := ERROR_INVALID_HANDLE
  799. return 0
  800. }
  801. dwSize = 1024*4
  802. VarSetCapacity(hMods, dwSize)
  803. VarSetCapacity(cbNeeded, 4)
  804. dwRet := DllCall( "Psapi.dll\EnumProcessModules"
  805. , "UInt", hProcess
  806. , "UInt", &hMods
  807. , "UInt", dwSize
  808. , "UInt*", cbNeeded
  809. , "UInt")
  810. if(dwRet == 0) {
  811. ErrorLevel := ERROR_ENUM_PROCESS_MODULES
  812. return 0
  813. }
  814. dwMods := cbNeeded / 4
  815. i := 0
  816. VarSetCapacity(hModule, 4)
  817. VarSetCapacity(sCurModule, 260)
  818. while(i < dwMods) {
  819. hModule := NumGet(hMods, i*4)
  820. DllCall("Psapi.dll\GetModuleFileNameEx"
  821. , "UInt", hProcess
  822. , "UInt", hModule
  823. , "Str", sCurModule
  824. , "UInt", 260)
  825. SplitPath, sCurModule, sFilename
  826. if(sModule == sFilename) {
  827. ErrorLevel := ERROR_OK
  828. return hModule
  829. }
  830. i := i + 1
  831. }
  832. ErrorLevel := ERROR_MODULE_NOT_FOUND
  833. return 0
  834. }
  835. readString(hProcess, dwAddress, dwLen) {
  836. if(!hProcess) {
  837. ErrorLevel := ERROR_INVALID_HANDLE
  838. return 0
  839. }
  840. VarSetCapacity(sRead, dwLen)
  841. dwRet := DllCall( "ReadProcessMemory"
  842. , "UInt", hProcess
  843. , "UInt", dwAddress
  844. , "Str", sRead
  845. , "UInt", dwLen
  846. , "UInt*", 0
  847. , "UInt")
  848. if(dwRet == 0) {
  849. ErrorLevel := ERROR_READ_MEMORY
  850. return 0
  851. }
  852. ErrorLevel := ERROR_OK
  853. if A_IsUnicode
  854. return __ansiToUnicode(sRead)
  855. return sRead
  856. }
  857. readFloat(hProcess, dwAddress) {
  858. if(!hProcess) {
  859. ErrorLevel := ERROR_INVALID_HANDLE
  860. return 0
  861. }
  862. VarSetCapacity(dwRead, 4)
  863. dwRet := DllCall( "ReadProcessMemory"
  864. , "UInt", hProcess
  865. , "UInt", dwAddress
  866. , "Str", dwRead
  867. , "UInt", 4
  868. , "UInt*", 0
  869. , "UInt")
  870. if(dwRet == 0) {
  871. ErrorLevel := ERROR_READ_MEMORY
  872. return 0
  873. }
  874. ErrorLevel := ERROR_OK
  875. return NumGet(dwRead, 0, "Float")
  876. }
  877. readDWORD(hProcess, dwAddress) {
  878. if(!hProcess) {
  879. ErrorLevel := ERROR_INVALID_HANDLE
  880. return 0
  881. }
  882. VarSetCapacity(dwRead, 4)
  883. dwRet := DllCall( "ReadProcessMemory"
  884. , "UInt", hProcess
  885. , "UInt", dwAddress
  886. , "Str", dwRead
  887. , "UInt", 4
  888. , "UInt*", 0)
  889. if(dwRet == 0) {
  890. ErrorLevel := ERROR_READ_MEMORY
  891. return 0
  892. }
  893. ErrorLevel := ERROR_OK
  894. return NumGet(dwRead, 0, "UInt")
  895. }
  896. readMem(hProcess, dwAddress, dwLen=4, type="UInt") {
  897. if(!hProcess) {
  898. ErrorLevel := ERROR_INVALID_HANDLE
  899. return 0
  900. }
  901. VarSetCapacity(dwRead, dwLen)
  902. dwRet := DllCall( "ReadProcessMemory"
  903. , "UInt", hProcess
  904. , "UInt", dwAddress
  905. , "Str", dwRead
  906. , "UInt", dwLen
  907. , "UInt*", 0)
  908. if(dwRet == 0) {
  909. ErrorLevel := ERROR_READ_MEMORY
  910. return 0
  911. }
  912. ErrorLevel := ERROR_OK
  913. return NumGet(dwRead, 0, type)
  914. }
  915. writeString(hProcess, dwAddress, wString) {
  916. if(!hProcess) {
  917. ErrorLevel := ERROR_INVALID_HANDLE
  918. return false
  919. }
  920. sString := wString
  921. if A_IsUnicode
  922. sString := __unicodeToAnsi(wString)
  923. dwRet := DllCall( "WriteProcessMemory"
  924. , "UInt", hProcess
  925. , "UInt", dwAddress
  926. , "Str", sString
  927. , "UInt", StrLen(wString) + 1
  928. , "UInt", 0
  929. , "UInt")
  930. if(dwRet == 0) {
  931. ErrorLEvel := ERROR_WRITE_MEMORY
  932. return false
  933. }
  934. ErrorLevel := ERROR_OK
  935. return true
  936. }
  937. getPlayerIdByName(wName) {
  938. wName := "" wName
  939. if(StrLen(wName) < 1 || StrLen(wName) > 20)
  940. return -1
  941. if(iRefreshScoreboard+iUpdateTick > A_TickCount)
  942. {
  943. For i, o in oScoreboardData
  944. {
  945. if(InStr(o.NAME,wName)==1)
  946. return i
  947. }
  948. return -1
  949. }
  950. if(!updateOScoreboardData())
  951. return -1
  952. For i, o in oScoreboardData
  953. {
  954. if(InStr(o.NAME,wName)==1)
  955. return i
  956. }
  957. return -1
  958. }
  959. getPlayerPingById(dwId) {
  960. dwId += 0
  961. dwId := Floor(dwId)
  962. if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
  963. return -1
  964. if(iRefreshScoreboard+iUpdateTick > A_TickCount)
  965. {
  966. if(oScoreboardData[dwId])
  967. return oScoreboardData[dwId].PING
  968. return -1
  969. }
  970. if(!updateOScoreboardData())
  971. return -1
  972. if(oScoreboardData[dwId])
  973. return oScoreboardData[dwId].PING
  974. return -1
  975. }
  976. updateScoreboardDataEx() {
  977. if(!checkHandles())
  978. return false
  979. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  980. if(ErrorLevel || dwAddress==0) {
  981. ErrorLevel := ERROR_READ_MEMORY
  982. return false
  983. }
  984. dwFunc := dwSAMP + FUNC_UPDATESCOREBOARD
  985. VarSetCapacity(injectData, 11, 0)
  986. NumPut(0xB9, injectData, 0, "UChar")
  987. NumPut(dwAddress, injectData, 1, "UInt")
  988. NumPut(0xE8, injectData, 5, "UChar")
  989. offset := dwFunc - (pInjectFunc + 10)
  990. NumPut(offset, injectData, 6, "Int")
  991. NumPut(0xC3, injectData, 10, "UChar")
  992. writeRaw(hGTA, pInjectFunc, &injectData, 11)
  993. if(ErrorLevel)
  994. return false
  995. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  996. if(ErrorLevel)
  997. return false
  998. waitForSingleObject(hThread, 0xFFFFFFFF)
  999. closeProcess(hThread)
  1000. return true
  1001. }
  1002. updateOScoreboardData() {
  1003. if(!checkHandles())
  1004. return 0
  1005. oScoreboardData := []
  1006. if(!updateScoreboardDataEx())
  1007. return 0
  1008. iRefreshScoreboard := A_TickCount
  1009. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1010. if(ErrorLevel || dwAddress==0) {
  1011. ErrorLevel := ERROR_READ_MEMORY
  1012. return 0
  1013. }
  1014. dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
  1015. if(ErrorLevel || dwAddress==0) {
  1016. ErrorLevel := ERROR_READ_MEMORY
  1017. return 0
  1018. }
  1019. dwPlayers := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
  1020. if(ErrorLevel || dwPlayers==0) {
  1021. ErrorLevel := ERROR_READ_MEMORY
  1022. return 0
  1023. }
  1024. wID := readMem(hGTA, dwPlayers + SAMP_SLOCALPLAYERID_OFFSET, 2, "Short")
  1025. if(ErrorLevel) {
  1026. ErrorLevel := ERROR_READ_MEMORY
  1027. return 0
  1028. }
  1029. dwPing := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERPING_OFFSET, 4, "Int")
  1030. if(ErrorLevel) {
  1031. ErrorLevel := ERROR_READ_MEMORY
  1032. return 0
  1033. }
  1034. dwScore := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERSCORE_OFFSET, 4, "Int")
  1035. if(ErrorLevel) {
  1036. ErrorLevel := ERROR_READ_MEMORY
  1037. return 0
  1038. }
  1039. dwTemp := readMem(hGTA, dwPlayers + SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET, 4, "Int")
  1040. if(ErrorLevel) {
  1041. ErrorLevel := ERROR_READ_MEMORY
  1042. return 0
  1043. }
  1044. sUsername := ""
  1045. if(dwTemp <= 0xf) {
  1046. sUsername := readString(hGTA, dwPlayers + SAMP_SZLOCALPLAYERNAME_OFFSET, 16)
  1047. if(ErrorLevel) {
  1048. ErrorLevel := ERROR_READ_MEMORY
  1049. return 0
  1050. }
  1051. }
  1052. else {
  1053. dwAddress := readDWORD(hGTA, dwPlayers + SAMP_PSZLOCALPLAYERNAME_OFFSET)
  1054. if(ErrorLevel) {
  1055. ErrorLevel := ERROR_READ_MEMORY
  1056. return 0
  1057. }
  1058. sUsername := readString(hGTA, dwAddress, 25)
  1059. if(ErrorLevel) {
  1060. ErrorLevel := ERROR_READ_MEMORY
  1061. return 0
  1062. }
  1063. }
  1064. oScoreboardData[wID] := Object("NAME", sUsername, "ID", wID, "PING", dwPing, "SCORE", dwScore, "ISNPC", 0)
  1065. Loop, % SAMP_PLAYER_MAX
  1066. {
  1067. i := A_Index-1
  1068. dwRemoteplayer := readDWORD(hGTA, dwPlayers+SAMP_PREMOTEPLAYER_OFFSET+i*4)
  1069. if(ErrorLevel) {
  1070. ErrorLevel := ERROR_READ_MEMORY
  1071. return 0
  1072. }
  1073. if(dwRemoteplayer==0)
  1074. continue
  1075. dwPing := readMem(hGTA, dwRemoteplayer + SAMP_IPING_OFFSET, 4, "Int")
  1076. if(ErrorLevel) {
  1077. ErrorLevel := ERROR_READ_MEMORY
  1078. return 0
  1079. }
  1080. dwScore := readMem(hGTA, dwRemoteplayer + SAMP_ISCORE_OFFSET, 4, "Int")
  1081. if(ErrorLevel) {
  1082. ErrorLevel := ERROR_READ_MEMORY
  1083. return 0
  1084. }
  1085. dwIsNPC := readMem(hGTA, dwRemoteplayer + SAMP_ISNPC_OFFSET, 4, "Int")
  1086. if(ErrorLevel) {
  1087. ErrorLevel := ERROR_READ_MEMORY
  1088. return 0
  1089. }
  1090. dwTemp := readMem(hGTA, dwRemoteplayer + SAMP_ISTRLENNAME___OFFSET, 4, "Int")
  1091. if(ErrorLevel) {
  1092. ErrorLevel := ERROR_READ_MEMORY
  1093. return 0
  1094. }
  1095. sUsername := ""
  1096. if(dwTemp <= 0xf)
  1097. {
  1098. sUsername := readString(hGTA, dwRemoteplayer+SAMP_SZPLAYERNAME_OFFSET, 16)
  1099. if(ErrorLevel) {
  1100. ErrorLevel := ERROR_READ_MEMORY
  1101. return 0
  1102. }
  1103. }
  1104. else {
  1105. dwAddress := readDWORD(hGTA, dwRemoteplayer + SAMP_PSZPLAYERNAME_OFFSET)
  1106. if(ErrorLevel || dwAddress==0) {
  1107. ErrorLevel := ERROR_READ_MEMORY
  1108. return 0
  1109. }
  1110. sUsername := readString(hGTA, dwAddress, 25)
  1111. if(ErrorLevel) {
  1112. ErrorLevel := ERROR_READ_MEMORY
  1113. return 0
  1114. }
  1115. }
  1116. o := Object("NAME", sUsername, "ID", i, "PING", dwPing, "SCORE", dwScore, "ISNPC", dwIsNPC)
  1117. oScoreboardData[i] := o
  1118. }
  1119. ErrorLevel := ERROR_OK
  1120. return 1
  1121. }
  1122. writeRaw(hProcess, dwAddress, pBuffer, dwLen) {
  1123. if(!hProcess) {
  1124. ErrorLevel := ERROR_INVALID_HANDLE
  1125. return false
  1126. }
  1127. dwRet := DllCall( "WriteProcessMemory"
  1128. , "UInt", hProcess
  1129. , "UInt", dwAddress
  1130. , "UInt", pBuffer
  1131. , "UInt", dwLen
  1132. , "UInt", 0
  1133. , "UInt")
  1134. if(dwRet == 0) {
  1135. ErrorLEvel := ERROR_WRITE_MEMORY
  1136. return false
  1137. }
  1138. ErrorLevel := ERROR_OK
  1139. return true
  1140. }
  1141. callWithParams(hProcess, dwFunc, aParams, bCleanupStack = true) {
  1142. if(!hProcess) {
  1143. ErrorLevel := ERROR_INVALID_HANDLE
  1144. return false
  1145. }
  1146. validParams := 0
  1147. i := aParams.MaxIndex()
  1148. dwLen := i * 5 + 5 + 1
  1149. if(bCleanupStack)
  1150. dwLen += 3
  1151. VarSetCapacity(injectData, i * 5 + 5 + 3 + 1, 0)
  1152. i_ := 1
  1153. while(i > 0) {
  1154. if(aParams[i][1] != "") {
  1155. dwMemAddress := 0x0
  1156. if(aParams[i][1] == "p") {
  1157. dwMemAddress := aParams[i][2]
  1158. } else if(aParams[i][1] == "s") {
  1159. if(i_>3)
  1160. return false
  1161. dwMemAddress := pParam%i_%
  1162. writeString(hProcess, dwMemAddress, aParams[i][2])
  1163. if(ErrorLevel)
  1164. return false
  1165. i_ += 1
  1166. } else if(aParams[i][1] == "i") {
  1167. dwMemAddress := aParams[i][2]
  1168. } else {
  1169. return false
  1170. }
  1171. NumPut(0x68, injectData, validParams * 5, "UChar")
  1172. NumPut(dwMemAddress, injectData, validParams * 5 + 1, "UInt")
  1173. validParams += 1
  1174. }
  1175. i -= 1
  1176. }
  1177. offset := dwFunc - ( pInjectFunc + validParams * 5 + 5 )
  1178. NumPut(0xE8, injectData, validParams * 5, "UChar")
  1179. NumPut(offset, injectData, validParams * 5 + 1, "Int")
  1180. if(bCleanupStack) {
  1181. NumPut(0xC483, injectData, validParams * 5 + 5, "UShort")
  1182. NumPut(validParams*4, injectData, validParams * 5 + 7, "UChar")
  1183. NumPut(0xC3, injectData, validParams * 5 + 8, "UChar")
  1184. } else {
  1185. NumPut(0xC3, injectData, validParams * 5 + 5, "UChar")
  1186. }
  1187. writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
  1188. if(ErrorLevel)
  1189. return false
  1190. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1191. if(ErrorLevel)
  1192. return false
  1193. waitForSingleObject(hThread, 0xFFFFFFFF)
  1194. closeProcess(hThread)
  1195. return true
  1196. }
  1197. virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect) {
  1198. if(!hProcess) {
  1199. ErrorLevel := ERROR_INVALID_HANDLE
  1200. return 0
  1201. }
  1202. dwRet := DllCall( "VirtualAllocEx"
  1203. , "UInt", hProcess
  1204. , "UInt", 0
  1205. , "UInt", dwSize
  1206. , "UInt", flAllocationType
  1207. , "UInt", flProtect
  1208. , "UInt")
  1209. if(dwRet == 0) {
  1210. ErrorLEvel := ERROR_ALLOC_MEMORY
  1211. return 0
  1212. }
  1213. ErrorLevel := ERROR_OK
  1214. return dwRet
  1215. }
  1216. virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType) {
  1217. if(!hProcess) {
  1218. ErrorLevel := ERROR_INVALID_HANDLE
  1219. return 0
  1220. }
  1221. dwRet := DllCall( "VirtualFreeEx"
  1222. , "UInt", hProcess
  1223. , "UInt", lpAddress
  1224. , "UInt", dwSize
  1225. , "UInt", dwFreeType
  1226. , "UInt")
  1227. if(dwRet == 0) {
  1228. ErrorLEvel := ERROR_FREE_MEMORY
  1229. return 0
  1230. }
  1231. ErrorLevel := ERROR_OK
  1232. return dwRet
  1233. }
  1234. createRemoteThread(hProcess, lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId) {
  1235. if(!hProcess) {
  1236. ErrorLevel := ERROR_INVALID_HANDLE
  1237. return 0
  1238. }
  1239. dwRet := DllCall( "CreateRemoteThread"
  1240. , "UInt", hProcess
  1241. , "UInt", lpThreadAttributes
  1242. , "UInt", dwStackSize
  1243. , "UInt", lpStartAddress
  1244. , "UInt", lpParameter
  1245. , "UInt", dwCreationFlags
  1246. , "UInt", lpThreadId
  1247. , "UInt")
  1248. if(dwRet == 0) {
  1249. ErrorLEvel := ERROR_ALLOC_MEMORY
  1250. return 0
  1251. }
  1252. ErrorLevel := ERROR_OK
  1253. return dwRet
  1254. }
  1255. waitForSingleObject(hThread, dwMilliseconds) {
  1256. if(!hThread) {
  1257. ErrorLevel := ERROR_INVALID_HANDLE
  1258. return 0
  1259. }
  1260. dwRet := DllCall( "WaitForSingleObject"
  1261. , "UInt", hThread
  1262. , "UInt", dwMilliseconds
  1263. , "UInt")
  1264. if(dwRet == 0xFFFFFFFF) {
  1265. ErrorLEvel := ERROR_WAIT_FOR_OBJECT
  1266. return 0
  1267. }
  1268. ErrorLevel := ERROR_OK
  1269. return dwRet
  1270. }
  1271. __ansiToUnicode(sString, nLen = 0) {
  1272. If !nLen
  1273. {
  1274. nLen := DllCall("MultiByteToWideChar"
  1275. , "Uint", 0
  1276. , "Uint", 0
  1277. , "Uint", &sString
  1278. , "int", -1
  1279. , "Uint", 0
  1280. , "int", 0)
  1281. }
  1282. VarSetCapacity(wString, nLen * 2)
  1283. DllCall("MultiByteToWideChar"
  1284. , "Uint", 0
  1285. , "Uint", 0
  1286. , "Uint", &sString
  1287. , "int", -1
  1288. , "Uint", &wString
  1289. , "int", nLen)
  1290. return wString
  1291. }
  1292. __unicodeToAnsi(wString, nLen = 0) {
  1293. pString := wString + 1 > 65536 ? wString : &wString
  1294. If !nLen
  1295. {
  1296. nLen := DllCall("WideCharToMultiByte"
  1297. , "Uint", 0
  1298. , "Uint", 0
  1299. , "Uint", pString
  1300. , "int", -1
  1301. , "Uint", 0
  1302. , "int", 0
  1303. , "Uint", 0
  1304. , "Uint", 0)
  1305. }
  1306. VarSetCapacity(sString, nLen)
  1307. DllCall("WideCharToMultiByte"
  1308. , "Uint", 0
  1309. , "Uint", 0
  1310. , "Uint", pString
  1311. , "int", -1
  1312. , "str", sString
  1313. , "int", nLen
  1314. , "Uint", 0
  1315. , "Uint", 0)
  1316. return sString
  1317. }
  1318. restartGameEx() {
  1319. if(!checkHandles())
  1320. return -1
  1321. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1322. if(ErrorLevel || dwAddress==0) {
  1323. ErrorLevel := ERROR_READ_MEMORY
  1324. return -1
  1325. }
  1326. dwFunc := dwSAMP + 0xA060
  1327. VarSetCapacity(injectData, 11, 0)
  1328. NumPut(0xB9, injectData, 0, "UChar")
  1329. NumPut(dwAddress, injectData, 1, "UInt")
  1330. NumPut(0xE8, injectData, 5, "UChar")
  1331. offset := dwFunc - (pInjectFunc + 10)
  1332. NumPut(offset, injectData, 6, "Int")
  1333. NumPut(0xC3, injectData, 10, "UChar")
  1334. writeRaw(hGTA, pInjectFunc, &injectData, 11)
  1335. if(ErrorLevel)
  1336. return false
  1337. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1338. if(ErrorLevel)
  1339. return false
  1340. waitForSingleObject(hThread, 0xFFFFFFFF)
  1341. return true
  1342. }
  1343. disconnectEx() {
  1344. if(!checkHandles())
  1345. return 0
  1346. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1347. if(ErrorLevel || dwAddress==0) {
  1348. ErrorLevel := ERROR_READ_MEMORY
  1349. return 0
  1350. }
  1351. dwAddress := readDWORD(hGTA, dwAddress + 0x3c9)
  1352. if(ErrorLevel || dwAddress==0) {
  1353. ErrorLevel := ERROR_READ_MEMORY
  1354. return 0
  1355. }
  1356. ecx := dwAddress
  1357. dwAddress := readDWORD(hGTA, dwAddress)
  1358. if(ErrorLevel || dwAddress==0) {
  1359. ErrorLevel := ERROR_READ_MEMORY
  1360. return 0
  1361. }
  1362. VarSetCapacity(injectData, 24, 0)
  1363. NumPut(0xB9, injectData, 0, "UChar")
  1364. NumPut(ecx, injectData, 1, "UInt")
  1365. NumPut(0xB8, injectData, 5, "UChar")
  1366. NumPut(dwAddress, injectData, 6, "UInt")
  1367. NumPut(0x68, injectData, 10, "UChar")
  1368. NumPut(0, injectData, 11, "UInt")
  1369. NumPut(0x68, injectData, 15, "UChar")
  1370. NumPut(500, injectData, 16, "UInt")
  1371. NumPut(0x50FF, injectData, 20, "UShort")
  1372. NumPut(0x08, injectData, 22, "UChar")
  1373. NumPut(0xC3, injectData, 23, "UChar")
  1374. writeRaw(hGTA, pInjectFunc, &injectData, 24)
  1375. if(ErrorLevel)
  1376. return false
  1377. hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
  1378. if(ErrorLevel)
  1379. return false
  1380. waitForSingleObject(hThread, 0xFFFFFFFF)
  1381. return true
  1382. }
  1383. setrestart()
  1384. {
  1385. VarSetCapacity(old, 4, 0)
  1386. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
  1387. if(ErrorLevel || dwAddress==0) {
  1388. ErrorLevel := ERROR_READ_MEMORY
  1389. return 0
  1390. }
  1391. NumPut(9,old,0,"Int")
  1392. writeRaw(hGTA, dwAddress + 957, &old, 4)
  1393. }
  1394. API_ERROR_NONE := 0
  1395. API_ERROR_SNAPSHOT_FAILED := 1
  1396. API_ERROR_SAMP_NOT_FOUND := 2
  1397. API_ERROR_REMOTE_MEMORY_ALLOCATION_FAILED := 3
  1398. API_ERROR_WRITEPROCESSMEMORY_FAILED := 4
  1399. API_ERROR_GETPROCADDRESS_FAILED := 5
  1400. API_ERROR_REMOTETHREAD_FAILED := 6
  1401. API_ERROR_INVALID_GTA_HANDLE := 7
  1402. API_ERROR_PIPE_DOESNT_RESPOND := 8
  1403. API_ERROR_STRING_TOO_LONG := 9
  1404. PLAYER_STATE_LEAVING_VEHICLE := 0
  1405. PLAYER_STATE_NORMAL := 1
  1406. PLAYER_STATE_DRIVING := 50
  1407. PLAYER_STATE_DYING := 54
  1408. PLAYER_STATE_DEAD := 55
  1409. CALLBACK_HEAL := 0
  1410. CALLBACK_ARMOR := 1
  1411. CALLBACK_POSITION := 2
  1412. CALLBACK_ENTEREXIT := 3
  1413. CALLBACK_VEHICLE_ENTEREXIT := 4
  1414. CALLBACK_VEHICLE_HEALTH := 5
  1415. CALLBACK_VEHICLE_ENGINE := 6
  1416. CALLBACK_VEHICLE_LOCK := 7
  1417. CALLBACK_VEHICLE_SPEED := 8
  1418. CALLBACK_WEAPON_CLIP := 9
  1419. CALLBACK_WEAPON_TOTALCLIP := 10
  1420. CALLBACK_WEAPON_SWITCH := 11
  1421. CALLBACK_CHATLOG := 12
  1422. PATH_API := RelToAbs(A_ScriptDir, "API.dll")
  1423. hModule := DllCall("LoadLibrary", Str, PATH_API)
  1424. if(hModule == -1 || hModule == 0)
  1425. {
  1426. MsgBox, 48, API - Fehler, Die API.dll konnte nicht gefunden werden.`nDer Keybinder wird nun beendet.
  1427. ExitApp
  1428. }
  1429. ReadMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ReadMemory")
  1430. WriteMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WriteMemory")
  1431. GetBasePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetBasePointer")
  1432. GetCommandLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCommandLine")
  1433. GetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastError")
  1434. SetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetLastError")
  1435. SendChat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SendChat")
  1436. ShowGameText_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowGameText")
  1437. AddChatMessage_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_AddChatMessage")
  1438. ShowDialog_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowDialog")
  1439. IsDialogOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsDialogOpen")
  1440. GetLastDialogId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogId")
  1441. GetLastDialogType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogType")
  1442. BlockChatInput_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_BlockChatInput")
  1443. GetChatLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLine")
  1444. GetChatLineFromFile_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLineFromFile")
  1445. IsChatOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsChatOpen")
  1446. GetScreenSizeX_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeX")
  1447. GetScreenSizeY_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeY")
  1448. GetCurrentWeatherId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCurrentWeatherId")
  1449. GetZoneName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneName")
  1450. GetCityName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityName")
  1451. GetZoneNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneNameByCoords")
  1452. GetCityNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityNameByCoords")
  1453. GetMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMarkerPos")
  1454. GetLastMousePosOnMenuMap_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastMousePosOnMenuMap")
  1455. GetMapMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMapMarkerPos")
  1456. FindGroundZForPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_FindGroundZForPosition")
  1457. WorldToScreen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WorldToScreen")
  1458. ScreenToWorld_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ScreenToWorld")
  1459. RegisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_RegisterTextBind")
  1460. UnregisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterTextBind")
  1461. UnregisterAllTextBinds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterAllTextBinds")
  1462. TextBindTimer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_TextBindTimer")
  1463. IsMenuOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsMenuOpen")
  1464. GetPlayerId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerId")
  1465. GetPlayerName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerName")
  1466. GetServerIp_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerIp")
  1467. GetServerPort_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerPort")
  1468. GetPlayerCPed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerCPed")
  1469. GetPlayerHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerHealth")
  1470. GetPlayerArmor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerArmor")
  1471. GetPlayerMoney_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerMoney")
  1472. GetPlayerWanteds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWanteds")
  1473. GetPlayerPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerPosition")
  1474. IsPlayerInRangeOfPoint_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint")
  1475. IsPlayerInRangeOfPoint2D_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint2D")
  1476. IsPlayerInAnyInterior_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyInterior")
  1477. IsPlayerFrozen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerFrozen")
  1478. GetPlayerWeaponSlot_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponSlot")
  1479. GetPlayerWeaponId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponId")
  1480. GetPlayerWeaponName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponName")
  1481. GetPlayerWeaponClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponClip")
  1482. GetPlayerWeaponTotalClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponTotalClip")
  1483. GetPlayerWeaponState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponState")
  1484. GetPlayerState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerState")
  1485. GetVehiclePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehiclePointer")
  1486. GetVehicleModelId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelId")
  1487. GetVehicleModelName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelName")
  1488. GetVehicleModelNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelNameById")
  1489. GetVehicleType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleType")
  1490. GetVehicleHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleHealth")
  1491. GetVehicleRadioStation_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStation")
  1492. GetVehicleRadioStationName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStationName")
  1493. GetVehicleFreeSeats_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFreeSeats")
  1494. GetVehicleSpeed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSpeed")
  1495. GetVehicleFirstColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFirstColor")
  1496. GetVehicleSecondColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSecondColor")
  1497. GetVehicleColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColor")
  1498. GetVehicleColorRGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorRGB")
  1499. GetVehicleColorARGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorARGB")
  1500. IsPlayerInAnyVehicle_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyVehicle")
  1501. IsPlayerDriver_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerDriver")
  1502. IsPlayerPassenger_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerPassenger")
  1503. IsVehicleSeatUsed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSeatUsed")
  1504. IsVehicleLocked_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLocked")
  1505. IsVehicleSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSirenEnabled")
  1506. IsVehicleHornEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleHornEnabled")
  1507. IsVehicleAlternateSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleAlternateSirenEnabled")
  1508. IsVehicleEngineEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleEngineEnabled")
  1509. IsVehicleLightEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLightEnabled")
  1510. IsPlayerInCar_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInCar")
  1511. IsPlayerInPlane_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInPlane")
  1512. IsPlayerInBoat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBoat")
  1513. IsPlayerInTrain_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInTrain")
  1514. IsPlayerInBike_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBike")
  1515. SetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetCallbackPointer")
  1516. UnSetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetCallbackPointer")
  1517. SetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetListenCallback")
  1518. UnSetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallback")
  1519. UnSetListenCallbackAll_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallbackAll")
  1520. UpdateServerData_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UpdateServerData")
  1521. GetPlayerNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerNameById")
  1522. GetPlayerIdByName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerIdByName")
  1523. ReadMemory(addr, size, ByRef data)
  1524. {
  1525. global ReadMemory_func
  1526. VarSetCapacity(data,size)
  1527. res := DllCall(ReadMemory_func, UInt, addr, UInt, size, StrP, data)
  1528. return res
  1529. }
  1530. WriteMemory(addr, size, data)
  1531. {
  1532. global WriteMemory_func
  1533. res := DllCall(WriteMemory_func, UInt, addr, UInt, size, Str, data)
  1534. return res
  1535. }
  1536. GetBasePointer(dll)
  1537. {
  1538. global GetBasePointer_func
  1539. res :=DllCall(GetBasePointer_func, Str, dll)
  1540. return res
  1541. }
  1542. GetCommandLine(ByRef line)
  1543. {
  1544. global GetCommandLine_func
  1545. VarSetCapacity(line,512,0)
  1546. res := DllCall(GetCommandLine_func, StrP, line)
  1547. return res
  1548. }
  1549. GetLastError()
  1550. {
  1551. global GetLastError_func
  1552. res:=DllCall(GetLastError_func)
  1553. return res
  1554. }
  1555. SetLastError(error)
  1556. {
  1557. global SetLastError_func
  1558. res := DllCall(SetLastError_func, Int, error)
  1559. return res
  1560. }
  1561. SendChat(msg)
  1562. {
  1563. global SendChat_func
  1564. res := DllCall(SendChat_func, Str, msg)
  1565. return res
  1566. }
  1567. ShowGameText(str_Text, int_Time, int_Style)
  1568. {
  1569. global ShowGameText_func
  1570. res := DllCall(ShowGameText_func,Str , str_Text, Int, int_Time, Int, int_Style)
  1571. return res
  1572. }
  1573. AddChatMessage(int_Color, str_Text)
  1574. {
  1575. global AddChatMessage_func
  1576. res := DllCall(AddChatMessage_func, Int, int_Color, Str, str_Text)
  1577. return res
  1578. }
  1579. ShowDialog(style, caption, text, button)
  1580. {
  1581. global ShowDialog_func
  1582. res := DllCall(ShowDialog_func, Int, style, Str, caption, Str, text, Str, button)
  1583. return res
  1584. }
  1585. IsDialogOpen()
  1586. {
  1587. global IsDialogOpen_func
  1588. res := DllCall(IsDialogOpen_func)
  1589. return res
  1590. }
  1591. GetLastDialogId()
  1592. {
  1593. global GetLastDialogId_func
  1594. res := DllCall(GetLastDialogId_func)
  1595. return res
  1596. }
  1597. GetLastDialogType()
  1598. {
  1599. global GetLastDialogType_func
  1600. res := DllCall(GetLastDialogType_func)
  1601. return res
  1602. }
  1603. BlockChatInput(block)
  1604. {
  1605. global BlockChatInput_func
  1606. res := DllCall(BlockChatInput_func,UChar,block)
  1607. return res
  1608. }
  1609. GetChatLine(Line, ByRef Output, timestamp=0, color=0){
  1610. chatindex := 0
  1611. FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  1612. loop, Parse, file, `n, `r
  1613. {
  1614. if(A_LoopField)
  1615. chatindex := A_Index
  1616. }
  1617. loop, Parse, file, `n, `r
  1618. {
  1619. if(A_Index = chatindex - line){
  1620. output := A_LoopField
  1621. break
  1622. }
  1623. }
  1624. file := ""
  1625. if(!timestamp)
  1626. output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
  1627. if(!color)
  1628. output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
  1629. return
  1630. }
  1631. GetChatLineFromFile(id, ByRef line)
  1632. {
  1633. global GetChatLineFromFile_func
  1634. VarSetCapacity(line,256,0)
  1635. res := DllCall(GetChatLineFromFile_func,Int,id,StrP,line)
  1636. return res
  1637. }
  1638. IsChatOpen()
  1639. {
  1640. global IsChatOpen_func
  1641. res := DllCall(IsChatOpen_func)
  1642. return res
  1643. }
  1644. GetScreenSizeX()
  1645. {
  1646. global GetScreenSizeX_func
  1647. res := DllCall(GetScreenSizeX_func)
  1648. return res
  1649. }
  1650. GetScreenSizeY()
  1651. {
  1652. global GetScreenSizeY_func
  1653. res := DllCall(GetScreenSizeY_func)
  1654. return res
  1655. }
  1656. GetCurrentWeatherId()
  1657. {
  1658. global GetCurrentWeatherId_func
  1659. res := DllCall(GetCurrentWeatherId_func)
  1660. return res
  1661. }
  1662. GetZoneName( ByRef str_ZoneName)
  1663. {
  1664. global GetZoneName_func
  1665. VarSetCapacity(str_ZoneName, 32)
  1666. res := DllCall(GetZoneName_func, StrP, str_ZoneName)
  1667. return res
  1668. }
  1669. GetCityName( ByRef str_CityName)
  1670. {
  1671. global GetCityName_func
  1672. VarSetCapacity(str_CityName, 32)
  1673. res := DllCall(GetCityName_func, StrP, str_CityName)
  1674. return res
  1675. }
  1676. GetZoneNameByCoords(x, y, ByRef str_ZoneName)
  1677. {
  1678. global GetZoneNameByCoords_func
  1679. VarSetCapacity(str_ZoneName, 32)
  1680. res := DllCall(GetZoneNameByCoords_func, Float, x, Float, y, StrP, str_ZoneName)
  1681. return res
  1682. }
  1683. GetCityNameByCoords(x, y, ByRef str_CityName)
  1684. {
  1685. global GetCityNameByCoords_func
  1686. VarSetCapacity(str_CityName, 32)
  1687. res := DllCall(GetCityNameByCoords_func, Float, x, Float, y, StrP, str_CityName)
  1688. return res
  1689. }
  1690. GetMarkerPos(ByRef x, ByRef y, ByRef z)
  1691. {
  1692. global GetMarkerPos_func
  1693. res := DllCall(GetMarkerPos_func, FloatP, x, FloatP, y, FloatP, z)
  1694. return res
  1695. }
  1696. GetLastMousePosOnMenuMap(ByRef x, ByRef y)
  1697. {
  1698. global GetLastMousePosOnMenuMap_func
  1699. res := DllCall(GetLastMousePosOnMenuMap_func, FloatP, x, FloatP, y)
  1700. return res
  1701. }
  1702. GetMapMarkerPos(ByRef x, ByRef y)
  1703. {
  1704. global GetMapMarkerPos_func
  1705. res := DllCall(GetMapMarkerPos_func, FloatP, x, FloatP, y)
  1706. return res
  1707. }
  1708. FindGroundZForPosition(x,y)
  1709. {
  1710. global FindGroundZForPosition_func
  1711. res := DllCall(FindGroundZForPosition_func, Float, x, Float, y, "Cdecl float")
  1712. return res
  1713. }
  1714. WorldToScreen(worldX, worldY, worldZ, ByRef screenX, ByRef screenY)
  1715. {
  1716. global WorldToScreen_func
  1717. res := DllCall(WorldToScreen_func, Float, worldX, Float, worldY, Float, worldZ, FloatP, screenX, FloatP, screenY)
  1718. return res
  1719. }
  1720. ScreenToWorld(screenX, screenY, ByRef worldX, ByRef worldY, ByRef worldZ)
  1721. {
  1722. global ScreenToWorld_func
  1723. res := DllCall(ScreenToWorld_func, Float, screenX, Float, screenY, FloatP, worldX, FloatP, worldY, FloatP, worldZ)
  1724. return res
  1725. }
  1726. RegisterTextBind(str_TextBind, float_PosX, float_PosY, float_PosZ, float_Radius, int_Delay, int_Loop, int_GroupId, int_isChild, int_Timeout)
  1727. {
  1728. global RegisterTextBind_func
  1729. 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)
  1730. return res
  1731. }
  1732. UnregisterTextBind(int_TextBindId)
  1733. {
  1734. global UnregisterTextBind_func
  1735. res := DllCall(UnregisterTextBind_func, Int, int_TextBindId)
  1736. return res
  1737. }
  1738. UnregisterAllTextBinds()
  1739. {
  1740. global UnregisterAllTextBinds_func
  1741. res := DllCall(UnregisterAllTextBinds_func)
  1742. return res
  1743. }
  1744. TextBindTimer(int_TextBindSleep)
  1745. {
  1746. global TextBindTimer_func
  1747. res := DllCall(TextBindTimer_func, Int, int_TextBindSleep)
  1748. return res
  1749. }
  1750. IsMenuOpen()
  1751. {
  1752. global IsMenuOpen_func
  1753. res := DllCall(IsMenuOpen_func)
  1754. return res
  1755. }
  1756. GetPlayerId()
  1757. {
  1758. global GetPlayerId_func
  1759. res := DllCall(GetPlayerId_func)
  1760. return res
  1761. }
  1762. GetPlayerName(ByRef szName)
  1763. {
  1764. global GetPlayerName_func
  1765. VarSetCapacity(szName,25)
  1766. res := DllCall(GetPlayerName_func, StrP, szName)
  1767. return res
  1768. }
  1769. GetServerIp(ByRef szHost)
  1770. {
  1771. global GetServerIp_func
  1772. VarSetCapacity(szHost, 30)
  1773. res := DllCall(GetServerIp_func, StrP, szHost)
  1774. return res
  1775. }
  1776. GetServerPort()
  1777. {
  1778. global GetServerPort_func
  1779. res := DllCall(GetServerPort_func)
  1780. return res
  1781. }
  1782. getDialogContent() {
  1783. if(!checkHandles())
  1784. return 0
  1785.  
  1786. dwAddress := readDWORD(hGTA, dwSAMP + SAMP_DIALOG_PTR)
  1787. dwAddress := readDWORD(hGTA, dwAddress + SAMP_DIALOG_OFFSET)
  1788. sContent := readString(hGTA, dwAddress, SAMP_DIALOG_SIZE)
  1789.  
  1790. return sContent
  1791. }
  1792. GetPlayerCPed()
  1793. {
  1794. global GetPlayerCPed_func
  1795. res :=DllCall(GetPlayerCPed_func)
  1796. return res
  1797. }
  1798. GetPlayerHealth()
  1799. {
  1800. global GetPlayerHealth_func
  1801. res := DllCall(GetPlayerHealth_func)
  1802. return res
  1803. }
  1804. GetPlayerArmor()
  1805. {
  1806. global GetPlayerArmor_func
  1807. res := DllCall(GetPlayerArmor_func)
  1808. return res
  1809. }
  1810. GetPlayerMoney()
  1811. {
  1812. global GetPlayerMoney_func
  1813. res := DllCall(GetPlayerMoney_func)
  1814. return res
  1815. }
  1816. GetPlayerWanteds()
  1817. {
  1818. global GetPlayerWanteds_func
  1819. res := DllCall(GetPlayerWanteds_func)
  1820. return res
  1821. }
  1822. GetPlayerPosition(ByRef flo_posX, ByRef flo_posY, ByRef flo_posZ, ByRef flo_Rotation)
  1823. {
  1824. global GetPlayerPosition_func
  1825. res := DllCall(GetPlayerPosition_func, FloatP, flo_posX, FloatP, flo_posY, FloatP, flo_posZ, FloatP, flo_Rotation)
  1826. return res
  1827. }
  1828. IsPlayerInRangeOfPoint(flo_posX, flo_posY, flo_posZ, flo_posRadius)
  1829. {
  1830. global IsPlayerInRangeOfPoint_func
  1831. res := DllCall(IsPlayerInRangeOfPoint_func, Float, flo_posX, Float, flo_posY, Float, flo_posZ, Float, flo_posRadius)
  1832. return res
  1833. }
  1834. IsPlayerInRangeOfPoint2D(flo_posX, flo_posY, flo_posRadius)
  1835. {
  1836. global IsPlayerInRangeOfPoint2D_func
  1837. res := DllCall(IsPlayerInRangeOfPoint2D_func, Float, flo_posX, Float, flo_posY, Float, flo_posRadius)
  1838. return res
  1839. }
  1840. IsPlayerInAnyInterior()
  1841. {
  1842. global IsPlayerInAnyInterior_func
  1843. res := DllCall(IsPlayerInAnyInterior_func)
  1844. return res
  1845. }
  1846. IsPlayerFrozen()
  1847. {
  1848. global IsPlayerFrozen_func
  1849. res := DllCall(IsPlayerFrozen_func)
  1850. return res
  1851. }
  1852. GetPlayerWeaponSlot()
  1853. {
  1854. global GetPlayerWeaponSlot_func
  1855. res := DllCall(GetPlayerWeaponSlot_func)
  1856. return res
  1857. }
  1858. GetPlayerWeaponId(int_WeaponSlot)
  1859. {
  1860. global GetPlayerWeaponId_func
  1861. res := DllCall(GetPlayerWeaponId_func, Int, int_WeaponSlot)
  1862. return res
  1863. }
  1864. GetPlayerWeaponName(int_WeaponSlot, ByRef str_WeapName)
  1865. {
  1866. global GetPlayerWeaponName_func
  1867. VarSetCapacity(str_WeapName, 32)
  1868. res := DllCall(GetPlayerWeaponName_func, Int, int_WeaponSlot, StrP, str_WeapName)
  1869. return res
  1870. }
  1871. GetPlayerWeaponClip(int_WeaponSlot)
  1872. {
  1873. global GetPlayerWeaponClip_func
  1874. res := DllCall(GetPlayerWeaponClip_func, Int, int_WeaponSlot)
  1875. return res
  1876. }
  1877. GetPlayerWeaponTotalClip(int_WeaponSlot)
  1878. {
  1879. global GetPlayerWeaponTotalClip_func
  1880. res := DllCall(GetPlayerWeaponTotalClip_func, Int, int_WeaponSlot)
  1881. return res
  1882. }
  1883. GetPlayerWeaponState()
  1884. {
  1885. global GetPlayerWeaponState_func
  1886. res := DllCall(GetPlayerWeaponState_func)
  1887. return res
  1888. }
  1889. GetPlayerState()
  1890. {
  1891. global GetPlayerState_func
  1892. res := DllCall(GetPlayerState_func)
  1893. return res
  1894. }
  1895. GetVehiclePointer()
  1896. {
  1897. global GetVehiclePointer_func
  1898. res := DllCall(GetVehiclePointer_func)
  1899. return res
  1900. }
  1901. GetVehicleModelId()
  1902. {
  1903. global GetVehicleModelId_func
  1904. res := DllCall(GetVehicleModelId_func)
  1905. return res
  1906. }
  1907. GetVehicleModelName(ByRef str_VehicleName)
  1908. {
  1909. global GetVehicleModelName_func
  1910. VarSetCapacity(str_VehicleName, 32)
  1911. res := DllCall(GetVehicleModelName_func, StrP, str_VehicleName)
  1912. return res
  1913. }
  1914. GetVehicleModelNameById(int_VehicleId, ByRef str_VehicleName)
  1915. {
  1916. global GetVehicleModelNameById_func
  1917. VarSetCapacity(str_VehicleName, 32)
  1918. res := DllCall(GetVehicleModelNameById_func, Int, int_VehicleId, StrP, str_VehicleName)
  1919. return res
  1920. }
  1921. GetVehicleType()
  1922. {
  1923. global GetVehicleType_func
  1924. res := DllCall(GetVehicleType_func)
  1925. return res
  1926. }
  1927. GetVehicleHealth()
  1928. {
  1929. global GetVehicleHealth_func
  1930. res := DllCall(GetVehicleHealth_func)
  1931. return res
  1932. }
  1933. GetVehicleRadioStation()
  1934. {
  1935. global GetVehicleRadioStation_func
  1936. res := DllCall(GetVehicleRadioStation_func)
  1937. return res
  1938. }
  1939. GetVehicleRadioStationName(ByRef str_RadioName)
  1940. {
  1941. global GetVehicleRadioStationName_func
  1942. VarSetCapacity(str_RadioName, 32)
  1943. res := DllCall(GetVehicleRadioStationName_func, StrP, str_RadioName)
  1944. return res
  1945. }
  1946. GetVehicleFreeSeats(ByRef int_SeatFL, ByRef int_SeatFR, ByRef int_SeatBL, ByRef int_SeatBR)
  1947. {
  1948. global GetVehicleFreeSeats_func
  1949. res := DllCall(GetVehicleFreeSeats_func, IntP, int_SeatFL, IntP, int_SeatFR, IntP, int_SeatBL, IntP, int_SeatBR)
  1950. return res
  1951. }
  1952. GetVehicleSpeed(float_SpeedMult)
  1953. {
  1954. global GetVehicleSpeed_func
  1955. res := DllCall(GetVehicleSpeed_func, Float, float_SpeedMult)
  1956. return res
  1957. }
  1958. GetVehicleFirstColor()
  1959. {
  1960. global GetVehicleFirstColor_func
  1961. res := DllCall(GetVehicleFirstColor_func)
  1962. return res
  1963. }
  1964. GetVehicleSecondColor()
  1965. {
  1966. global GetVehicleSecondColor_func
  1967. res := DllCall(GetVehicleSecondColor_func)
  1968. return res
  1969. }
  1970. GetVehicleColor(ByRef int_ColorFirst, ByRef int_ColorSecond)
  1971. {
  1972. global GetVehicleColor_func
  1973. res := DllCall(GetVehicleColor_func, IntP, int_ColorFirst, IntP, int_ColorSecond)
  1974. return res
  1975. }
  1976. GetVehicleColorRGB(int_Color, ByRef uint_ColorRGB)
  1977. {
  1978. global GetVehicleColorRGB_func
  1979. res := DllCall(GetVehicleColorRGB_func, Int, int_Color, UIntP, uint_ColorRGB)
  1980. return res
  1981. }
  1982. GetVehicleColorARGB(int_Color, ByRef uint_ColorARGB)
  1983. {
  1984. global GetVehicleColorARGB_func
  1985. res := DllCall(GetVehicleColorARGB_func, Int, int_Color, UIntP, uint_ColorARGB)
  1986. return res
  1987. }
  1988. IsPlayerInAnyVehicle()
  1989. {
  1990. global IsPlayerInAnyVehicle_func
  1991. res := DllCall(IsPlayerInAnyVehicle_func)
  1992. return res
  1993. }
  1994. IsPlayerDriver()
  1995. {
  1996. global IsPlayerDriver_func
  1997. res := DllCall(IsPlayerDriver_func)
  1998. return res
  1999. }
  2000. IsPlayerPassenger()
  2001. {
  2002. global IsPlayerPassenger_func
  2003. res := DllCall(IsPlayerPassenger_func)
  2004. return res
  2005. }
  2006. IsVehicleSeatUsed(int_SeatId)
  2007. {
  2008. global IsVehicleSeatUsed_func
  2009. res := DllCall(IsVehicleSeatUsed_func, int, int_SeatId)
  2010. return res
  2011. }
  2012. IsVehicleLocked()
  2013. {
  2014. global IsVehicleLocked_func
  2015. res := DllCall(IsVehicleLocked_func)
  2016. return res
  2017. }
  2018. IsVehicleSirenEnabled()
  2019. {
  2020. global IsVehicleSirenEnabled_func
  2021. res := DllCall(IsVehicleSirenEnabled_func)
  2022. return res
  2023. }
  2024. IsVehicleHornEnabled()
  2025. {
  2026. global IsVehicleHornEnabled_func
  2027. res := DllCall(IsVehicleHornEnabled_func)
  2028. return res
  2029. }
  2030. IsVehicleAlternateSirenEnabled()
  2031. {
  2032. global IsVehicleAlternateSirenEnabled_func
  2033. res := DllCall(IsVehicleAlternateSirenEnabled_func)
  2034. return res
  2035. }
  2036. IsVehicleEngineEnabled()
  2037. {
  2038. global IsVehicleEngineEnabled_func
  2039. res := DllCall(IsVehicleEngineEnabled_func)
  2040. return res
  2041. }
  2042. IsVehicleLightEnabled()
  2043. {
  2044. global IsVehicleLightEnabled_func
  2045. res := DllCall(IsVehicleLightEnabled_func)
  2046. return res
  2047. }
  2048. IsPlayerInCar()
  2049. {
  2050. global IsPlayerInCar_func
  2051. res := DllCall(IsPlayerInCar_func)
  2052. return res
  2053. }
  2054. IsPlayerInPlane()
  2055. {
  2056. global IsPlayerInPlane_func
  2057. res := DllCall(IsPlayerInPlane_func)
  2058. return res
  2059. }
  2060. IsPlayerInBoat()
  2061. {
  2062. global IsPlayerInBoat_func
  2063. res := DllCall(IsPlayerInBoat_func)
  2064. return res
  2065. }
  2066. IsPlayerInTrain()
  2067. {
  2068. global IsPlayerInTrain_func
  2069. res := DllCall(IsPlayerInTrain_func)
  2070. return res
  2071. }
  2072. IsPlayerInBike()
  2073. {
  2074. global IsPlayerInBike_func
  2075. res := DllCall(IsPlayerInBike_func)
  2076. return res
  2077. }
  2078. SetListenCallback(int_Id)
  2079. {
  2080. global SetListenCallback_func
  2081. res := DllCall(SetListenCallback_func, Int, int_Id)
  2082. return res
  2083. }
  2084. UnSetCallbackPointer()
  2085. {
  2086. global UnSetCallbackPointer_func
  2087. res := DllCall(UnSetCallbackPointer_func)
  2088. return res
  2089. }
  2090. SetCallbackPointer(int_Id)
  2091. {
  2092. global SetCallbackPointer_func
  2093. res := DllCall(SetCallbackPointer_func, Int, int_Id)
  2094. return res
  2095. }
  2096. UnSetListenCallback(int_Id)
  2097. {
  2098. global UnSetListenCallback_func
  2099. res := DllCall(UnSetListenCallback_func, Int, int_Id)
  2100. return res
  2101. }
  2102. UnSetListenCallbackAll()
  2103. {
  2104. global UnSetListenCallbackAll_func
  2105. res := DllCall(UnSetListenCallbackAll_func)
  2106. return res
  2107. }
  2108. GetCallbackHealParams(ptr_HealStruct, ByRef iOldHeal, ByRef iNewHeal)
  2109. {
  2110. ioldHeal := NumGet(ptr_HealStruct+0, "int")
  2111. inewHeal := NumGet(ptr_HealStruct+4, "int")
  2112. }
  2113. GetCallbackArmorParams(ptr_ArmorStruct, ByRef iOldArmor, ByRef iNewArmor)
  2114. {
  2115. ioldArmor := NumGet(ptr_ArmorStruct+0, "int")
  2116. inewArmor := NumGet(ptr_ArmorStruct+4, "int")
  2117. }
  2118. UrlDownloadToVar(URL, ByRef Result, UserAgent = "", Proxy = "", ProxyBypass = "")
  2119. {
  2120. hModule := DllCall("LoadLibrary", "Str", "wininet.dll")
  2121. AccessType := Proxy != "" ? 3 : 1
  2122. io := DllCall("wininet\InternetOpenA"
  2123. , "Str", UserAgent
  2124. , "UInt", AccessType
  2125. , "Str", Proxy
  2126. , "Str", ProxyBypass
  2127. , "UInt", 0)
  2128. iou := DllCall("wininet\InternetOpenUrlA"
  2129. , "UInt", io
  2130. , "Str", url
  2131. , "Str", ""
  2132. , "UInt", 0
  2133. , "UInt", 0x80000000
  2134. , "UInt", 0)
  2135. If (ErrorLevel != 0 or iou = 0) {
  2136. DllCall("FreeLibrary", "UInt", hModule)
  2137. return 0
  2138. }
  2139. VarSetCapacity(buffer, 10240, 0)
  2140. VarSetCapacity(BytesRead, 4, 0)
  2141. Loop
  2142. {
  2143. irf := DllCall("wininet\InternetReadFile", "UInt", iou, "UInt", &buffer, "UInt", 10240, "UInt", &BytesRead)
  2144. VarSetCapacity(buffer, -1)
  2145. BytesRead_ = 0
  2146. Loop, 4
  2147. BytesRead_ += *(&BytesRead + A_Index-1) << 8*(A_Index-1)
  2148. If (irf = 1 and BytesRead_ = 0)
  2149. break
  2150. Else
  2151. Result .= SubStr(buffer, 1, BytesRead_)
  2152. }
  2153. DllCall("wininet\InternetCloseHandle", "UInt", iou)
  2154. DllCall("wininet\InternetCloseHandle", "UInt", io)
  2155. DllCall("FreeLibrary", "UInt", hModule)
  2156. }
  2157. GetCallbackPositionParams(ptr_PositionStruct, ByRef fOldPosX, ByRef fOldPosY, ByRef fOldPosZ, ByRef fOldPosR, ByRef fNewPosX, ByRef fNewPosY, ByRef fNewPosZ, ByRef fNewPosR)
  2158. {
  2159. fOldPosX := NumGet(ptr_PositionStruct+0, "float")
  2160. fOldPosY := NumGet(ptr_PositionStruct+4, "float")
  2161. fOldPosZ := NumGet(ptr_PositionStruct+8, "float")
  2162. fOldPosR := NumGet(ptr_PositionStruct+12, "float")
  2163. fNewPosX := NumGet(ptr_PositionStruct+16, "float")
  2164. fNewPosY := NumGet(ptr_PositionStruct+20, "float")
  2165. fNewPosZ := NumGet(ptr_PositionStruct+24, "float")
  2166. fNewPosR := NumGet(ptr_PositionStruct+28, "float")
  2167. }
  2168. GetCallbackEnterExitParams(ptr_EnterExitStruct, ByRef iOldInteriorState, ByRef iNewInteriorState)
  2169. {
  2170. iOldInteriorState := NumGet(ptr_EnterExitStruct+0, "int")
  2171. iNewInteriorState := NumGet(ptr_EnterExitStruct+4, "int")
  2172. }
  2173. GetCallbackVehicleEnterExitParams(ptr_VehicleEnterExitStruct, ByRef iOldVehicleEnterExit, ByRef iNewVehicleEnterExit)
  2174. {
  2175. iOldVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+0, "int")
  2176. iNewVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+4, "int")
  2177. }
  2178. GetCallbackVehicleHealthParams(ptr_VehicleHealthStruct, ByRef iOldVehicleHealth, ByRef iNewVehicleHealth)
  2179. {
  2180. iOldVehicleHealth := NumGet(ptr_VehicleHealthStruct+0, "int")
  2181. iNewVehicleHealth := NumGet(ptr_VehicleHealthStruct+4, "int")
  2182. }
  2183. GetCallbackVehicleEngineParams(ptr_VehicleEngineStruct, ByRef iOldVehicleEngine, ByRef iNewVehicleEngine)
  2184. {
  2185. iOldVehicleEngine := NumGet(ptr_VehicleEngineStruct+0, "int")
  2186. iNewVehicleEngine := NumGet(ptr_VehicleEngineStruct+4, "int")
  2187. }
  2188. GetCallbackVehicleLockParams(ptr_VehicleLockStruct, ByRef iOldVehicleLock, ByRef iNewVehicleLock)
  2189. {
  2190. iOldVehicleLock := NumGet(ptr_VehicleLockStruct+0, "int")
  2191. iNewVehicleLock := NumGet(ptr_VehicleLockStruct+4, "int")
  2192. }
  2193. GetCallbackVehicleSpeedParams(ptr_VehicleSpeedStruct, ByRef iOldVehicleSpeed, ByRef iNewVehicleSpeed)
  2194. {
  2195. iOldVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+0, "int")
  2196. iNewVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+4, "int")
  2197. }
  2198. GetCallbackWeaponSwitchParams(ptr_WeaponSwitchStruct, ByRef iOldWeaponId, ByRef iNewWeaponId)
  2199. {
  2200. iOldWeaponId := NumGet(ptr_WeaponSwitchStruct+0, "int")
  2201. iNewWeaponId := NumGet(ptr_WeaponSwitchStruct+4, "int")
  2202. }
  2203. GetCallbackWeaponClipParams(ptr_WeaponClipStruct, ByRef iOldWeaponClip, ByRef iNewWeaponClip)
  2204. {
  2205. iOldWeaponClip := NumGet(ptr_WeaponClipStruct+0, "int")
  2206. iNewWeaponClip := NumGet(ptr_WeaponClipStruct+4, "int")
  2207. }
  2208. GetCallbackWeaponTotalClipParams(ptr_WeaponTotalClipStruct, ByRef iOldWeaponTotalClip, ByRef iNewWeaponTotalClip)
  2209. {
  2210. iOldWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+0, "int")
  2211. iNewWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+4, "int")
  2212. }
  2213. UpdateServerData()
  2214. {
  2215. global UpdateServerData_func
  2216. res := DllCall(UpdateServerData_func)
  2217. return res
  2218. }
  2219. GetPlayerNameById(id,ByRef name)
  2220. {
  2221. VarSetCapacity(name,24,0)
  2222. global GetPlayerNameById_func
  2223. res := DllCall(GetPlayerNameById_func,UShort,id,StrP,name)
  2224. return res
  2225. }
  2226. GetPlayerIdByName2(name)
  2227. {
  2228. global GetPlayerIdByName2_func
  2229. res := DllCall(GetPlayerIdByName2_func,Str,name)
  2230. return res
  2231. }
  2232. DecimalToHex(Var){
  2233. SetFormat, IntegerFast, hex
  2234. Dec2Hex += Var
  2235. Dec2Hex .= ""
  2236. SetFormat, IntegerFast, d
  2237. StringTrimLeft, Dec2Hex, Dec2Hex, 2
  2238. StringUpper, Dec2Hex, Dec2Hex
  2239. sDec2Hex .= Dec2Hex
  2240. return sDec2Hex
  2241. }
  2242. RelToAbs(root, dir, s = "\") {
  2243. pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
  2244. , root := SubStr(root, len + 1), sk := 0
  2245. If InStr(root, s, "", 0) = StrLen(root)
  2246. StringTrimRight, root, root, 1
  2247. If InStr(dir, s, "", 0) = StrLen(dir)
  2248. StringTrimRight, dir, dir, 1
  2249. Loop, Parse, dir, %s%
  2250. {
  2251. If A_LoopField = ..
  2252. StringLeft, root, root, InStr(root, s, "", 0) - 1
  2253. Else If A_LoopField =
  2254. root =
  2255. Else If A_LoopField != .
  2256. Continue
  2257. StringReplace, dir, dir, %A_LoopField%%s%
  2258. }
  2259. Return, pr . root . s . dir
  2260. }
  2261. PATH_OVERLAY := RelToAbs(A_ScriptDir, "dx9_overlay.dll")
  2262. h2Module := DllCall("LoadLibrary", Str, PATH_OVERLAY)
  2263. if(h2Module == -1 || h2Module == 0)
  2264. {
  2265. MsgBox, 48, Error, Die dx9_overlay.dll konnte nicht gefunden werden. `nDer Keybinder wird nun beendet.
  2266. ExitApp
  2267. }
  2268. Init_func := DllCall("GetProcAddress", UInt, h2Module, Str, "Init")
  2269. SetParam_func := DllCall("GetProcAddress", UInt, h2Module, Str, "SetParam")
  2270. TextCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextCreate")
  2271. TextDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextDestroy")
  2272. TextSetShadow_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShadow")
  2273. TextSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShown")
  2274. TextSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetColor")
  2275. TextSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetPos")
  2276. TextSetString_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetString")
  2277. TextUpdate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextUpdate")
  2278. BoxCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxCreate")
  2279. BoxDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxDestroy")
  2280. BoxSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetShown")
  2281. BoxSetBorder_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorder")
  2282. BoxSetBorderColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorderColor")
  2283. BoxSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetColor")
  2284. BoxSetHeight_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetHeight")
  2285. BoxSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetPos")
  2286. BoxSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetWidth")
  2287. LineCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineCreate")
  2288. LineDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineDestroy")
  2289. LineSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetShown")
  2290. LineSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetColor")
  2291. LineSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetWidth")
  2292. LineSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetPos")
  2293. ImageCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageCreate")
  2294. ImageDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageDestroy")
  2295. ImageSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetShown")
  2296. ImageSetAlign_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetAlign")
  2297. ImageSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetPos")
  2298. ImageSetRotation_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetRotation")
  2299. DestroyAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "DestroyAllVisual")
  2300. ShowAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ShowAllVisual")
  2301. HideAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "HideAllVisual")
  2302. GetFrameRate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetFrameRate")
  2303. GetScreenSpecs_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetScreenSpecs")
  2304. Init()
  2305. {
  2306. global Init_func
  2307. res := DllCall(Init_func)
  2308. return res
  2309. }
  2310. SetParam(str_Name, str_Value)
  2311. {
  2312. global SetParam_func
  2313. res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
  2314. return res
  2315. }
  2316. TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
  2317. {
  2318. global TextCreate_func
  2319. res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
  2320. return res
  2321. }
  2322. TextDestroy(id)
  2323. {
  2324. global TextDestroy_func
  2325. res := DllCall(TextDestroy_func,Int,id)
  2326. return res
  2327. }
  2328. TextSetShadow(id, shadow)
  2329. {
  2330. global TextSetShadow_func
  2331. res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
  2332. return res
  2333. }
  2334. TextSetShown(id, show)
  2335. {
  2336. global TextSetShown_func
  2337. res := DllCall(TextSetShown_func,Int,id,UChar,show)
  2338. return res
  2339. }
  2340. TextSetColor(id,color)
  2341. {
  2342. global TextSetColor_func
  2343. res := DllCall(TextSetColor_func,Int,id,UInt,color)
  2344. return res
  2345. }
  2346. TextSetPos(id,x,y)
  2347. {
  2348. global TextSetPos_func
  2349. res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
  2350. return res
  2351. }
  2352. TextSetString(id,Text)
  2353. {
  2354. global TextSetString_func
  2355. res := DllCall(TextSetString_func,Int,id,Str,Text)
  2356. return res
  2357. }
  2358. TextUpdate(id,Font,Fontsize,bold,italic)
  2359. {
  2360. global TextUpdate_func
  2361. res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
  2362. return res
  2363. }
  2364. BoxCreate(x,y,width,height,Color,show)
  2365. {
  2366. global BoxCreate_func
  2367. res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
  2368. return res
  2369. }
  2370. BoxDestroy(id)
  2371. {
  2372. global BoxDestroy_func
  2373. res := DllCall(BoxDestroy_func,Int,id)
  2374. return res
  2375. }
  2376. BoxSetShown(id,Show)
  2377. {
  2378. global BoxSetShown_func
  2379. res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
  2380. return res
  2381. }
  2382. BoxSetBorder(id,height,Show)
  2383. {
  2384. global BoxSetBorder_func
  2385. res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
  2386. return res
  2387. }
  2388. BoxSetBorderColor(id,Color)
  2389. {
  2390. global BoxSetBorderColor_func
  2391. res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
  2392. return res
  2393. }
  2394. BoxSetColor(id,Color)
  2395. {
  2396. global BoxSetColor_func
  2397. res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
  2398. return res
  2399. }
  2400. BoxSetHeight(id,height)
  2401. {
  2402. global BoxSetHeight_func
  2403. res := DllCall(BoxSetHeight_func,Int,id,Int,height)
  2404. return res
  2405. }
  2406. BoxSetPos(id,x,y)
  2407. {
  2408. global BoxSetPos_func
  2409. res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
  2410. return res
  2411. }
  2412. BoxSetWidth(id,width)
  2413. {
  2414. global BoxSetWidth_func
  2415. res := DllCall(BoxSetWidth_func,Int,id,Int,width)
  2416. return res
  2417. }
  2418. LineCreate(x1,y1,x2,y2,width,color,show)
  2419. {
  2420. global LineCreate_func
  2421. res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
  2422. return res
  2423. }
  2424. LineDestroy(id)
  2425. {
  2426. global LineDestroy_func
  2427. res := DllCall(LineDestroy_func,Int,id)
  2428. return res
  2429. }
  2430. LineSetShown(id,show)
  2431. {
  2432. global LineSetShown_func
  2433. res := DllCall(LineSetShown_func,Int,id,UChar,show)
  2434. return res
  2435. }
  2436. LineSetColor(id,color)
  2437. {
  2438. global LineSetColor_func
  2439. res := DllCall(LineSetColor_func,Int,id,UInt,color)
  2440. return res
  2441. }
  2442. LineSetWidth(id, width)
  2443. {
  2444. global LineSetWidth_func
  2445. res := DllCall(LineSetWidth_func,Int,id,Int,width)
  2446. return res
  2447. }
  2448. LineSetPos(id,x1,y1,x2,y2)
  2449. {
  2450. global LineSetPos_func
  2451. res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
  2452. return res
  2453. }
  2454. ImageCreate(path, x, y, rotation, align, show)
  2455. {
  2456. global ImageCreate_func
  2457. res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
  2458. return res
  2459. }
  2460. ImageDestroy(id)
  2461. {
  2462. global ImageDestroy_func
  2463. res := DllCall(ImageDestroy_func,Int,id)
  2464. return res
  2465. }
  2466. ImageSetShown(id,show)
  2467. {
  2468. global ImageSetShown_func
  2469. res := DllCall(ImageSetShown_func,Int,id,UChar,show)
  2470. return res
  2471. }
  2472. ImageSetAlign(id,align)
  2473. {
  2474. global ImageSetAlign_func
  2475. res := DllCall(ImageSetAlign_func,Int,id,Int,align)
  2476. return res
  2477. }
  2478. ImageSetPos(id, x, y)
  2479. {
  2480. global ImageSetPos_func
  2481. res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
  2482. return res
  2483. }
  2484. ImageSetRotation(id, rotation)
  2485. {
  2486. global ImageSetRotation_func
  2487. res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
  2488. return res
  2489. }
  2490. DestroyAllVisual()
  2491. {
  2492. global DestroyAllVisual_func
  2493. res := DllCall(DestroyAllVisual_func)
  2494. return res
  2495. }
  2496. ShowAllVisual()
  2497. {
  2498. global ShowAllVisual_func
  2499. res := DllCall(ShowAllVisual_func)
  2500. return res
  2501. }
  2502. HideAllVisual()
  2503. {
  2504. global HideAllVisual_func
  2505. res := DllCall(HideAllVisual_func )
  2506. return res
  2507. }
  2508. GetFrameRate()
  2509. {
  2510. global GetFrameRate_func
  2511. res := DllCall(GetFrameRate_func )
  2512. return res
  2513. }
  2514. GetScreenSpecs(ByRef width, ByRef height)
  2515. {
  2516. global GetScreenSpecs_func
  2517. res := DllCall(GetScreenSpecs_func, IntP, width, IntP, height)
  2518. return res
  2519. }
  2520. GetPlayerMarkerPosition(ByRef posX, ByRef posY, ByRef posZ)
  2521. {
  2522. exe := OpenMemoryfromTitle_("GTA:SA:MP")
  2523. posX := ReadMemory_(exe,0xC7DEC8,"Float")
  2524. posY := ReadMemory_(exe,0xC7DECC,"Float")
  2525. posZ := ReadMemory_(exe, 0xC7DED0,"Float")
  2526. CloseMemory_(exe)
  2527. }
  2528. OpenMemoryfromTitle_(title,right=0x1F0FFF)
  2529. {
  2530. WinGet,PID,PID,%title%
  2531. HWND := DllCall("OpenProcess","Uint",right,"int",0,"int",PID)
  2532. return HWND
  2533. }
  2534. IsPlayerInRangeOfPoint_fast(x, y, z, r)
  2535. {
  2536. static pos_x, pos_y, pos_z, lastcalled
  2537. if(lastcalled < A_TickCount - 150){
  2538. GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
  2539. lastcalled := A_TickCount
  2540. }
  2541. d := sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
  2542. if(d < r)
  2543. return 1
  2544. return 0
  2545. }
  2546. IsPlayerInRangeOfPoint2D_fast(x, y, r){
  2547. static pos_x, pos_y, lastcalled
  2548. if(lastcalled < A_TickCount - 150){
  2549. GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
  2550. lastcalled := A_TickCount
  2551. }
  2552. d := sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2)
  2553. if(d < r)
  2554. return 1
  2555. return 0
  2556. }
  2557. CloseMemory_(hwnd)
  2558. {
  2559. return DllCall("CloseHandle", "int", hwnd)
  2560. }
  2561. ReadMemory_(hwnd,address,datatype="int",length=4,offset=0)
  2562. {
  2563. VarSetCapacity(readvalue,length, 0)
  2564. DllCall("ReadProcessMemory","Uint",hwnd,"Uint",address+offset,"Str",readvalue,"Uint",length,"Uint *",0)
  2565. finalvalue := NumGet(readvalue,0,datatype)
  2566. return finalvalue
  2567. }
  2568. GetDistancebetween(x, y, z, pos_x, pos_y, pos_z)
  2569. {
  2570. return sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
  2571. }
  2572. SetParam("use_window", "1")
  2573. SetParam("window", "GTA:SA:MP")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement