Advertisement
Guest User

Untitled

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