Advertisement
Guest User

Untitled

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