Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Persistent
- #NoEnv
- #SingleInstance, force
- #IfWinActive, GTA:SA:MP
- SetTimer, Antispamschutz, 1000
- bin = %A_ScriptDir%\bin
- IfNotExist, %A_ScriptDir%\bin
- {
- FileCreateDir, %A_ScriptDir%\bin
- }
- IfNotExist, %A_ScriptDir%\bin\settings.png
- {
- URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/settings.png, %A_ScriptDir%\bin\settings.png
- }
- IfNotExist, %A_ScriptDir%\bin\hitman.png
- {
- URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/hitman.png, %A_ScriptDir%\bin\hitman.png
- }
- IfNotExist, %A_ScriptDir%\API.dll
- {
- URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/API.dll, %A_ScriptDir%\API.dll
- }
- IfNotExist, %A_ScriptDir%\dx9_overlay.dll
- {
- URLDownloadToFile, http://parker.square7.ch/Keybinder/FBI/overlay.dll, %A_ScriptDir%\dx9_overlay.dll
- }
- if(!A_IsAdmin)
- {
- MsgBox, 48, Fehler, Bitte starten Sie den Keybinder als Administrator.
- ExitApp
- }
- global ERROR_OK := 0
- global ERROR_PROCESS_NOT_FOUND := 1
- global ERROR_OPEN_PROCESS := 2
- global ERROR_INVALID_HANDLE := 3
- global ERROR_MODULE_NOT_FOUND := 4
- global ERROR_ENUM_PROCESS_MODULES := 5
- global ERROR_ZONE_NOT_FOUND := 6
- global ERROR_CITY_NOT_FOUND := 7
- global ERROR_READ_MEMORY := 8
- global ERROR_WRITE_MEMORY := 9
- global ERROR_ALLOC_MEMORY := 10
- global ERROR_FREE_MEMORY := 11
- global ERROR_WAIT_FOR_OBJECT := 12
- global ERROR_CREATE_THREAD := 13
- global ADDR_ZONECODE := 0xA49AD4
- global ADDR_POSITION_X := 0xB6F2E4
- global ADDR_POSITION_Y := 0xB6F2E8
- global ADDR_POSITION_Z := 0xB6F2EC
- global ADDR_CPED_PTR := 0xB6F5F0
- global ADDR_CPED_HPOFF := 0x540
- global ADDR_CPED_ARMOROFF := 0x548
- global ADDR_VEHICLE_PTR := 0xBA18FC
- global ADDR_VEHICLE_HPOFF := 0x4C0
- global ADDR_CPED_MONEY := 0x0B7CE54
- global ADDR_CPED_INTID := 0xA4ACE8
- global ADDR_VEHICLE_DOORSTATE := 0x4F8
- global ADDR_VEHICLE_ENGINESTATE := 0x428
- global ADDR_VEHICLE_LIGHTSTATE := 0x584
- global ADDR_VEHICLE_MODEL := 0x22
- global ADDR_VEHICLE_TYPE := 0x590
- global ADDR_VEHICLE_DRIVER := 0x460
- global ADDR_VEHICLE_CVEH := 0xB6F980
- global ADDR_VEHICLE_SPEED_X := 0x44
- global ADDR_VEHICLE_SPEED_Y := 0x48
- global ADDR_VEHICLE_SPEED_Z := 0x4C
- global oAirplaneModels := [417, 425, 447, 460, 469, 476, 487, 488, 497, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593]
- global oBikeModels := [481,509,510]
- 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"]
- global ADDR_SAMP_INCHAT_PTR := 0x21a10c
- global ADDR_SAMP_INCHAT_PTR_OFF := 0x55
- global ADDR_SAMP_USERNAME := 0x219A6F
- global ADDR_SAMP_CHATMSG_PTR := 0x21A0E4
- global ADDR_SAMP_SHOWDLG_PTR := 0x21A0B8
- global FUNC_SAMP_SENDCMD := 0x65c60
- global FUNC_SAMP_SENDSAY := 0x57f0
- global FUNC_SAMP_ADDTOCHATWND := 0x64520
- global FUNC_SAMP_SHOWGAMETEXT := 0x9C2C0
- global FUNC_SAMP_PLAYAUDIOSTR := 0x62dA0
- global FUNC_SAMP_STOPAUDIOSTR := 0x629A0
- global FUNC_SAMP_SHOWDIALOG := 0x6B9C0
- global FUNC_UPDATESCOREBOARD := 0x8A10
- global SAMP_INFO_OFFSET := 0x21A0F8
- global SAMP_PPOOLS_OFFSET := 0x3CD
- global SAMP_PPOOL_PLAYER_OFFSET := 0x18
- global SAMP_SLOCALPLAYERID_OFFSET := 0x4
- global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
- global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
- global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
- global SAMP_PREMOTEPLAYER_OFFSET := 0x2E
- global SAMP_ISTRLENNAME___OFFSET := 0x1C
- global SAMP_SZPLAYERNAME_OFFSET := 0xC
- global SAMP_PSZPLAYERNAME_OFFSET := 0xC
- global SAMP_ILOCALPLAYERPING_OFFSET := 0x26
- global SAMP_ILOCALPLAYERSCORE_OFFSET := 0x2A
- global SAMP_IPING_OFFSET := 0x28
- global SAMP_ISCORE_OFFSET := 0x24
- global SAMP_ISNPC_OFFSET := 0x4
- global SAMP_SZIP_OFFSET := 0x20
- global SAMP_SZHOSTNAME_OFFSET := 0x121
- global SAMP_PLAYER_MAX := 1004
- global SIZE_SAMP_CHATMSG := 0xFC
- global hGTA := 0x0
- global dwGTAPID := 0x0
- global dwSAMP := 0x0
- global pMemory := 0x0
- global pParam1 := 0x0
- global pParam2 := 0x0
- global pParam3 := 0x0
- global pParam4 := 0x0
- global pParam5 := 0x0
- global pInjectFunc := 0x0
- global nZone := 1
- global nCity := 1
- global bInitZaC := 0
- global iRefreshScoreboard := 0
- global oScoreboardData := ""
- global iRefreshHandles := 0
- global iUpdateTick := 2500
- isInChat() {
- if(!checkHandles())
- return -1
- dwPtr := dwSAMP + ADDR_SAMP_INCHAT_PTR
- dwAddress := readDWORD(hGTA, dwPtr) + ADDR_SAMP_INCHAT_PTR_OFF
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwInChat := readDWORD(hGTA, dwAddress)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- if(dwInChat > 0) {
- return true
- } else {
- return false
- }
- }
- getUsername() {
- if(!checkHandles())
- return ""
- dwAddress := dwSAMP + ADDR_SAMP_USERNAME
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- ErrorLevel := ERROR_OK
- return sUsername
- }
- getId() {
- s:=getUsername()
- return getPlayerIdByName(s)
- }
- IsPlayerInNoDM(x, y, z)
- {
- result := ""
- if(x<1561.5 && x>1387.8 && y<-1727.6 && y>-1870)
- {
- result := 1
- }
- else if(x>1688.8 && x<1820.8 && y<-1859.5 && y>-1961.2)
- {
- result := 1
- }
- return result
- }
- getCoordinates() {
- if(!checkHandles())
- return ""
- fX := readFloat(hGTA, ADDR_POSITION_X)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- fY := readFloat(hGTA, ADDR_POSITION_Y)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- fZ := readFloat(hGTA, ADDR_POSITION_Z)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return ""
- }
- ErrorLevel := ERROR_OK
- return [fX, fY, fZ]
- }
- GetPlayerPos(ByRef fX,ByRef fY,ByRef fZ) {
- if(!checkHandles())
- return 0
- fX := readFloat(hGTA, ADDR_POSITION_X)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- fY := readFloat(hGTA, ADDR_POSITION_Y)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- fZ := readFloat(hGTA, ADDR_POSITION_Z)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- }
- initZonesAndCities() {
- AddCity("Las Venturas", 685.0, 476.093, -500.0, 3000.0, 3000.0, 500.0)
- AddCity("San Fierro", -3000.0, -742.306, -500.0, -1270.53, 1530.24, 500.0)
- AddCity("San Fierro", -1270.53, -402.481, -500.0, -1038.45, 832.495, 500.0)
- AddCity("San Fierro", -1038.45, -145.539, -500.0, -897.546, 376.632, 500.0)
- AddCity("Los Santos", 480.0, -3000.0, -500.0, 3000.0, -850.0, 500.0)
- AddCity("Los Santos", 80.0, -2101.61, -500.0, 1075.0, -1239.61, 500.0)
- AddCity("Tierra Robada", -1213.91, 596.349, -242.99, -480.539, 1659.68, 900.0)
- AddCity("Red County", -1213.91, -768.027, -242.99, 2997.06, 596.349, 900.0)
- AddCity("Flint County", -1213.91, -2892.97, -242.99, 44.6147, -768.027, 900.0)
- AddCity("Whetstone", -2997.47, -2892.97, -242.99, -1213.91, -1115.58, 900.0)
- AddZone("Avispa Country Club", -2667.810, -302.135, -28.831, -2646.400, -262.320, 71.169)
- AddZone("Easter Bay Airport", -1315.420, -405.388, 15.406, -1264.400, -209.543, 25.406)
- AddZone("Avispa Country Club", -2550.040, -355.493, 0.000, -2470.040, -318.493, 39.700)
- AddZone("Easter Bay Airport", -1490.330, -209.543, 15.406, -1264.400, -148.388, 25.406)
- AddZone("Garcia", -2395.140, -222.589, -5.3, -2354.090, -204.792, 200.000)
- AddZone("Shady Cabin", -1632.830, -2263.440, -3.0, -1601.330, -2231.790, 200.000)
- AddZone("East Los Santos", 2381.680, -1494.030, -89.084, 2421.030, -1454.350, 110.916)
- AddZone("LVA Freight Depot", 1236.630, 1163.410, -89.084, 1277.050, 1203.280, 110.916)
- AddZone("Blackfield Intersection", 1277.050, 1044.690, -89.084, 1315.350, 1087.630, 110.916)
- AddZone("Avispa Country Club", -2470.040, -355.493, 0.000, -2270.040, -318.493, 46.100)
- AddZone("Temple", 1252.330, -926.999, -89.084, 1357.000, -910.170, 110.916)
- AddZone("Unity Station", 1692.620, -1971.800, -20.492, 1812.620, -1932.800, 79.508)
- AddZone("LVA Freight Depot", 1315.350, 1044.690, -89.084, 1375.600, 1087.630, 110.916)
- AddZone("Los Flores", 2581.730, -1454.350, -89.084, 2632.830, -1393.420, 110.916)
- AddZone("Starfish Casino", 2437.390, 1858.100, -39.084, 2495.090, 1970.850, 60.916)
- AddZone("Easter Bay Chemicals", -1132.820, -787.391, 0.000, -956.476, -768.027, 200.000)
- AddZone("Downtown Los Santos", 1370.850, -1170.870, -89.084, 1463.900, -1130.850, 110.916)
- AddZone("Esplanade East", -1620.300, 1176.520, -4.5, -1580.010, 1274.260, 200.000)
- AddZone("Market Station", 787.461, -1410.930, -34.126, 866.009, -1310.210, 65.874)
- AddZone("Linden Station", 2811.250, 1229.590, -39.594, 2861.250, 1407.590, 60.406)
- AddZone("Montgomery Intersection", 1582.440, 347.457, 0.000, 1664.620, 401.750, 200.000)
- AddZone("Frederick Bridge", 2759.250, 296.501, 0.000, 2774.250, 594.757, 200.000)
- AddZone("Yellow Bell Station", 1377.480, 2600.430, -21.926, 1492.450, 2687.360, 78.074)
- AddZone("Downtown Los Santos", 1507.510, -1385.210, 110.916, 1582.550, -1325.310, 335.916)
- AddZone("Jefferson", 2185.330, -1210.740, -89.084, 2281.450, -1154.590, 110.916)
- AddZone("Mulholland", 1318.130, -910.170, -89.084, 1357.000, -768.027, 110.916)
- AddZone("Avispa Country Club", -2361.510, -417.199, 0.000, -2270.040, -355.493, 200.000)
- AddZone("Jefferson", 1996.910, -1449.670, -89.084, 2056.860, -1350.720, 110.916)
- AddZone("Julius Thruway West", 1236.630, 2142.860, -89.084, 1297.470, 2243.230, 110.916)
- AddZone("Jefferson", 2124.660, -1494.030, -89.084, 2266.210, -1449.670, 110.916)
- AddZone("Julius Thruway North", 1848.400, 2478.490, -89.084, 1938.800, 2553.490, 110.916)
- AddZone("Rodeo", 422.680, -1570.200, -89.084, 466.223, -1406.050, 110.916)
- AddZone("Cranberry Station", -2007.830, 56.306, 0.000, -1922.000, 224.782, 100.000)
- AddZone("Downtown Los Santos", 1391.050, -1026.330, -89.084, 1463.900, -926.999, 110.916)
- AddZone("Redsands West", 1704.590, 2243.230, -89.084, 1777.390, 2342.830, 110.916)
- AddZone("Little Mexico", 1758.900, -1722.260, -89.084, 1812.620, -1577.590, 110.916)
- AddZone("Blackfield Intersection", 1375.600, 823.228, -89.084, 1457.390, 919.447, 110.916)
- AddZone("Los Santos International", 1974.630, -2394.330, -39.084, 2089.000, -2256.590, 60.916)
- AddZone("Beacon Hill", -399.633, -1075.520, -1.489, -319.033, -977.516, 198.511)
- AddZone("Rodeo", 334.503, -1501.950, -89.084, 422.680, -1406.050, 110.916)
- AddZone("Richman", 225.165, -1369.620, -89.084, 334.503, -1292.070, 110.916)
- AddZone("Downtown Los Santos", 1724.760, -1250.900, -89.084, 1812.620, -1150.870, 110.916)
- AddZone("The Strip", 2027.400, 1703.230, -89.084, 2137.400, 1783.230, 110.916)
- AddZone("Downtown Los Santos", 1378.330, -1130.850, -89.084, 1463.900, -1026.330, 110.916)
- AddZone("Blackfield Intersection", 1197.390, 1044.690, -89.084, 1277.050, 1163.390, 110.916)
- AddZone("Conference Center", 1073.220, -1842.270, -89.084, 1323.900, -1804.210, 110.916)
- AddZone("Montgomery", 1451.400, 347.457, -6.1, 1582.440, 420.802, 200.000)
- AddZone("Foster Valley", -2270.040, -430.276, -1.2, -2178.690, -324.114, 200.000)
- AddZone("Blackfield Chapel", 1325.600, 596.349, -89.084, 1375.600, 795.010, 110.916)
- AddZone("Los Santos International", 2051.630, -2597.260, -39.084, 2152.450, -2394.330, 60.916)
- AddZone("Mulholland", 1096.470, -910.170, -89.084, 1169.130, -768.027, 110.916)
- AddZone("Yellow Bell Gol Course", 1457.460, 2723.230, -89.084, 1534.560, 2863.230, 110.916)
- AddZone("The Strip", 2027.400, 1783.230, -89.084, 2162.390, 1863.230, 110.916)
- AddZone("Jefferson", 2056.860, -1210.740, -89.084, 2185.330, -1126.320, 110.916)
- AddZone("Mulholland", 952.604, -937.184, -89.084, 1096.470, -860.619, 110.916)
- AddZone("Aldea Malvada", -1372.140, 2498.520, 0.000, -1277.590, 2615.350, 200.000)
- AddZone("Las Colinas", 2126.860, -1126.320, -89.084, 2185.330, -934.489, 110.916)
- AddZone("Las Colinas", 1994.330, -1100.820, -89.084, 2056.860, -920.815, 110.916)
- AddZone("Richman", 647.557, -954.662, -89.084, 768.694, -860.619, 110.916)
- AddZone("LVA Freight Depot", 1277.050, 1087.630, -89.084, 1375.600, 1203.280, 110.916)
- AddZone("Julius Thruway North", 1377.390, 2433.230, -89.084, 1534.560, 2507.230, 110.916)
- AddZone("Willowfield", 2201.820, -2095.000, -89.084, 2324.000, -1989.900, 110.916)
- AddZone("Julius Thruway North", 1704.590, 2342.830, -89.084, 1848.400, 2433.230, 110.916)
- AddZone("Temple", 1252.330, -1130.850, -89.084, 1378.330, -1026.330, 110.916)
- AddZone("Little Mexico", 1701.900, -1842.270, -89.084, 1812.620, -1722.260, 110.916)
- AddZone("Queens", -2411.220, 373.539, 0.000, -2253.540, 458.411, 200.000)
- AddZone("Las Venturas Airport", 1515.810, 1586.400, -12.500, 1729.950, 1714.560, 87.500)
- AddZone("Richman", 225.165, -1292.070, -89.084, 466.223, -1235.070, 110.916)
- AddZone("Temple", 1252.330, -1026.330, -89.084, 1391.050, -926.999, 110.916)
- AddZone("East Los Santos", 2266.260, -1494.030, -89.084, 2381.680, -1372.040, 110.916)
- AddZone("Julius Thruway East", 2623.180, 943.235, -89.084, 2749.900, 1055.960, 110.916)
- AddZone("Willowfield", 2541.700, -1941.400, -89.084, 2703.580, -1852.870, 110.916)
- AddZone("Las Colinas", 2056.860, -1126.320, -89.084, 2126.860, -920.815, 110.916)
- AddZone("Julius Thruway East", 2625.160, 2202.760, -89.084, 2685.160, 2442.550, 110.916)
- AddZone("Rodeo", 225.165, -1501.950, -89.084, 334.503, -1369.620, 110.916)
- AddZone("Las Brujas", -365.167, 2123.010, -3.0, -208.570, 2217.680, 200.000)
- AddZone("Julius Thruway East", 2536.430, 2442.550, -89.084, 2685.160, 2542.550, 110.916)
- AddZone("Rodeo", 334.503, -1406.050, -89.084, 466.223, -1292.070, 110.916)
- AddZone("Vinewood", 647.557, -1227.280, -89.084, 787.461, -1118.280, 110.916)
- AddZone("Rodeo", 422.680, -1684.650, -89.084, 558.099, -1570.200, 110.916)
- AddZone("Julius Thruway North", 2498.210, 2542.550, -89.084, 2685.160, 2626.550, 110.916)
- AddZone("Downtown Los Santos", 1724.760, -1430.870, -89.084, 1812.620, -1250.900, 110.916)
- AddZone("Rodeo", 225.165, -1684.650, -89.084, 312.803, -1501.950, 110.916)
- AddZone("Jefferson", 2056.860, -1449.670, -89.084, 2266.210, -1372.040, 110.916)
- AddZone("Hampton Barns", 603.035, 264.312, 0.000, 761.994, 366.572, 200.000)
- AddZone("Temple", 1096.470, -1130.840, -89.084, 1252.330, -1026.330, 110.916)
- AddZone("Kincaid Bridge", -1087.930, 855.370, -89.084, -961.950, 986.281, 110.916)
- AddZone("Verona Beach", 1046.150, -1722.260, -89.084, 1161.520, -1577.590, 110.916)
- AddZone("Commerce", 1323.900, -1722.260, -89.084, 1440.900, -1577.590, 110.916)
- AddZone("Mulholland", 1357.000, -926.999, -89.084, 1463.900, -768.027, 110.916)
- AddZone("Rodeo", 466.223, -1570.200, -89.084, 558.099, -1385.070, 110.916)
- AddZone("Mulholland", 911.802, -860.619, -89.084, 1096.470, -768.027, 110.916)
- AddZone("Mulholland", 768.694, -954.662, -89.084, 952.604, -860.619, 110.916)
- AddZone("Julius Thruway South", 2377.390, 788.894, -89.084, 2537.390, 897.901, 110.916)
- AddZone("Idlewood", 1812.620, -1852.870, -89.084, 1971.660, -1742.310, 110.916)
- AddZone("Ocean Docks", 2089.000, -2394.330, -89.084, 2201.820, -2235.840, 110.916)
- AddZone("Commerce", 1370.850, -1577.590, -89.084, 1463.900, -1384.950, 110.916)
- AddZone("Julius Thruway North", 2121.400, 2508.230, -89.084, 2237.400, 2663.170, 110.916)
- AddZone("Temple", 1096.470, -1026.330, -89.084, 1252.330, -910.170, 110.916)
- AddZone("Glen Park", 1812.620, -1449.670, -89.084, 1996.910, -1350.720, 110.916)
- AddZone("Easter Bay Airport", -1242.980, -50.096, 0.000, -1213.910, 578.396, 200.000)
- AddZone("Martin Bridge", -222.179, 293.324, 0.000, -122.126, 476.465, 200.000)
- AddZone("The Strip", 2106.700, 1863.230, -89.084, 2162.390, 2202.760, 110.916)
- AddZone("Willowfield", 2541.700, -2059.230, -89.084, 2703.580, -1941.400, 110.916)
- AddZone("Marina", 807.922, -1577.590, -89.084, 926.922, -1416.250, 110.916)
- AddZone("Las Venturas Airport", 1457.370, 1143.210, -89.084, 1777.400, 1203.280, 110.916)
- AddZone("Idlewood", 1812.620, -1742.310, -89.084, 1951.660, -1602.310, 110.916)
- AddZone("Esplanade East", -1580.010, 1025.980, -6.1, -1499.890, 1274.260, 200.000)
- AddZone("Downtown Los Santos", 1370.850, -1384.950, -89.084, 1463.900, -1170.870, 110.916)
- AddZone("The Mako Span", 1664.620, 401.750, 0.000, 1785.140, 567.203, 200.000)
- AddZone("Rodeo", 312.803, -1684.650, -89.084, 422.680, -1501.950, 110.916)
- AddZone("Pershing Square", 1440.900, -1722.260, -89.084, 1583.500, -1577.590, 110.916)
- AddZone("Mulholland", 687.802, -860.619, -89.084, 911.802, -768.027, 110.916)
- AddZone("Gant Bridge", -2741.070, 1490.470, -6.1, -2616.400, 1659.680, 200.000)
- AddZone("Las Colinas", 2185.330, -1154.590, -89.084, 2281.450, -934.489, 110.916)
- AddZone("Mulholland", 1169.130, -910.170, -89.084, 1318.130, -768.027, 110.916)
- AddZone("Julius Thruway North", 1938.800, 2508.230, -89.084, 2121.400, 2624.230, 110.916)
- AddZone("Commerce", 1667.960, -1577.590, -89.084, 1812.620, -1430.870, 110.916)
- AddZone("Rodeo", 72.648, -1544.170, -89.084, 225.165, -1404.970, 110.916)
- AddZone("Roca Escalante", 2536.430, 2202.760, -89.084, 2625.160, 2442.550, 110.916)
- AddZone("Rodeo", 72.648, -1684.650, -89.084, 225.165, -1544.170, 110.916)
- AddZone("Market", 952.663, -1310.210, -89.084, 1072.660, -1130.850, 110.916)
- AddZone("Las Colinas", 2632.740, -1135.040, -89.084, 2747.740, -945.035, 110.916)
- AddZone("Mulholland", 861.085, -674.885, -89.084, 1156.550, -600.896, 110.916)
- AddZone("King's", -2253.540, 373.539, -9.1, -1993.280, 458.411, 200.000)
- AddZone("Redsands East", 1848.400, 2342.830, -89.084, 2011.940, 2478.490, 110.916)
- AddZone("Downtown", -1580.010, 744.267, -6.1, -1499.890, 1025.980, 200.000)
- AddZone("Conference Center", 1046.150, -1804.210, -89.084, 1323.900, -1722.260, 110.916)
- AddZone("Richman", 647.557, -1118.280, -89.084, 787.461, -954.662, 110.916)
- AddZone("Ocean Flats", -2994.490, 277.411, -9.1, -2867.850, 458.411, 200.000)
- AddZone("Greenglass College", 964.391, 930.890, -89.084, 1166.530, 1044.690, 110.916)
- AddZone("Glen Park", 1812.620, -1100.820, -89.084, 1994.330, -973.380, 110.916)
- AddZone("LVA Freight Depot", 1375.600, 919.447, -89.084, 1457.370, 1203.280, 110.916)
- AddZone("Regular Tom", -405.770, 1712.860, -3.0, -276.719, 1892.750, 200.000)
- AddZone("Verona Beach", 1161.520, -1722.260, -89.084, 1323.900, -1577.590, 110.916)
- AddZone("East Los Santos", 2281.450, -1372.040, -89.084, 2381.680, -1135.040, 110.916)
- AddZone("Caligula's Palace", 2137.400, 1703.230, -89.084, 2437.390, 1783.230, 110.916)
- AddZone("Idlewood", 1951.660, -1742.310, -89.084, 2124.660, -1602.310, 110.916)
- AddZone("Pilgrim", 2624.400, 1383.230, -89.084, 2685.160, 1783.230, 110.916)
- AddZone("Idlewood", 2124.660, -1742.310, -89.084, 2222.560, -1494.030, 110.916)
- AddZone("Queens", -2533.040, 458.411, 0.000, -2329.310, 578.396, 200.000)
- AddZone("Downtown", -1871.720, 1176.420, -4.5, -1620.300, 1274.260, 200.000)
- AddZone("Commerce", 1583.500, -1722.260, -89.084, 1758.900, -1577.590, 110.916)
- AddZone("East Los Santos", 2381.680, -1454.350, -89.084, 2462.130, -1135.040, 110.916)
- AddZone("Marina", 647.712, -1577.590, -89.084, 807.922, -1416.250, 110.916)
- AddZone("Richman", 72.648, -1404.970, -89.084, 225.165, -1235.070, 110.916)
- AddZone("Vinewood", 647.712, -1416.250, -89.084, 787.461, -1227.280, 110.916)
- AddZone("East Los Santos", 2222.560, -1628.530, -89.084, 2421.030, -1494.030, 110.916)
- AddZone("Rodeo", 558.099, -1684.650, -89.084, 647.522, -1384.930, 110.916)
- AddZone("Easter Tunnel", -1709.710, -833.034, -1.5, -1446.010, -730.118, 200.000)
- AddZone("Rodeo", 466.223, -1385.070, -89.084, 647.522, -1235.070, 110.916)
- AddZone("Redsands East", 1817.390, 2202.760, -89.084, 2011.940, 2342.830, 110.916)
- AddZone("The Clown's Pocket", 2162.390, 1783.230, -89.084, 2437.390, 1883.230, 110.916)
- AddZone("Idlewood", 1971.660, -1852.870, -89.084, 2222.560, -1742.310, 110.916)
- AddZone("Montgomery Intersection", 1546.650, 208.164, 0.000, 1745.830, 347.457, 200.000)
- AddZone("Willowfield", 2089.000, -2235.840, -89.084, 2201.820, -1989.900, 110.916)
- AddZone("Temple", 952.663, -1130.840, -89.084, 1096.470, -937.184, 110.916)
- AddZone("Prickle Pine", 1848.400, 2553.490, -89.084, 1938.800, 2863.230, 110.916)
- AddZone("Los Santos International", 1400.970, -2669.260, -39.084, 2189.820, -2597.260, 60.916)
- AddZone("Garver Bridge", -1213.910, 950.022, -89.084, -1087.930, 1178.930, 110.916)
- AddZone("Garver Bridge", -1339.890, 828.129, -89.084, -1213.910, 1057.040, 110.916)
- AddZone("Kincaid Bridge", -1339.890, 599.218, -89.084, -1213.910, 828.129, 110.916)
- AddZone("Kincaid Bridge", -1213.910, 721.111, -89.084, -1087.930, 950.022, 110.916)
- AddZone("Verona Beach", 930.221, -2006.780, -89.084, 1073.220, -1804.210, 110.916)
- AddZone("Verdant Bluffs", 1073.220, -2006.780, -89.084, 1249.620, -1842.270, 110.916)
- AddZone("Vinewood", 787.461, -1130.840, -89.084, 952.604, -954.662, 110.916)
- AddZone("Vinewood", 787.461, -1310.210, -89.084, 952.663, -1130.840, 110.916)
- AddZone("Commerce", 1463.900, -1577.590, -89.084, 1667.960, -1430.870, 110.916)
- AddZone("Market", 787.461, -1416.250, -89.084, 1072.660, -1310.210, 110.916)
- AddZone("Rockshore West", 2377.390, 596.349, -89.084, 2537.390, 788.894, 110.916)
- AddZone("Julius Thruway North", 2237.400, 2542.550, -89.084, 2498.210, 2663.170, 110.916)
- AddZone("East Beach", 2632.830, -1668.130, -89.084, 2747.740, -1393.420, 110.916)
- AddZone("Fallow Bridge", 434.341, 366.572, 0.000, 603.035, 555.680, 200.000)
- AddZone("Willowfield", 2089.000, -1989.900, -89.084, 2324.000, -1852.870, 110.916)
- AddZone("Chinatown", -2274.170, 578.396, -7.6, -2078.670, 744.170, 200.000)
- AddZone("El Castillo del Diablo", -208.570, 2337.180, 0.000, 8.430, 2487.180, 200.000)
- AddZone("Ocean Docks", 2324.000, -2145.100, -89.084, 2703.580, -2059.230, 110.916)
- AddZone("Easter Bay Chemicals", -1132.820, -768.027, 0.000, -956.476, -578.118, 200.000)
- AddZone("The Visage", 1817.390, 1703.230, -89.084, 2027.400, 1863.230, 110.916)
- AddZone("Ocean Flats", -2994.490, -430.276, -1.2, -2831.890, -222.589, 200.000)
- AddZone("Richman", 321.356, -860.619, -89.084, 687.802, -768.027, 110.916)
- AddZone("Green Palms", 176.581, 1305.450, -3.0, 338.658, 1520.720, 200.000)
- AddZone("Richman", 321.356, -768.027, -89.084, 700.794, -674.885, 110.916)
- AddZone("Starfish Casino", 2162.390, 1883.230, -89.084, 2437.390, 2012.180, 110.916)
- AddZone("East Beach", 2747.740, -1668.130, -89.084, 2959.350, -1498.620, 110.916)
- AddZone("Jefferson", 2056.860, -1372.040, -89.084, 2281.450, -1210.740, 110.916)
- AddZone("Downtown Los Santos", 1463.900, -1290.870, -89.084, 1724.760, -1150.870, 110.916)
- AddZone("Downtown Los Santos", 1463.900, -1430.870, -89.084, 1724.760, -1290.870, 110.916)
- AddZone("Garver Bridge", -1499.890, 696.442, -179.615, -1339.890, 925.353, 20.385)
- AddZone("Julius Thruway South", 1457.390, 823.228, -89.084, 2377.390, 863.229, 110.916)
- AddZone("East Los Santos", 2421.030, -1628.530, -89.084, 2632.830, -1454.350, 110.916)
- AddZone("Greenglass College", 964.391, 1044.690, -89.084, 1197.390, 1203.220, 110.916)
- AddZone("Las Colinas", 2747.740, -1120.040, -89.084, 2959.350, -945.035, 110.916)
- AddZone("Mulholland", 737.573, -768.027, -89.084, 1142.290, -674.885, 110.916)
- AddZone("Ocean Docks", 2201.820, -2730.880, -89.084, 2324.000, -2418.330, 110.916)
- AddZone("East Los Santos", 2462.130, -1454.350, -89.084, 2581.730, -1135.040, 110.916)
- AddZone("Ganton", 2222.560, -1722.330, -89.084, 2632.830, -1628.530, 110.916)
- AddZone("Avispa Country Club", -2831.890, -430.276, -6.1, -2646.400, -222.589, 200.000)
- AddZone("Willowfield", 1970.620, -2179.250, -89.084, 2089.000, -1852.870, 110.916)
- AddZone("Esplanade North", -1982.320, 1274.260, -4.5, -1524.240, 1358.900, 200.000)
- AddZone("The High Roller", 1817.390, 1283.230, -89.084, 2027.390, 1469.230, 110.916)
- AddZone("Ocean Docks", 2201.820, -2418.330, -89.084, 2324.000, -2095.000, 110.916)
- AddZone("Last Dime Motel", 1823.080, 596.349, -89.084, 1997.220, 823.228, 110.916)
- AddZone("Bayside Marina", -2353.170, 2275.790, 0.000, -2153.170, 2475.790, 200.000)
- AddZone("King's", -2329.310, 458.411, -7.6, -1993.280, 578.396, 200.000)
- AddZone("El Corona", 1692.620, -2179.250, -89.084, 1812.620, -1842.270, 110.916)
- AddZone("Blackfield Chapel", 1375.600, 596.349, -89.084, 1558.090, 823.228, 110.916)
- AddZone("The Pink Swan", 1817.390, 1083.230, -89.084, 2027.390, 1283.230, 110.916)
- AddZone("Julius Thruway West", 1197.390, 1163.390, -89.084, 1236.630, 2243.230, 110.916)
- AddZone("Los Flores", 2581.730, -1393.420, -89.084, 2747.740, -1135.040, 110.916)
- AddZone("The Visage", 1817.390, 1863.230, -89.084, 2106.700, 2011.830, 110.916)
- AddZone("Prickle Pine", 1938.800, 2624.230, -89.084, 2121.400, 2861.550, 110.916)
- AddZone("Verona Beach", 851.449, -1804.210, -89.084, 1046.150, -1577.590, 110.916)
- AddZone("Robada Intersection", -1119.010, 1178.930, -89.084, -862.025, 1351.450, 110.916)
- AddZone("Linden Side", 2749.900, 943.235, -89.084, 2923.390, 1198.990, 110.916)
- AddZone("Ocean Docks", 2703.580, -2302.330, -89.084, 2959.350, -2126.900, 110.916)
- AddZone("Willowfield", 2324.000, -2059.230, -89.084, 2541.700, -1852.870, 110.916)
- AddZone("King's", -2411.220, 265.243, -9.1, -1993.280, 373.539, 200.000)
- AddZone("Commerce", 1323.900, -1842.270, -89.084, 1701.900, -1722.260, 110.916)
- AddZone("Mulholland", 1269.130, -768.027, -89.084, 1414.070, -452.425, 110.916)
- AddZone("Marina", 647.712, -1804.210, -89.084, 851.449, -1577.590, 110.916)
- AddZone("Battery Point", -2741.070, 1268.410, -4.5, -2533.040, 1490.470, 200.000)
- AddZone("The Four Dragons Casino", 1817.390, 863.232, -89.084, 2027.390, 1083.230, 110.916)
- AddZone("Blackfield", 964.391, 1203.220, -89.084, 1197.390, 1403.220, 110.916)
- AddZone("Julius Thruway North", 1534.560, 2433.230, -89.084, 1848.400, 2583.230, 110.916)
- AddZone("Yellow Bell Gol Course", 1117.400, 2723.230, -89.084, 1457.460, 2863.230, 110.916)
- AddZone("Idlewood", 1812.620, -1602.310, -89.084, 2124.660, -1449.670, 110.916)
- AddZone("Redsands West", 1297.470, 2142.860, -89.084, 1777.390, 2243.230, 110.916)
- AddZone("Doherty", -2270.040, -324.114, -1.2, -1794.920, -222.589, 200.000)
- AddZone("Hilltop Farm", 967.383, -450.390, -3.0, 1176.780, -217.900, 200.000)
- AddZone("Las Barrancas", -926.130, 1398.730, -3.0, -719.234, 1634.690, 200.000)
- AddZone("Pirates in Men's Pants", 1817.390, 1469.230, -89.084, 2027.400, 1703.230, 110.916)
- AddZone("City Hall", -2867.850, 277.411, -9.1, -2593.440, 458.411, 200.000)
- AddZone("Avispa Country Club", -2646.400, -355.493, 0.000, -2270.040, -222.589, 200.000)
- AddZone("The Strip", 2027.400, 863.229, -89.084, 2087.390, 1703.230, 110.916)
- AddZone("Hashbury", -2593.440, -222.589, -1.0, -2411.220, 54.722, 200.000)
- AddZone("Los Santos International", 1852.000, -2394.330, -89.084, 2089.000, -2179.250, 110.916)
- AddZone("Whitewood Estates", 1098.310, 1726.220, -89.084, 1197.390, 2243.230, 110.916)
- AddZone("Sherman Reservoir", -789.737, 1659.680, -89.084, -599.505, 1929.410, 110.916)
- AddZone("El Corona", 1812.620, -2179.250, -89.084, 1970.620, -1852.870, 110.916)
- AddZone("Downtown", -1700.010, 744.267, -6.1, -1580.010, 1176.520, 200.000)
- AddZone("Foster Valley", -2178.690, -1250.970, 0.000, -1794.920, -1115.580, 200.000)
- AddZone("Las Payasadas", -354.332, 2580.360, 2.0, -133.625, 2816.820, 200.000)
- AddZone("Valle Ocultado", -936.668, 2611.440, 2.0, -715.961, 2847.900, 200.000)
- AddZone("Blackfield Intersection", 1166.530, 795.010, -89.084, 1375.600, 1044.690, 110.916)
- AddZone("Ganton", 2222.560, -1852.870, -89.084, 2632.830, -1722.330, 110.916)
- AddZone("Easter Bay Airport", -1213.910, -730.118, 0.000, -1132.820, -50.096, 200.000)
- AddZone("Redsands East", 1817.390, 2011.830, -89.084, 2106.700, 2202.760, 110.916)
- AddZone("Esplanade East", -1499.890, 578.396, -79.615, -1339.890, 1274.260, 20.385)
- AddZone("Caligula's Palace", 2087.390, 1543.230, -89.084, 2437.390, 1703.230, 110.916)
- AddZone("Royal Casino", 2087.390, 1383.230, -89.084, 2437.390, 1543.230, 110.916)
- AddZone("Richman", 72.648, -1235.070, -89.084, 321.356, -1008.150, 110.916)
- AddZone("Starfish Casino", 2437.390, 1783.230, -89.084, 2685.160, 2012.180, 110.916)
- AddZone("Mulholland", 1281.130, -452.425, -89.084, 1641.130, -290.913, 110.916)
- AddZone("Downtown", -1982.320, 744.170, -6.1, -1871.720, 1274.260, 200.000)
- AddZone("Hankypanky Point", 2576.920, 62.158, 0.000, 2759.250, 385.503, 200.000)
- AddZone("K.A.C.C. Military Fuels", 2498.210, 2626.550, -89.084, 2749.900, 2861.550, 110.916)
- AddZone("Harry Gold Parkway", 1777.390, 863.232, -89.084, 1817.390, 2342.830, 110.916)
- AddZone("Bayside Tunnel", -2290.190, 2548.290, -89.084, -1950.190, 2723.290, 110.916)
- AddZone("Ocean Docks", 2324.000, -2302.330, -89.084, 2703.580, -2145.100, 110.916)
- AddZone("Richman", 321.356, -1044.070, -89.084, 647.557, -860.619, 110.916)
- AddZone("Randolph Industrial Estate", 1558.090, 596.349, -89.084, 1823.080, 823.235, 110.916)
- AddZone("East Beach", 2632.830, -1852.870, -89.084, 2959.350, -1668.130, 110.916)
- AddZone("Flint Water", -314.426, -753.874, -89.084, -106.339, -463.073, 110.916)
- AddZone("Blueberry", 19.607, -404.136, 3.8, 349.607, -220.137, 200.000)
- AddZone("Linden Station", 2749.900, 1198.990, -89.084, 2923.390, 1548.990, 110.916)
- AddZone("Glen Park", 1812.620, -1350.720, -89.084, 2056.860, -1100.820, 110.916)
- AddZone("Downtown", -1993.280, 265.243, -9.1, -1794.920, 578.396, 200.000)
- AddZone("Redsands West", 1377.390, 2243.230, -89.084, 1704.590, 2433.230, 110.916)
- AddZone("Richman", 321.356, -1235.070, -89.084, 647.522, -1044.070, 110.916)
- AddZone("Gant Bridge", -2741.450, 1659.680, -6.1, -2616.400, 2175.150, 200.000)
- AddZone("Lil' Probe Inn", -90.218, 1286.850, -3.0, 153.859, 1554.120, 200.000)
- AddZone("Flint Intersection", -187.700, -1596.760, -89.084, 17.063, -1276.600, 110.916)
- AddZone("Las Colinas", 2281.450, -1135.040, -89.084, 2632.740, -945.035, 110.916)
- AddZone("Sobell Rail Yards", 2749.900, 1548.990, -89.084, 2923.390, 1937.250, 110.916)
- AddZone("The Emerald Isle", 2011.940, 2202.760, -89.084, 2237.400, 2508.230, 110.916)
- AddZone("El Castillo del Diablo", -208.570, 2123.010, -7.6, 114.033, 2337.180, 200.000)
- AddZone("Santa Flora", -2741.070, 458.411, -7.6, -2533.040, 793.411, 200.000)
- AddZone("Playa del Seville", 2703.580, -2126.900, -89.084, 2959.350, -1852.870, 110.916)
- AddZone("Market", 926.922, -1577.590, -89.084, 1370.850, -1416.250, 110.916)
- AddZone("Queens", -2593.440, 54.722, 0.000, -2411.220, 458.411, 200.000)
- AddZone("Pilson Intersection", 1098.390, 2243.230, -89.084, 1377.390, 2507.230, 110.916)
- AddZone("Spinybed", 2121.400, 2663.170, -89.084, 2498.210, 2861.550, 110.916)
- AddZone("Pilgrim", 2437.390, 1383.230, -89.084, 2624.400, 1783.230, 110.916)
- AddZone("Blackfield", 964.391, 1403.220, -89.084, 1197.390, 1726.220, 110.916)
- AddZone("'The Big Ear'", -410.020, 1403.340, -3.0, -137.969, 1681.230, 200.000)
- AddZone("Dillimore", 580.794, -674.885, -9.5, 861.085, -404.790, 200.000)
- AddZone("El Quebrados", -1645.230, 2498.520, 0.000, -1372.140, 2777.850, 200.000)
- AddZone("Esplanade North", -2533.040, 1358.900, -4.5, -1996.660, 1501.210, 200.000)
- AddZone("Easter Bay Airport", -1499.890, -50.096, -1.0, -1242.980, 249.904, 200.000)
- AddZone("Fisher's Lagoon", 1916.990, -233.323, -100.000, 2131.720, 13.800, 200.000)
- AddZone("Mulholland", 1414.070, -768.027, -89.084, 1667.610, -452.425, 110.916)
- AddZone("East Beach", 2747.740, -1498.620, -89.084, 2959.350, -1120.040, 110.916)
- AddZone("San Andreas Sound", 2450.390, 385.503, -100.000, 2759.250, 562.349, 200.000)
- AddZone("Shady Creeks", -2030.120, -2174.890, -6.1, -1820.640, -1771.660, 200.000)
- AddZone("Market", 1072.660, -1416.250, -89.084, 1370.850, -1130.850, 110.916)
- AddZone("Rockshore West", 1997.220, 596.349, -89.084, 2377.390, 823.228, 110.916)
- AddZone("Prickle Pine", 1534.560, 2583.230, -89.084, 1848.400, 2863.230, 110.916)
- AddZone("Easter Basin", -1794.920, -50.096, -1.04, -1499.890, 249.904, 200.000)
- AddZone("Leafy Hollow", -1166.970, -1856.030, 0.000, -815.624, -1602.070, 200.000)
- AddZone("LVA Freight Depot", 1457.390, 863.229, -89.084, 1777.400, 1143.210, 110.916)
- AddZone("Prickle Pine", 1117.400, 2507.230, -89.084, 1534.560, 2723.230, 110.916)
- AddZone("Blueberry", 104.534, -220.137, 2.3, 349.607, 152.236, 200.000)
- AddZone("El Castillo del Diablo", -464.515, 2217.680, 0.000, -208.570, 2580.360, 200.000)
- AddZone("Downtown", -2078.670, 578.396, -7.6, -1499.890, 744.267, 200.000)
- AddZone("Rockshore East", 2537.390, 676.549, -89.084, 2902.350, 943.235, 110.916)
- AddZone("San Fierro Bay", -2616.400, 1501.210, -3.0, -1996.660, 1659.680, 200.000)
- AddZone("Paradiso", -2741.070, 793.411, -6.1, -2533.040, 1268.410, 200.000)
- AddZone("The Camel's Toe", 2087.390, 1203.230, -89.084, 2640.400, 1383.230, 110.916)
- AddZone("Old Venturas Strip", 2162.390, 2012.180, -89.084, 2685.160, 2202.760, 110.916)
- AddZone("Juniper Hill", -2533.040, 578.396, -7.6, -2274.170, 968.369, 200.000)
- AddZone("Juniper Hollow", -2533.040, 968.369, -6.1, -2274.170, 1358.900, 200.000)
- AddZone("Roca Escalante", 2237.400, 2202.760, -89.084, 2536.430, 2542.550, 110.916)
- AddZone("Julius Thruway East", 2685.160, 1055.960, -89.084, 2749.900, 2626.550, 110.916)
- AddZone("Verona Beach", 647.712, -2173.290, -89.084, 930.221, -1804.210, 110.916)
- AddZone("Foster Valley", -2178.690, -599.884, -1.2, -1794.920, -324.114, 200.000)
- AddZone("Arco del Oeste", -901.129, 2221.860, 0.000, -592.090, 2571.970, 200.000)
- AddZone("Fallen Tree", -792.254, -698.555, -5.3, -452.404, -380.043, 200.000)
- AddZone("The Farm", -1209.670, -1317.100, 114.981, -908.161, -787.391, 251.981)
- AddZone("The Sherman Dam", -968.772, 1929.410, -3.0, -481.126, 2155.260, 200.000)
- AddZone("Esplanade North", -1996.660, 1358.900, -4.5, -1524.240, 1592.510, 200.000)
- AddZone("Financial", -1871.720, 744.170, -6.1, -1701.300, 1176.420, 300.000)
- AddZone("Garcia", -2411.220, -222.589, -1.14, -2173.040, 265.243, 200.000)
- AddZone("Montgomery", 1119.510, 119.526, -3.0, 1451.400, 493.323, 200.000)
- AddZone("Creek", 2749.900, 1937.250, -89.084, 2921.620, 2669.790, 110.916)
- AddZone("Los Santos International", 1249.620, -2394.330, -89.084, 1852.000, -2179.250, 110.916)
- AddZone("Santa Maria Beach", 72.648, -2173.290, -89.084, 342.648, -1684.650, 110.916)
- AddZone("Mulholland Intersection", 1463.900, -1150.870, -89.084, 1812.620, -768.027, 110.916)
- AddZone("Angel Pine", -2324.940, -2584.290, -6.1, -1964.220, -2212.110, 200.000)
- AddZone("Verdant Meadows", 37.032, 2337.180, -3.0, 435.988, 2677.900, 200.000)
- AddZone("Octane Springs", 338.658, 1228.510, 0.000, 664.308, 1655.050, 200.000)
- AddZone("Come-A-Lot", 2087.390, 943.235, -89.084, 2623.180, 1203.230, 110.916)
- AddZone("Redsands West", 1236.630, 1883.110, -89.084, 1777.390, 2142.860, 110.916)
- AddZone("Santa Maria Beach", 342.648, -2173.290, -89.084, 647.712, -1684.650, 110.916)
- AddZone("Verdant Bluffs", 1249.620, -2179.250, -89.084, 1692.620, -1842.270, 110.916)
- AddZone("Las Venturas Airport", 1236.630, 1203.280, -89.084, 1457.370, 1883.110, 110.916)
- AddZone("Flint Range", -594.191, -1648.550, 0.000, -187.700, -1276.600, 200.000)
- AddZone("Verdant Bluffs", 930.221, -2488.420, -89.084, 1249.620, -2006.780, 110.916)
- AddZone("Palomino Creek", 2160.220, -149.004, 0.000, 2576.920, 228.322, 200.000)
- AddZone("Ocean Docks", 2373.770, -2697.090, -89.084, 2809.220, -2330.460, 110.916)
- AddZone("Easter Bay Airport", -1213.910, -50.096, -4.5, -947.980, 578.396, 200.000)
- AddZone("Whitewood Estates", 883.308, 1726.220, -89.084, 1098.310, 2507.230, 110.916)
- AddZone("Calton Heights", -2274.170, 744.170, -6.1, -1982.320, 1358.900, 200.000)
- AddZone("Easter Basin", -1794.920, 249.904, -9.1, -1242.980, 578.396, 200.000)
- AddZone("Los Santos Inlet", -321.744, -2224.430, -89.084, 44.615, -1724.430, 110.916)
- AddZone("Doherty", -2173.040, -222.589, -1.0, -1794.920, 265.243, 200.000)
- AddZone("Mount Chiliad", -2178.690, -2189.910, -47.917, -2030.120, -1771.660, 576.083)
- AddZone("Fort Carson", -376.233, 826.326, -3.0, 123.717, 1220.440, 200.000)
- AddZone("Foster Valley", -2178.690, -1115.580, 0.000, -1794.920, -599.884, 200.000)
- AddZone("Ocean Flats", -2994.490, -222.589, -1.0, -2593.440, 277.411, 200.000)
- AddZone("Fern Ridge", 508.189, -139.259, 0.000, 1306.660, 119.526, 200.000)
- AddZone("Bayside", -2741.070, 2175.150, 0.000, -2353.170, 2722.790, 200.000)
- AddZone("Las Venturas Airport", 1457.370, 1203.280, -89.084, 1777.390, 1883.110, 110.916)
- AddZone("Blueberry Acres", -319.676, -220.137, 0.000, 104.534, 293.324, 200.000)
- AddZone("Palisades", -2994.490, 458.411, -6.1, -2741.070, 1339.610, 200.000)
- AddZone("North Rock", 2285.370, -768.027, 0.000, 2770.590, -269.740, 200.000)
- AddZone("Hunter Quarry", 337.244, 710.840, -115.239, 860.554, 1031.710, 203.761)
- AddZone("Los Santos International", 1382.730, -2730.880, -89.084, 2201.820, -2394.330, 110.916)
- AddZone("Missionary Hill", -2994.490, -811.276, 0.000, -2178.690, -430.276, 200.000)
- AddZone("San Fierro Bay", -2616.400, 1659.680, -3.0, -1996.660, 2175.150, 200.000)
- AddZone("Restricted Area", -91.586, 1655.050, -50.000, 421.234, 2123.010, 250.000)
- AddZone("Mount Chiliad", -2997.470, -1115.580, -47.917, -2178.690, -971.913, 576.083)
- AddZone("Mount Chiliad", -2178.690, -1771.660, -47.917, -1936.120, -1250.970, 576.083)
- AddZone("Easter Bay Airport", -1794.920, -730.118, -3.0, -1213.910, -50.096, 200.000)
- AddZone("The Panopticon", -947.980, -304.320, -1.1, -319.676, 327.071, 200.000)
- AddZone("Shady Creeks", -1820.640, -2643.680, -8.0, -1226.780, -1771.660, 200.000)
- AddZone("Back o Beyond", -1166.970, -2641.190, 0.000, -321.744, -1856.030, 200.000)
- AddZone("Mount Chiliad", -2994.490, -2189.910, -47.917, -2178.690, -1115.580, 576.083)
- AddZone("Tierra Robada", -1213.910, 596.349, -242.990, -480.539, 1659.680, 900.000)
- AddZone("Flint County", -1213.910, -2892.970, -242.990, 44.615, -768.027, 900.000)
- AddZone("Whetstone", -2997.470, -2892.970, -242.990, -1213.910, -1115.580, 900.000)
- AddZone("Bone County", -480.539, 596.349, -242.990, 869.461, 2993.870, 900.000)
- AddZone("Tierra Robada", -2997.470, 1659.680, -242.990, -480.539, 2993.870, 900.000)
- AddZone("San Fierro", -2997.470, -1115.580, -242.990, -1213.910, 1659.680, 900.000)
- AddZone("Las Venturas", 869.461, 596.349, -242.990, 2997.060, 2993.870, 900.000)
- AddZone("Red County", -1213.910, -768.027, -242.990, 2997.060, 596.349, 900.000)
- AddZone("Los Santos", 44.615, -2892.970, -242.990, 2997.060, -768.027, 900.000)
- }
- calculateZone(posX, posY, posZ) {
- if ( bInitZaC == 0 )
- {
- initZonesAndCities()
- bInitZaC := 1
- }
- Loop % nZone-1
- {
- 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)
- {
- ErrorLevel := ERROR_OK
- return zone%A_Index%_name
- }
- }
- ErrorLevel := ERROR_ZONE_NOT_FOUND
- return "Unbekannt"
- }
- calculateCity(posX, posY, posZ) {
- if ( bInitZaC == 0 )
- {
- initZonesAndCities()
- bInitZaC := 1
- }
- smallestCity := "Unbekannt"
- currentCitySize := 0
- smallestCitySize := 0
- Loop % nCity-1
- {
- 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)
- {
- 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))
- if (smallestCity == "Unbekannt") || (currentCitySize < smallestCitySize)
- {
- smallestCity := city%A_Index%_name
- smallestCitySize := currentCitySize
- }
- }
- }
- if(smallestCity == "Unbekannt") {
- ErrorLevel := ERROR_CITY_NOT_FOUND
- } else {
- ErrorLevel := ERROR_OK
- }
- return smallestCity
- }
- AddZone(sName, x1, y1, z1, x2, y2, z2) {
- global
- zone%nZone%_name := sName
- zone%nZone%_x1 := x1
- zone%nZone%_y1 := y1
- zone%nZone%_z1 := z1
- zone%nZone%_x2 := x2
- zone%nZone%_y2 := y2
- zone%nZone%_z2 := z2
- nZone := nZone + 1
- }
- AddCity(sName, x1, y1, z1, x2, y2, z2) {
- global
- city%nCity%_name := sName
- city%nCity%_x1 := x1
- city%nCity%_y1 := y1
- city%nCity%_z1 := z1
- city%nCity%_x2 := x2
- city%nCity%_y2 := y2
- city%nCity%_z2 := z2
- nCity := nCity + 1
- }
- getPlayerInteriorId() {
- if(!checkHandles())
- return -1
- iid := readMem(hGTA, ADDR_CPED_INTID, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- ErrorLevel := ERROR_OK
- return iid
- }
- getPlayerZone()
- {
- aktPos := getCoordinates()
- return calculateZone(aktPos[1], aktPos[2], aktPos[3])
- }
- getPlayerCity()
- {
- aktPos := getCoordinates()
- return calculateCity(aktPos[1], aktPos[2], aktPos[3])
- }
- checkHandles() {
- if(iRefreshHandles+500>A_TickCount)
- return true
- iRefreshHandles:=A_TickCount
- if(!refreshGTA() || !refreshSAMP() || !refreshMemory()) {
- return false
- } else {
- return true
- }
- return true
- }
- refreshGTA() {
- newPID := getPID("GTA:SA:MP")
- if(!newPID) {
- if(hGTA) {
- virtualFreeEx(hGTA, pMemory, 0, 0x8000)
- closeProcess(hGTA)
- hGTA := 0x0
- }
- dwGTAPID := 0
- hGTA := 0x0
- dwSAMP := 0x0
- pMemory := 0x0
- return false
- }
- if(!hGTA || (dwGTAPID != newPID)) {
- hGTA := openProcess(newPID)
- if(ErrorLevel) {
- dwGTAPID := 0
- hGTA := 0x0
- dwSAMP := 0x0
- pMemory := 0x0
- return false
- }
- dwGTAPID := newPID
- dwSAMP := 0x0
- pMemory := 0x0
- return true
- }
- return true
- }
- refreshSAMP() {
- if(dwSAMP)
- return true
- dwSAMP := getModuleBaseAddress("samp.dll", hGTA)
- if(!dwSAMP)
- return false
- return true
- }
- refreshMemory() {
- if(!pMemory) {
- pMemory := virtualAllocEx(hGTA, 6144, 0x1000 | 0x2000, 0x40)
- if(ErrorLevel) {
- pMemory := 0x0
- return false
- }
- pParam1 := pMemory
- pParam2 := pMemory + 1024
- pParam3 := pMemory + 2048
- pParam4 := pMemory + 3072
- pParam5 := pMemory + 4096
- pInjectFunc := pMemory + 5120
- }
- return true
- }
- getPID(szWindow) {
- local dwPID := 0
- WinGet, dwPID, PID, %szWindow%
- return dwPID
- }
- openProcess(dwPID, dwRights = 0x1F0FFF) {
- hProcess := DllCall("OpenProcess"
- , "UInt", dwRights
- , "int", 0
- , "UInt", dwPID
- , "Uint")
- if(hProcess == 0) {
- ErrorLevel := ERROR_OPEN_PROCESS
- return 0
- }
- ErrorLevel := ERROR_OK
- return hProcess
- }
- closeProcess(hProcess) {
- if(hProcess == 0) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "CloseHandle"
- , "Uint", hProcess
- , "UInt")
- ErrorLevel := ERROR_OK
- }
- getModuleBaseAddress(sModule, hProcess) {
- if(!sModule) {
- ErrorLevel := ERROR_MODULE_NOT_FOUND
- return 0
- }
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwSize = 1024*4
- VarSetCapacity(hMods, dwSize)
- VarSetCapacity(cbNeeded, 4)
- dwRet := DllCall( "Psapi.dll\EnumProcessModules"
- , "UInt", hProcess
- , "UInt", &hMods
- , "UInt", dwSize
- , "UInt*", cbNeeded
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_ENUM_PROCESS_MODULES
- return 0
- }
- dwMods := cbNeeded / 4
- i := 0
- VarSetCapacity(hModule, 4)
- VarSetCapacity(sCurModule, 260)
- while(i < dwMods) {
- hModule := NumGet(hMods, i*4)
- DllCall("Psapi.dll\GetModuleFileNameEx"
- , "UInt", hProcess
- , "UInt", hModule
- , "Str", sCurModule
- , "UInt", 260)
- SplitPath, sCurModule, sFilename
- if(sModule == sFilename) {
- ErrorLevel := ERROR_OK
- return hModule
- }
- i := i + 1
- }
- ErrorLevel := ERROR_MODULE_NOT_FOUND
- return 0
- }
- readString(hProcess, dwAddress, dwLen) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(sRead, dwLen)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", sRead
- , "UInt", dwLen
- , "UInt*", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- if A_IsUnicode
- return __ansiToUnicode(sRead)
- return sRead
- }
- readFloat(hProcess, dwAddress) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, 4)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", 4
- , "UInt*", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, "Float")
- }
- readDWORD(hProcess, dwAddress) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, 4)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", 4
- , "UInt*", 0)
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, "UInt")
- }
- readMem(hProcess, dwAddress, dwLen=4, type="UInt") {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- VarSetCapacity(dwRead, dwLen)
- dwRet := DllCall( "ReadProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", dwRead
- , "UInt", dwLen
- , "UInt*", 0)
- if(dwRet == 0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return NumGet(dwRead, 0, type)
- }
- writeString(hProcess, dwAddress, wString) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- sString := wString
- if A_IsUnicode
- sString := __unicodeToAnsi(wString)
- dwRet := DllCall( "WriteProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "Str", sString
- , "UInt", StrLen(wString) + 1
- , "UInt", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_WRITE_MEMORY
- return false
- }
- ErrorLevel := ERROR_OK
- return true
- }
- getPlayerIdByName(wName) {
- wName := "" wName
- if(StrLen(wName) < 1 || StrLen(wName) > 20)
- return -1
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- For i, o in oScoreboardData
- {
- if(InStr(o.NAME,wName)==1)
- return i
- }
- return -1
- }
- if(!updateOScoreboardData())
- return -1
- For i, o in oScoreboardData
- {
- if(InStr(o.NAME,wName)==1)
- return i
- }
- return -1
- }
- getPlayerPingById(dwId) {
- dwId += 0
- dwId := Floor(dwId)
- if(dwId < 0 || dwId >= SAMP_PLAYER_MAX)
- return -1
- if(iRefreshScoreboard+iUpdateTick > A_TickCount)
- {
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].PING
- return -1
- }
- if(!updateOScoreboardData())
- return -1
- if(oScoreboardData[dwId])
- return oScoreboardData[dwId].PING
- return -1
- }
- updateScoreboardDataEx() {
- if(!checkHandles())
- return false
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return false
- }
- dwFunc := dwSAMP + FUNC_UPDATESCOREBOARD
- VarSetCapacity(injectData, 11, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(dwAddress, injectData, 1, "UInt")
- NumPut(0xE8, injectData, 5, "UChar")
- offset := dwFunc - (pInjectFunc + 10)
- NumPut(offset, injectData, 6, "Int")
- NumPut(0xC3, injectData, 10, "UChar")
- writeRaw(hGTA, pInjectFunc, &injectData, 11)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- updateOScoreboardData() {
- if(!checkHandles())
- return 0
- oScoreboardData := []
- if(!updateScoreboardDataEx())
- return 0
- iRefreshScoreboard := A_TickCount
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwAddress := readDWORD(hGTA, dwAddress + SAMP_PPOOLS_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwPlayers := readDWORD(hGTA, dwAddress + SAMP_PPOOL_PLAYER_OFFSET)
- if(ErrorLevel || dwPlayers==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- wID := readMem(hGTA, dwPlayers + SAMP_SLOCALPLAYERID_OFFSET, 2, "Short")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwPing := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERPING_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwScore := readMem(hGTA, dwPlayers + SAMP_ILOCALPLAYERSCORE_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwTemp := readMem(hGTA, dwPlayers + SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := ""
- if(dwTemp <= 0xf) {
- sUsername := readString(hGTA, dwPlayers + SAMP_SZLOCALPLAYERNAME_OFFSET, 16)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- else {
- dwAddress := readDWORD(hGTA, dwPlayers + SAMP_PSZLOCALPLAYERNAME_OFFSET)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- oScoreboardData[wID] := Object("NAME", sUsername, "ID", wID, "PING", dwPing, "SCORE", dwScore, "ISNPC", 0)
- Loop, % SAMP_PLAYER_MAX
- {
- i := A_Index-1
- dwRemoteplayer := readDWORD(hGTA, dwPlayers+SAMP_PREMOTEPLAYER_OFFSET+i*4)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- if(dwRemoteplayer==0)
- continue
- dwPing := readMem(hGTA, dwRemoteplayer + SAMP_IPING_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwScore := readMem(hGTA, dwRemoteplayer + SAMP_ISCORE_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwIsNPC := readMem(hGTA, dwRemoteplayer + SAMP_ISNPC_OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwTemp := readMem(hGTA, dwRemoteplayer + SAMP_ISTRLENNAME___OFFSET, 4, "Int")
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := ""
- if(dwTemp <= 0xf)
- {
- sUsername := readString(hGTA, dwRemoteplayer+SAMP_SZPLAYERNAME_OFFSET, 16)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- else {
- dwAddress := readDWORD(hGTA, dwRemoteplayer + SAMP_PSZPLAYERNAME_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- sUsername := readString(hGTA, dwAddress, 25)
- if(ErrorLevel) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- }
- o := Object("NAME", sUsername, "ID", i, "PING", dwPing, "SCORE", dwScore, "ISNPC", dwIsNPC)
- oScoreboardData[i] := o
- }
- ErrorLevel := ERROR_OK
- return 1
- }
- writeRaw(hProcess, dwAddress, pBuffer, dwLen) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- dwRet := DllCall( "WriteProcessMemory"
- , "UInt", hProcess
- , "UInt", dwAddress
- , "UInt", pBuffer
- , "UInt", dwLen
- , "UInt", 0
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_WRITE_MEMORY
- return false
- }
- ErrorLevel := ERROR_OK
- return true
- }
- callWithParams(hProcess, dwFunc, aParams, bCleanupStack = true) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return false
- }
- validParams := 0
- i := aParams.MaxIndex()
- dwLen := i * 5 + 5 + 1
- if(bCleanupStack)
- dwLen += 3
- VarSetCapacity(injectData, i * 5 + 5 + 3 + 1, 0)
- i_ := 1
- while(i > 0) {
- if(aParams[i][1] != "") {
- dwMemAddress := 0x0
- if(aParams[i][1] == "p") {
- dwMemAddress := aParams[i][2]
- } else if(aParams[i][1] == "s") {
- if(i_>3)
- return false
- dwMemAddress := pParam%i_%
- writeString(hProcess, dwMemAddress, aParams[i][2])
- if(ErrorLevel)
- return false
- i_ += 1
- } else if(aParams[i][1] == "i") {
- dwMemAddress := aParams[i][2]
- } else {
- return false
- }
- NumPut(0x68, injectData, validParams * 5, "UChar")
- NumPut(dwMemAddress, injectData, validParams * 5 + 1, "UInt")
- validParams += 1
- }
- i -= 1
- }
- offset := dwFunc - ( pInjectFunc + validParams * 5 + 5 )
- NumPut(0xE8, injectData, validParams * 5, "UChar")
- NumPut(offset, injectData, validParams * 5 + 1, "Int")
- if(bCleanupStack) {
- NumPut(0xC483, injectData, validParams * 5 + 5, "UShort")
- NumPut(validParams*4, injectData, validParams * 5 + 7, "UChar")
- NumPut(0xC3, injectData, validParams * 5 + 8, "UChar")
- } else {
- NumPut(0xC3, injectData, validParams * 5 + 5, "UChar")
- }
- writeRaw(hGTA, pInjectFunc, &injectData, dwLen)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "VirtualAllocEx"
- , "UInt", hProcess
- , "UInt", 0
- , "UInt", dwSize
- , "UInt", flAllocationType
- , "UInt", flProtect
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_ALLOC_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "VirtualFreeEx"
- , "UInt", hProcess
- , "UInt", lpAddress
- , "UInt", dwSize
- , "UInt", dwFreeType
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_FREE_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- createRemoteThread(hProcess, lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId) {
- if(!hProcess) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "CreateRemoteThread"
- , "UInt", hProcess
- , "UInt", lpThreadAttributes
- , "UInt", dwStackSize
- , "UInt", lpStartAddress
- , "UInt", lpParameter
- , "UInt", dwCreationFlags
- , "UInt", lpThreadId
- , "UInt")
- if(dwRet == 0) {
- ErrorLEvel := ERROR_ALLOC_MEMORY
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- waitForSingleObject(hThread, dwMilliseconds) {
- if(!hThread) {
- ErrorLevel := ERROR_INVALID_HANDLE
- return 0
- }
- dwRet := DllCall( "WaitForSingleObject"
- , "UInt", hThread
- , "UInt", dwMilliseconds
- , "UInt")
- if(dwRet == 0xFFFFFFFF) {
- ErrorLEvel := ERROR_WAIT_FOR_OBJECT
- return 0
- }
- ErrorLevel := ERROR_OK
- return dwRet
- }
- __ansiToUnicode(sString, nLen = 0) {
- If !nLen
- {
- nLen := DllCall("MultiByteToWideChar"
- , "Uint", 0
- , "Uint", 0
- , "Uint", &sString
- , "int", -1
- , "Uint", 0
- , "int", 0)
- }
- VarSetCapacity(wString, nLen * 2)
- DllCall("MultiByteToWideChar"
- , "Uint", 0
- , "Uint", 0
- , "Uint", &sString
- , "int", -1
- , "Uint", &wString
- , "int", nLen)
- return wString
- }
- __unicodeToAnsi(wString, nLen = 0) {
- pString := wString + 1 > 65536 ? wString : &wString
- If !nLen
- {
- nLen := DllCall("WideCharToMultiByte"
- , "Uint", 0
- , "Uint", 0
- , "Uint", pString
- , "int", -1
- , "Uint", 0
- , "int", 0
- , "Uint", 0
- , "Uint", 0)
- }
- VarSetCapacity(sString, nLen)
- DllCall("WideCharToMultiByte"
- , "Uint", 0
- , "Uint", 0
- , "Uint", pString
- , "int", -1
- , "str", sString
- , "int", nLen
- , "Uint", 0
- , "Uint", 0)
- return sString
- }
- restartGameEx() {
- if(!checkHandles())
- return -1
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return -1
- }
- dwFunc := dwSAMP + 0xA060
- VarSetCapacity(injectData, 11, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(dwAddress, injectData, 1, "UInt")
- NumPut(0xE8, injectData, 5, "UChar")
- offset := dwFunc - (pInjectFunc + 10)
- NumPut(offset, injectData, 6, "Int")
- NumPut(0xC3, injectData, 10, "UChar")
- writeRaw(hGTA, pInjectFunc, &injectData, 11)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- return true
- }
- disconnectEx() {
- if(!checkHandles())
- return 0
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- dwAddress := readDWORD(hGTA, dwAddress + 0x3c9)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- ecx := dwAddress
- dwAddress := readDWORD(hGTA, dwAddress)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- VarSetCapacity(injectData, 24, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(ecx, injectData, 1, "UInt")
- NumPut(0xB8, injectData, 5, "UChar")
- NumPut(dwAddress, injectData, 6, "UInt")
- NumPut(0x68, injectData, 10, "UChar")
- NumPut(0, injectData, 11, "UInt")
- NumPut(0x68, injectData, 15, "UChar")
- NumPut(500, injectData, 16, "UInt")
- NumPut(0x50FF, injectData, 20, "UShort")
- NumPut(0x08, injectData, 22, "UChar")
- NumPut(0xC3, injectData, 23, "UChar")
- writeRaw(hGTA, pInjectFunc, &injectData, 24)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(hGTA, 0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- return true
- }
- setrestart()
- {
- VarSetCapacity(old, 4, 0)
- dwAddress := readDWORD(hGTA, dwSAMP + SAMP_INFO_OFFSET)
- if(ErrorLevel || dwAddress==0) {
- ErrorLevel := ERROR_READ_MEMORY
- return 0
- }
- NumPut(9,old,0,"Int")
- writeRaw(hGTA, dwAddress + 957, &old, 4)
- }
- API_ERROR_NONE := 0
- API_ERROR_SNAPSHOT_FAILED := 1
- API_ERROR_SAMP_NOT_FOUND := 2
- API_ERROR_REMOTE_MEMORY_ALLOCATION_FAILED := 3
- API_ERROR_WRITEPROCESSMEMORY_FAILED := 4
- API_ERROR_GETPROCADDRESS_FAILED := 5
- API_ERROR_REMOTETHREAD_FAILED := 6
- API_ERROR_INVALID_GTA_HANDLE := 7
- API_ERROR_PIPE_DOESNT_RESPOND := 8
- API_ERROR_STRING_TOO_LONG := 9
- PLAYER_STATE_LEAVING_VEHICLE := 0
- PLAYER_STATE_NORMAL := 1
- PLAYER_STATE_DRIVING := 50
- PLAYER_STATE_DYING := 54
- PLAYER_STATE_DEAD := 55
- CALLBACK_HEAL := 0
- CALLBACK_ARMOR := 1
- CALLBACK_POSITION := 2
- CALLBACK_ENTEREXIT := 3
- CALLBACK_VEHICLE_ENTEREXIT := 4
- CALLBACK_VEHICLE_HEALTH := 5
- CALLBACK_VEHICLE_ENGINE := 6
- CALLBACK_VEHICLE_LOCK := 7
- CALLBACK_VEHICLE_SPEED := 8
- CALLBACK_WEAPON_CLIP := 9
- CALLBACK_WEAPON_TOTALCLIP := 10
- CALLBACK_WEAPON_SWITCH := 11
- CALLBACK_CHATLOG := 12
- PATH_API := RelToAbs(A_ScriptDir, "API.dll")
- hModule := DllCall("LoadLibrary", Str, PATH_API)
- if(hModule == -1 || hModule == 0)
- {
- MsgBox, 48, API - Fehler, Die API.dll konnte nicht gefunden werden.`nDer Keybinder wird nun beendet.
- ExitApp
- }
- ReadMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ReadMemory")
- WriteMemory_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WriteMemory")
- GetBasePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetBasePointer")
- GetCommandLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCommandLine")
- GetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastError")
- SetLastError_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetLastError")
- SendChat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SendChat")
- ShowGameText_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowGameText")
- AddChatMessage_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_AddChatMessage")
- ShowDialog_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ShowDialog")
- IsDialogOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsDialogOpen")
- GetLastDialogId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogId")
- GetLastDialogType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastDialogType")
- BlockChatInput_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_BlockChatInput")
- GetChatLine_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLine")
- GetChatLineFromFile_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetChatLineFromFile")
- IsChatOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsChatOpen")
- GetScreenSizeX_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeX")
- GetScreenSizeY_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetScreenSizeY")
- GetCurrentWeatherId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCurrentWeatherId")
- GetZoneName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneName")
- GetCityName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityName")
- GetZoneNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetZoneNameByCoords")
- GetCityNameByCoords_func:= DllCall("GetProcAddress", UInt, hModule, Str, "API_GetCityNameByCoords")
- GetMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMarkerPos")
- GetLastMousePosOnMenuMap_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetLastMousePosOnMenuMap")
- GetMapMarkerPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetMapMarkerPos")
- FindGroundZForPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_FindGroundZForPosition")
- WorldToScreen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_WorldToScreen")
- ScreenToWorld_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_ScreenToWorld")
- RegisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_RegisterTextBind")
- UnregisterTextBind_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterTextBind")
- UnregisterAllTextBinds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnregisterAllTextBinds")
- TextBindTimer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_TextBindTimer")
- IsMenuOpen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsMenuOpen")
- GetPlayerId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerId")
- GetPlayerName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerName")
- GetServerIp_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerIp")
- GetServerPort_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetServerPort")
- GetPlayerCPed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerCPed")
- GetPlayerHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerHealth")
- GetPlayerArmor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerArmor")
- GetPlayerMoney_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerMoney")
- GetPlayerWanteds_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWanteds")
- GetPlayerPosition_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerPosition")
- IsPlayerInRangeOfPoint_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint")
- IsPlayerInRangeOfPoint2D_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInRangeOfPoint2D")
- IsPlayerInAnyInterior_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyInterior")
- IsPlayerFrozen_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerFrozen")
- GetPlayerWeaponSlot_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponSlot")
- GetPlayerWeaponId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponId")
- GetPlayerWeaponName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponName")
- GetPlayerWeaponClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponClip")
- GetPlayerWeaponTotalClip_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponTotalClip")
- GetPlayerWeaponState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerWeaponState")
- GetPlayerState_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerState")
- GetVehiclePointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehiclePointer")
- GetVehicleModelId_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelId")
- GetVehicleModelName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelName")
- GetVehicleModelNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleModelNameById")
- GetVehicleType_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleType")
- GetVehicleHealth_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleHealth")
- GetVehicleRadioStation_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStation")
- GetVehicleRadioStationName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleRadioStationName")
- GetVehicleFreeSeats_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFreeSeats")
- GetVehicleSpeed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSpeed")
- GetVehicleFirstColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleFirstColor")
- GetVehicleSecondColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleSecondColor")
- GetVehicleColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColor")
- GetVehicleColorRGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorRGB")
- GetVehicleColorARGB_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetVehicleColorARGB")
- IsPlayerInAnyVehicle_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInAnyVehicle")
- IsPlayerDriver_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerDriver")
- IsPlayerPassenger_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerPassenger")
- IsVehicleSeatUsed_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSeatUsed")
- IsVehicleLocked_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLocked")
- IsVehicleSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleSirenEnabled")
- IsVehicleHornEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleHornEnabled")
- IsVehicleAlternateSirenEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleAlternateSirenEnabled")
- IsVehicleEngineEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleEngineEnabled")
- IsVehicleLightEnabled_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsVehicleLightEnabled")
- IsPlayerInCar_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInCar")
- IsPlayerInPlane_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInPlane")
- IsPlayerInBoat_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBoat")
- IsPlayerInTrain_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInTrain")
- IsPlayerInBike_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_IsPlayerInBike")
- SetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetCallbackPointer")
- UnSetCallbackPointer_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetCallbackPointer")
- SetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_SetListenCallback")
- UnSetListenCallback_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallback")
- UnSetListenCallbackAll_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UnSetListenCallbackAll")
- UpdateServerData_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_UpdateServerData")
- GetPlayerNameById_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerNameById")
- GetPlayerIdByName_func := DllCall("GetProcAddress", UInt, hModule, Str, "API_GetPlayerIdByName")
- ReadMemory(addr, size, ByRef data)
- {
- global ReadMemory_func
- VarSetCapacity(data,size)
- res := DllCall(ReadMemory_func, UInt, addr, UInt, size, StrP, data)
- return res
- }
- WriteMemory(addr, size, data)
- {
- global WriteMemory_func
- res := DllCall(WriteMemory_func, UInt, addr, UInt, size, Str, data)
- return res
- }
- GetBasePointer(dll)
- {
- global GetBasePointer_func
- res :=DllCall(GetBasePointer_func, Str, dll)
- return res
- }
- GetCommandLine(ByRef line)
- {
- global GetCommandLine_func
- VarSetCapacity(line,512,0)
- res := DllCall(GetCommandLine_func, StrP, line)
- return res
- }
- GetLastError()
- {
- global GetLastError_func
- res:=DllCall(GetLastError_func)
- return res
- }
- SetLastError(error)
- {
- global SetLastError_func
- res := DllCall(SetLastError_func, Int, error)
- return res
- }
- SendChat(msg)
- {
- global SendChat_func
- res := DllCall(SendChat_func, Str, msg)
- return res
- }
- ShowGameText(str_Text, int_Time, int_Style)
- {
- global ShowGameText_func
- res := DllCall(ShowGameText_func,Str , str_Text, Int, int_Time, Int, int_Style)
- return res
- }
- AddChatMessage(int_Color, str_Text)
- {
- global AddChatMessage_func
- res := DllCall(AddChatMessage_func, Int, int_Color, Str, str_Text)
- return res
- }
- ShowDialog(style, caption, text, button)
- {
- global ShowDialog_func
- res := DllCall(ShowDialog_func, Int, style, Str, caption, Str, text, Str, button)
- return res
- }
- IsDialogOpen()
- {
- global IsDialogOpen_func
- res := DllCall(IsDialogOpen_func)
- return res
- }
- GetLastDialogId()
- {
- global GetLastDialogId_func
- res := DllCall(GetLastDialogId_func)
- return res
- }
- GetLastDialogType()
- {
- global GetLastDialogType_func
- res := DllCall(GetLastDialogType_func)
- return res
- }
- BlockChatInput(block)
- {
- global BlockChatInput_func
- res := DllCall(BlockChatInput_func,UChar,block)
- return res
- }
- GetChatLine(Line, ByRef Output, timestamp=0, color=0){
- chatindex := 0
- FileRead, file, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- loop, Parse, file, `n, `r
- {
- if(A_LoopField)
- chatindex := A_Index
- }
- loop, Parse, file, `n, `r
- {
- if(A_Index = chatindex - line){
- output := A_LoopField
- break
- }
- }
- file := ""
- if(!timestamp)
- output := RegExReplace(output, "U)^\[\d{2}:\d{2}:\d{2}\]")
- if(!color)
- output := RegExReplace(output, "Ui)\{[a-f0-9]{6}\}")
- return
- }
- GetChatLineFromFile(id, ByRef line)
- {
- global GetChatLineFromFile_func
- VarSetCapacity(line,256,0)
- res := DllCall(GetChatLineFromFile_func,Int,id,StrP,line)
- return res
- }
- IsChatOpen()
- {
- global IsChatOpen_func
- res := DllCall(IsChatOpen_func)
- return res
- }
- GetScreenSizeX()
- {
- global GetScreenSizeX_func
- res := DllCall(GetScreenSizeX_func)
- return res
- }
- GetScreenSizeY()
- {
- global GetScreenSizeY_func
- res := DllCall(GetScreenSizeY_func)
- return res
- }
- GetCurrentWeatherId()
- {
- global GetCurrentWeatherId_func
- res := DllCall(GetCurrentWeatherId_func)
- return res
- }
- GetZoneName( ByRef str_ZoneName)
- {
- global GetZoneName_func
- VarSetCapacity(str_ZoneName, 32)
- res := DllCall(GetZoneName_func, StrP, str_ZoneName)
- return res
- }
- GetCityName( ByRef str_CityName)
- {
- global GetCityName_func
- VarSetCapacity(str_CityName, 32)
- res := DllCall(GetCityName_func, StrP, str_CityName)
- return res
- }
- GetZoneNameByCoords(x, y, ByRef str_ZoneName)
- {
- global GetZoneNameByCoords_func
- VarSetCapacity(str_ZoneName, 32)
- res := DllCall(GetZoneNameByCoords_func, Float, x, Float, y, StrP, str_ZoneName)
- return res
- }
- GetCityNameByCoords(x, y, ByRef str_CityName)
- {
- global GetCityNameByCoords_func
- VarSetCapacity(str_CityName, 32)
- res := DllCall(GetCityNameByCoords_func, Float, x, Float, y, StrP, str_CityName)
- return res
- }
- GetMarkerPos(ByRef x, ByRef y, ByRef z)
- {
- global GetMarkerPos_func
- res := DllCall(GetMarkerPos_func, FloatP, x, FloatP, y, FloatP, z)
- return res
- }
- GetLastMousePosOnMenuMap(ByRef x, ByRef y)
- {
- global GetLastMousePosOnMenuMap_func
- res := DllCall(GetLastMousePosOnMenuMap_func, FloatP, x, FloatP, y)
- return res
- }
- GetMapMarkerPos(ByRef x, ByRef y)
- {
- global GetMapMarkerPos_func
- res := DllCall(GetMapMarkerPos_func, FloatP, x, FloatP, y)
- return res
- }
- FindGroundZForPosition(x,y)
- {
- global FindGroundZForPosition_func
- res := DllCall(FindGroundZForPosition_func, Float, x, Float, y, "Cdecl float")
- return res
- }
- WorldToScreen(worldX, worldY, worldZ, ByRef screenX, ByRef screenY)
- {
- global WorldToScreen_func
- res := DllCall(WorldToScreen_func, Float, worldX, Float, worldY, Float, worldZ, FloatP, screenX, FloatP, screenY)
- return res
- }
- ScreenToWorld(screenX, screenY, ByRef worldX, ByRef worldY, ByRef worldZ)
- {
- global ScreenToWorld_func
- res := DllCall(ScreenToWorld_func, Float, screenX, Float, screenY, FloatP, worldX, FloatP, worldY, FloatP, worldZ)
- return res
- }
- RegisterTextBind(str_TextBind, float_PosX, float_PosY, float_PosZ, float_Radius, int_Delay, int_Loop, int_GroupId, int_isChild, int_Timeout)
- {
- global RegisterTextBind_func
- 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)
- return res
- }
- UnregisterTextBind(int_TextBindId)
- {
- global UnregisterTextBind_func
- res := DllCall(UnregisterTextBind_func, Int, int_TextBindId)
- return res
- }
- UnregisterAllTextBinds()
- {
- global UnregisterAllTextBinds_func
- res := DllCall(UnregisterAllTextBinds_func)
- return res
- }
- TextBindTimer(int_TextBindSleep)
- {
- global TextBindTimer_func
- res := DllCall(TextBindTimer_func, Int, int_TextBindSleep)
- return res
- }
- IsMenuOpen()
- {
- global IsMenuOpen_func
- res := DllCall(IsMenuOpen_func)
- return res
- }
- GetPlayerId()
- {
- global GetPlayerId_func
- res := DllCall(GetPlayerId_func)
- return res
- }
- GetPlayerName(ByRef szName)
- {
- global GetPlayerName_func
- VarSetCapacity(szName,25)
- res := DllCall(GetPlayerName_func, StrP, szName)
- return res
- }
- GetServerIp(ByRef szHost)
- {
- global GetServerIp_func
- VarSetCapacity(szHost, 30)
- res := DllCall(GetServerIp_func, StrP, szHost)
- return res
- }
- GetServerPort()
- {
- global GetServerPort_func
- res := DllCall(GetServerPort_func)
- return res
- }
- GetPlayerCPed()
- {
- global GetPlayerCPed_func
- res :=DllCall(GetPlayerCPed_func)
- return res
- }
- GetPlayerHealth()
- {
- global GetPlayerHealth_func
- res := DllCall(GetPlayerHealth_func)
- return res
- }
- GetPlayerArmor()
- {
- global GetPlayerArmor_func
- res := DllCall(GetPlayerArmor_func)
- return res
- }
- GetPlayerMoney()
- {
- global GetPlayerMoney_func
- res := DllCall(GetPlayerMoney_func)
- return res
- }
- GetPlayerWanteds()
- {
- global GetPlayerWanteds_func
- res := DllCall(GetPlayerWanteds_func)
- return res
- }
- GetPlayerPosition(ByRef flo_posX, ByRef flo_posY, ByRef flo_posZ, ByRef flo_Rotation)
- {
- global GetPlayerPosition_func
- res := DllCall(GetPlayerPosition_func, FloatP, flo_posX, FloatP, flo_posY, FloatP, flo_posZ, FloatP, flo_Rotation)
- return res
- }
- IsPlayerInRangeOfPoint(flo_posX, flo_posY, flo_posZ, flo_posRadius)
- {
- global IsPlayerInRangeOfPoint_func
- res := DllCall(IsPlayerInRangeOfPoint_func, Float, flo_posX, Float, flo_posY, Float, flo_posZ, Float, flo_posRadius)
- return res
- }
- IsPlayerInRangeOfPoint2D(flo_posX, flo_posY, flo_posRadius)
- {
- global IsPlayerInRangeOfPoint2D_func
- res := DllCall(IsPlayerInRangeOfPoint2D_func, Float, flo_posX, Float, flo_posY, Float, flo_posRadius)
- return res
- }
- IsPlayerInAnyInterior()
- {
- global IsPlayerInAnyInterior_func
- res := DllCall(IsPlayerInAnyInterior_func)
- return res
- }
- IsPlayerFrozen()
- {
- global IsPlayerFrozen_func
- res := DllCall(IsPlayerFrozen_func)
- return res
- }
- GetPlayerWeaponSlot()
- {
- global GetPlayerWeaponSlot_func
- res := DllCall(GetPlayerWeaponSlot_func)
- return res
- }
- GetPlayerWeaponId(int_WeaponSlot)
- {
- global GetPlayerWeaponId_func
- res := DllCall(GetPlayerWeaponId_func, Int, int_WeaponSlot)
- return res
- }
- GetPlayerWeaponName(int_WeaponSlot, ByRef str_WeapName)
- {
- global GetPlayerWeaponName_func
- VarSetCapacity(str_WeapName, 32)
- res := DllCall(GetPlayerWeaponName_func, Int, int_WeaponSlot, StrP, str_WeapName)
- return res
- }
- GetPlayerWeaponClip(int_WeaponSlot)
- {
- global GetPlayerWeaponClip_func
- res := DllCall(GetPlayerWeaponClip_func, Int, int_WeaponSlot)
- return res
- }
- GetPlayerWeaponTotalClip(int_WeaponSlot)
- {
- global GetPlayerWeaponTotalClip_func
- res := DllCall(GetPlayerWeaponTotalClip_func, Int, int_WeaponSlot)
- return res
- }
- GetPlayerWeaponState()
- {
- global GetPlayerWeaponState_func
- res := DllCall(GetPlayerWeaponState_func)
- return res
- }
- GetPlayerState()
- {
- global GetPlayerState_func
- res := DllCall(GetPlayerState_func)
- return res
- }
- GetVehiclePointer()
- {
- global GetVehiclePointer_func
- res := DllCall(GetVehiclePointer_func)
- return res
- }
- GetVehicleModelId()
- {
- global GetVehicleModelId_func
- res := DllCall(GetVehicleModelId_func)
- return res
- }
- GetVehicleModelName(ByRef str_VehicleName)
- {
- global GetVehicleModelName_func
- VarSetCapacity(str_VehicleName, 32)
- res := DllCall(GetVehicleModelName_func, StrP, str_VehicleName)
- return res
- }
- GetVehicleModelNameById(int_VehicleId, ByRef str_VehicleName)
- {
- global GetVehicleModelNameById_func
- VarSetCapacity(str_VehicleName, 32)
- res := DllCall(GetVehicleModelNameById_func, Int, int_VehicleId, StrP, str_VehicleName)
- return res
- }
- GetVehicleType()
- {
- global GetVehicleType_func
- res := DllCall(GetVehicleType_func)
- return res
- }
- GetVehicleHealth()
- {
- global GetVehicleHealth_func
- res := DllCall(GetVehicleHealth_func)
- return res
- }
- GetVehicleRadioStation()
- {
- global GetVehicleRadioStation_func
- res := DllCall(GetVehicleRadioStation_func)
- return res
- }
- GetVehicleRadioStationName(ByRef str_RadioName)
- {
- global GetVehicleRadioStationName_func
- VarSetCapacity(str_RadioName, 32)
- res := DllCall(GetVehicleRadioStationName_func, StrP, str_RadioName)
- return res
- }
- GetVehicleFreeSeats(ByRef int_SeatFL, ByRef int_SeatFR, ByRef int_SeatBL, ByRef int_SeatBR)
- {
- global GetVehicleFreeSeats_func
- res := DllCall(GetVehicleFreeSeats_func, IntP, int_SeatFL, IntP, int_SeatFR, IntP, int_SeatBL, IntP, int_SeatBR)
- return res
- }
- GetVehicleSpeed(float_SpeedMult)
- {
- global GetVehicleSpeed_func
- res := DllCall(GetVehicleSpeed_func, Float, float_SpeedMult)
- return res
- }
- GetVehicleFirstColor()
- {
- global GetVehicleFirstColor_func
- res := DllCall(GetVehicleFirstColor_func)
- return res
- }
- GetVehicleSecondColor()
- {
- global GetVehicleSecondColor_func
- res := DllCall(GetVehicleSecondColor_func)
- return res
- }
- GetVehicleColor(ByRef int_ColorFirst, ByRef int_ColorSecond)
- {
- global GetVehicleColor_func
- res := DllCall(GetVehicleColor_func, IntP, int_ColorFirst, IntP, int_ColorSecond)
- return res
- }
- GetVehicleColorRGB(int_Color, ByRef uint_ColorRGB)
- {
- global GetVehicleColorRGB_func
- res := DllCall(GetVehicleColorRGB_func, Int, int_Color, UIntP, uint_ColorRGB)
- return res
- }
- GetVehicleColorARGB(int_Color, ByRef uint_ColorARGB)
- {
- global GetVehicleColorARGB_func
- res := DllCall(GetVehicleColorARGB_func, Int, int_Color, UIntP, uint_ColorARGB)
- return res
- }
- IsPlayerInAnyVehicle()
- {
- global IsPlayerInAnyVehicle_func
- res := DllCall(IsPlayerInAnyVehicle_func)
- return res
- }
- IsPlayerDriver()
- {
- global IsPlayerDriver_func
- res := DllCall(IsPlayerDriver_func)
- return res
- }
- IsPlayerPassenger()
- {
- global IsPlayerPassenger_func
- res := DllCall(IsPlayerPassenger_func)
- return res
- }
- IsVehicleSeatUsed(int_SeatId)
- {
- global IsVehicleSeatUsed_func
- res := DllCall(IsVehicleSeatUsed_func, int, int_SeatId)
- return res
- }
- IsVehicleLocked()
- {
- global IsVehicleLocked_func
- res := DllCall(IsVehicleLocked_func)
- return res
- }
- IsVehicleSirenEnabled()
- {
- global IsVehicleSirenEnabled_func
- res := DllCall(IsVehicleSirenEnabled_func)
- return res
- }
- IsVehicleHornEnabled()
- {
- global IsVehicleHornEnabled_func
- res := DllCall(IsVehicleHornEnabled_func)
- return res
- }
- IsVehicleAlternateSirenEnabled()
- {
- global IsVehicleAlternateSirenEnabled_func
- res := DllCall(IsVehicleAlternateSirenEnabled_func)
- return res
- }
- IsVehicleEngineEnabled()
- {
- global IsVehicleEngineEnabled_func
- res := DllCall(IsVehicleEngineEnabled_func)
- return res
- }
- IsVehicleLightEnabled()
- {
- global IsVehicleLightEnabled_func
- res := DllCall(IsVehicleLightEnabled_func)
- return res
- }
- IsPlayerInCar()
- {
- global IsPlayerInCar_func
- res := DllCall(IsPlayerInCar_func)
- return res
- }
- IsPlayerInPlane()
- {
- global IsPlayerInPlane_func
- res := DllCall(IsPlayerInPlane_func)
- return res
- }
- IsPlayerInBoat()
- {
- global IsPlayerInBoat_func
- res := DllCall(IsPlayerInBoat_func)
- return res
- }
- IsPlayerInTrain()
- {
- global IsPlayerInTrain_func
- res := DllCall(IsPlayerInTrain_func)
- return res
- }
- IsPlayerInBike()
- {
- global IsPlayerInBike_func
- res := DllCall(IsPlayerInBike_func)
- return res
- }
- SetListenCallback(int_Id)
- {
- global SetListenCallback_func
- res := DllCall(SetListenCallback_func, Int, int_Id)
- return res
- }
- UnSetCallbackPointer()
- {
- global UnSetCallbackPointer_func
- res := DllCall(UnSetCallbackPointer_func)
- return res
- }
- SetCallbackPointer(int_Id)
- {
- global SetCallbackPointer_func
- res := DllCall(SetCallbackPointer_func, Int, int_Id)
- return res
- }
- UnSetListenCallback(int_Id)
- {
- global UnSetListenCallback_func
- res := DllCall(UnSetListenCallback_func, Int, int_Id)
- return res
- }
- UnSetListenCallbackAll()
- {
- global UnSetListenCallbackAll_func
- res := DllCall(UnSetListenCallbackAll_func)
- return res
- }
- GetCallbackHealParams(ptr_HealStruct, ByRef iOldHeal, ByRef iNewHeal)
- {
- ioldHeal := NumGet(ptr_HealStruct+0, "int")
- inewHeal := NumGet(ptr_HealStruct+4, "int")
- }
- GetCallbackArmorParams(ptr_ArmorStruct, ByRef iOldArmor, ByRef iNewArmor)
- {
- ioldArmor := NumGet(ptr_ArmorStruct+0, "int")
- inewArmor := NumGet(ptr_ArmorStruct+4, "int")
- }
- UrlDownloadToVar(URL, ByRef Result, UserAgent = "", Proxy = "", ProxyBypass = "")
- {
- hModule := DllCall("LoadLibrary", "Str", "wininet.dll")
- AccessType := Proxy != "" ? 3 : 1
- io := DllCall("wininet\InternetOpenA"
- , "Str", UserAgent
- , "UInt", AccessType
- , "Str", Proxy
- , "Str", ProxyBypass
- , "UInt", 0)
- iou := DllCall("wininet\InternetOpenUrlA"
- , "UInt", io
- , "Str", url
- , "Str", ""
- , "UInt", 0
- , "UInt", 0x80000000
- , "UInt", 0)
- If (ErrorLevel != 0 or iou = 0) {
- DllCall("FreeLibrary", "UInt", hModule)
- return 0
- }
- VarSetCapacity(buffer, 10240, 0)
- VarSetCapacity(BytesRead, 4, 0)
- Loop
- {
- irf := DllCall("wininet\InternetReadFile", "UInt", iou, "UInt", &buffer, "UInt", 10240, "UInt", &BytesRead)
- VarSetCapacity(buffer, -1)
- BytesRead_ = 0
- Loop, 4
- BytesRead_ += *(&BytesRead + A_Index-1) << 8*(A_Index-1)
- If (irf = 1 and BytesRead_ = 0)
- break
- Else
- Result .= SubStr(buffer, 1, BytesRead_)
- }
- DllCall("wininet\InternetCloseHandle", "UInt", iou)
- DllCall("wininet\InternetCloseHandle", "UInt", io)
- DllCall("FreeLibrary", "UInt", hModule)
- }
- GetCallbackPositionParams(ptr_PositionStruct, ByRef fOldPosX, ByRef fOldPosY, ByRef fOldPosZ, ByRef fOldPosR, ByRef fNewPosX, ByRef fNewPosY, ByRef fNewPosZ, ByRef fNewPosR)
- {
- fOldPosX := NumGet(ptr_PositionStruct+0, "float")
- fOldPosY := NumGet(ptr_PositionStruct+4, "float")
- fOldPosZ := NumGet(ptr_PositionStruct+8, "float")
- fOldPosR := NumGet(ptr_PositionStruct+12, "float")
- fNewPosX := NumGet(ptr_PositionStruct+16, "float")
- fNewPosY := NumGet(ptr_PositionStruct+20, "float")
- fNewPosZ := NumGet(ptr_PositionStruct+24, "float")
- fNewPosR := NumGet(ptr_PositionStruct+28, "float")
- }
- GetCallbackEnterExitParams(ptr_EnterExitStruct, ByRef iOldInteriorState, ByRef iNewInteriorState)
- {
- iOldInteriorState := NumGet(ptr_EnterExitStruct+0, "int")
- iNewInteriorState := NumGet(ptr_EnterExitStruct+4, "int")
- }
- GetCallbackVehicleEnterExitParams(ptr_VehicleEnterExitStruct, ByRef iOldVehicleEnterExit, ByRef iNewVehicleEnterExit)
- {
- iOldVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+0, "int")
- iNewVehicleEnterExit := NumGet(ptr_VehicleEnterExitStruct+4, "int")
- }
- GetCallbackVehicleHealthParams(ptr_VehicleHealthStruct, ByRef iOldVehicleHealth, ByRef iNewVehicleHealth)
- {
- iOldVehicleHealth := NumGet(ptr_VehicleHealthStruct+0, "int")
- iNewVehicleHealth := NumGet(ptr_VehicleHealthStruct+4, "int")
- }
- GetCallbackVehicleEngineParams(ptr_VehicleEngineStruct, ByRef iOldVehicleEngine, ByRef iNewVehicleEngine)
- {
- iOldVehicleEngine := NumGet(ptr_VehicleEngineStruct+0, "int")
- iNewVehicleEngine := NumGet(ptr_VehicleEngineStruct+4, "int")
- }
- GetCallbackVehicleLockParams(ptr_VehicleLockStruct, ByRef iOldVehicleLock, ByRef iNewVehicleLock)
- {
- iOldVehicleLock := NumGet(ptr_VehicleLockStruct+0, "int")
- iNewVehicleLock := NumGet(ptr_VehicleLockStruct+4, "int")
- }
- GetCallbackVehicleSpeedParams(ptr_VehicleSpeedStruct, ByRef iOldVehicleSpeed, ByRef iNewVehicleSpeed)
- {
- iOldVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+0, "int")
- iNewVehicleSpeed := NumGet(ptr_VehicleSpeedStruct+4, "int")
- }
- GetCallbackWeaponSwitchParams(ptr_WeaponSwitchStruct, ByRef iOldWeaponId, ByRef iNewWeaponId)
- {
- iOldWeaponId := NumGet(ptr_WeaponSwitchStruct+0, "int")
- iNewWeaponId := NumGet(ptr_WeaponSwitchStruct+4, "int")
- }
- GetCallbackWeaponClipParams(ptr_WeaponClipStruct, ByRef iOldWeaponClip, ByRef iNewWeaponClip)
- {
- iOldWeaponClip := NumGet(ptr_WeaponClipStruct+0, "int")
- iNewWeaponClip := NumGet(ptr_WeaponClipStruct+4, "int")
- }
- GetCallbackWeaponTotalClipParams(ptr_WeaponTotalClipStruct, ByRef iOldWeaponTotalClip, ByRef iNewWeaponTotalClip)
- {
- iOldWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+0, "int")
- iNewWeaponTotalClip := NumGet(ptr_WeaponTotalClipStruct+4, "int")
- }
- UpdateServerData()
- {
- global UpdateServerData_func
- res := DllCall(UpdateServerData_func)
- return res
- }
- GetPlayerNameById(id,ByRef name)
- {
- VarSetCapacity(name,24,0)
- global GetPlayerNameById_func
- res := DllCall(GetPlayerNameById_func,UShort,id,StrP,name)
- return res
- }
- GetPlayerIdByName2(name)
- {
- global GetPlayerIdByName2_func
- res := DllCall(GetPlayerIdByName2_func,Str,name)
- return res
- }
- DecimalToHex(Var){
- SetFormat, IntegerFast, hex
- Dec2Hex += Var
- Dec2Hex .= ""
- SetFormat, IntegerFast, d
- StringTrimLeft, Dec2Hex, Dec2Hex, 2
- StringUpper, Dec2Hex, Dec2Hex
- sDec2Hex .= Dec2Hex
- return sDec2Hex
- }
- RelToAbs(root, dir, s = "\") {
- pr := SubStr(root, 1, len := InStr(root, s, "", InStr(root, s . s) + 2) - 1)
- , root := SubStr(root, len + 1), sk := 0
- If InStr(root, s, "", 0) = StrLen(root)
- StringTrimRight, root, root, 1
- If InStr(dir, s, "", 0) = StrLen(dir)
- StringTrimRight, dir, dir, 1
- Loop, Parse, dir, %s%
- {
- If A_LoopField = ..
- StringLeft, root, root, InStr(root, s, "", 0) - 1
- Else If A_LoopField =
- root =
- Else If A_LoopField != .
- Continue
- StringReplace, dir, dir, %A_LoopField%%s%
- }
- Return, pr . root . s . dir
- }
- PATH_OVERLAY := RelToAbs(A_ScriptDir, "dx9_overlay.dll")
- h2Module := DllCall("LoadLibrary", Str, PATH_OVERLAY)
- if(h2Module == -1 || h2Module == 0)
- {
- MsgBox, 48, Error, Die dx9_overlay.dll konnte nicht gefunden werden. `nDer Keybinder wird nun beendet.
- ExitApp
- }
- Init_func := DllCall("GetProcAddress", UInt, h2Module, Str, "Init")
- SetParam_func := DllCall("GetProcAddress", UInt, h2Module, Str, "SetParam")
- TextCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextCreate")
- TextDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextDestroy")
- TextSetShadow_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShadow")
- TextSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetShown")
- TextSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetColor")
- TextSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetPos")
- TextSetString_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextSetString")
- TextUpdate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "TextUpdate")
- BoxCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxCreate")
- BoxDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxDestroy")
- BoxSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetShown")
- BoxSetBorder_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorder")
- BoxSetBorderColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetBorderColor")
- BoxSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetColor")
- BoxSetHeight_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetHeight")
- BoxSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetPos")
- BoxSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "BoxSetWidth")
- LineCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineCreate")
- LineDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineDestroy")
- LineSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetShown")
- LineSetColor_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetColor")
- LineSetWidth_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetWidth")
- LineSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "LineSetPos")
- ImageCreate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageCreate")
- ImageDestroy_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageDestroy")
- ImageSetShown_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetShown")
- ImageSetAlign_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetAlign")
- ImageSetPos_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetPos")
- ImageSetRotation_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ImageSetRotation")
- DestroyAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "DestroyAllVisual")
- ShowAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "ShowAllVisual")
- HideAllVisual_func := DllCall("GetProcAddress", UInt, h2Module, Str, "HideAllVisual")
- GetFrameRate_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetFrameRate")
- GetScreenSpecs_func := DllCall("GetProcAddress", UInt, h2Module, Str, "GetScreenSpecs")
- Init()
- {
- global Init_func
- res := DllCall(Init_func)
- return res
- }
- SetParam(str_Name, str_Value)
- {
- global SetParam_func
- res := DllCall(SetParam_func, Str, str_Name, Str, str_Value)
- return res
- }
- TextCreate(Font, fontsize, bold, italic, x, y, color, text, shadow, show)
- {
- global TextCreate_func
- res := DllCall(TextCreate_func,Str,Font,Int,fontsize,UChar,bold,UChar,italic,Int,x,Int,y,UInt,color,Str,text,UChar,shadow,UChar,show)
- return res
- }
- TextDestroy(id)
- {
- global TextDestroy_func
- res := DllCall(TextDestroy_func,Int,id)
- return res
- }
- TextSetShadow(id, shadow)
- {
- global TextSetShadow_func
- res := DllCall(TextSetShadow_func,Int,id,UChar,shadow)
- return res
- }
- TextSetShown(id, show)
- {
- global TextSetShown_func
- res := DllCall(TextSetShown_func,Int,id,UChar,show)
- return res
- }
- TextSetColor(id,color)
- {
- global TextSetColor_func
- res := DllCall(TextSetColor_func,Int,id,UInt,color)
- return res
- }
- TextSetPos(id,x,y)
- {
- global TextSetPos_func
- res := DllCall(TextSetPos_func,Int,id,Int,x,Int,y)
- return res
- }
- TextSetString(id,Text)
- {
- global TextSetString_func
- res := DllCall(TextSetString_func,Int,id,Str,Text)
- return res
- }
- TextUpdate(id,Font,Fontsize,bold,italic)
- {
- global TextUpdate_func
- res := DllCall(TextUpdate_func,Int,id,Str,Font,int,Fontsize,UChar,bold,UChar,italic)
- return res
- }
- BoxCreate(x,y,width,height,Color,show)
- {
- global BoxCreate_func
- res := DllCall(BoxCreate_func,Int,x,Int,y,Int,width,Int,height,UInt,Color,UChar,show)
- return res
- }
- BoxDestroy(id)
- {
- global BoxDestroy_func
- res := DllCall(BoxDestroy_func,Int,id)
- return res
- }
- BoxSetShown(id,Show)
- {
- global BoxSetShown_func
- res := DllCall(BoxSetShown_func,Int,id,UChar,Show)
- return res
- }
- BoxSetBorder(id,height,Show)
- {
- global BoxSetBorder_func
- res := DllCall(BoxSetBorder_func,Int,id,Int,height,Int,Show)
- return res
- }
- BoxSetBorderColor(id,Color)
- {
- global BoxSetBorderColor_func
- res := DllCall(BoxSetBorderColor_func,Int,id,UInt,Color)
- return res
- }
- BoxSetColor(id,Color)
- {
- global BoxSetColor_func
- res := DllCall(BoxSetColor_func,Int,id,UInt,Color)
- return res
- }
- BoxSetHeight(id,height)
- {
- global BoxSetHeight_func
- res := DllCall(BoxSetHeight_func,Int,id,Int,height)
- return res
- }
- BoxSetPos(id,x,y)
- {
- global BoxSetPos_func
- res := DllCall(BoxSetPos_func,Int,id,Int,x,Int,y)
- return res
- }
- BoxSetWidth(id,width)
- {
- global BoxSetWidth_func
- res := DllCall(BoxSetWidth_func,Int,id,Int,width)
- return res
- }
- LineCreate(x1,y1,x2,y2,width,color,show)
- {
- global LineCreate_func
- res := DllCall(LineCreate_func,Int,x1,Int,y1,Int,x2,Int,y2,Int,Width,UInt,color,UChar,show)
- return res
- }
- LineDestroy(id)
- {
- global LineDestroy_func
- res := DllCall(LineDestroy_func,Int,id)
- return res
- }
- LineSetShown(id,show)
- {
- global LineSetShown_func
- res := DllCall(LineSetShown_func,Int,id,UChar,show)
- return res
- }
- LineSetColor(id,color)
- {
- global LineSetColor_func
- res := DllCall(LineSetColor_func,Int,id,UInt,color)
- return res
- }
- LineSetWidth(id, width)
- {
- global LineSetWidth_func
- res := DllCall(LineSetWidth_func,Int,id,Int,width)
- return res
- }
- LineSetPos(id,x1,y1,x2,y2)
- {
- global LineSetPos_func
- res := DllCall(LineSetPos_func,Int,id,Int,x1,Int,y1,Int,x2,Int,y2)
- return res
- }
- ImageCreate(path, x, y, rotation, align, show)
- {
- global ImageCreate_func
- res := DllCall(ImageCreate_func, Str, path, Int, x, Int, y, Int, rotation, Int, align, UChar, show)
- return res
- }
- ImageDestroy(id)
- {
- global ImageDestroy_func
- res := DllCall(ImageDestroy_func,Int,id)
- return res
- }
- ImageSetShown(id,show)
- {
- global ImageSetShown_func
- res := DllCall(ImageSetShown_func,Int,id,UChar,show)
- return res
- }
- ImageSetAlign(id,align)
- {
- global ImageSetAlign_func
- res := DllCall(ImageSetAlign_func,Int,id,Int,align)
- return res
- }
- ImageSetPos(id, x, y)
- {
- global ImageSetPos_func
- res := DllCall(ImageSetPos_func,Int,id,Int,x, Int, y)
- return res
- }
- ImageSetRotation(id, rotation)
- {
- global ImageSetRotation_func
- res := DllCall(ImageSetRotation_func,Int,id,Int, rotation)
- return res
- }
- DestroyAllVisual()
- {
- global DestroyAllVisual_func
- res := DllCall(DestroyAllVisual_func)
- return res
- }
- ShowAllVisual()
- {
- global ShowAllVisual_func
- res := DllCall(ShowAllVisual_func)
- return res
- }
- HideAllVisual()
- {
- global HideAllVisual_func
- res := DllCall(HideAllVisual_func )
- return res
- }
- GetFrameRate()
- {
- global GetFrameRate_func
- res := DllCall(GetFrameRate_func )
- return res
- }
- GetScreenSpecs(ByRef width, ByRef height)
- {
- global GetScreenSpecs_func
- res := DllCall(GetScreenSpecs_func, IntP, width, IntP, height)
- return res
- }
- GetPlayerMarkerPosition(ByRef posX, ByRef posY, ByRef posZ)
- {
- exe := OpenMemoryfromTitle_("GTA:SA:MP")
- posX := ReadMemory_(exe,0xC7DEC8,"Float")
- posY := ReadMemory_(exe,0xC7DECC,"Float")
- posZ := ReadMemory_(exe, 0xC7DED0,"Float")
- CloseMemory_(exe)
- }
- OpenMemoryfromTitle_(title,right=0x1F0FFF)
- {
- WinGet,PID,PID,%title%
- HWND := DllCall("OpenProcess","Uint",right,"int",0,"int",PID)
- return HWND
- }
- IsPlayerInRangeOfPoint_fast(x, y, z, r)
- {
- static pos_x, pos_y, pos_z, lastcalled
- if(lastcalled < A_TickCount - 150){
- GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
- lastcalled := A_TickCount
- }
- d := sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
- if(d < r)
- return 1
- return 0
- }
- IsPlayerInRangeOfPoint2D_fast(x, y, r){
- static pos_x, pos_y, lastcalled
- if(lastcalled < A_TickCount - 150){
- GetPlayerPosition(pos_x, pos_y, pos_z, pos_r)
- lastcalled := A_TickCount
- }
- d := sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2)
- if(d < r)
- return 1
- return 0
- }
- CloseMemory_(hwnd)
- {
- return DllCall("CloseHandle", "int", hwnd)
- }
- ReadMemory_(hwnd,address,datatype="int",length=4,offset=0)
- {
- VarSetCapacity(readvalue,length, 0)
- DllCall("ReadProcessMemory","Uint",hwnd,"Uint",address+offset,"Str",readvalue,"Uint",length,"Uint *",0)
- finalvalue := NumGet(readvalue,0,datatype)
- return finalvalue
- }
- GetDistancebetween(x, y, z, pos_x, pos_y, pos_z)
- {
- return sqrt((sqrt((pos_x - x) ** 2 + (pos_y - y) ** 2) ** 2) + (pos_z - z) ** 2)
- }
- SetParam("use_window", "1")
- SetParam("window", "GTA:SA:MP")
- PlayerInput(text){
- s := A_IsSuspended
- Suspend On
- KeyWait Enter
- SendInput t^a{backspace}%text%
- Input, var, v, {enter}
- SendInput ^a{backspace}{enter}
- Sleep, 20
- if(!s)
- Suspend Off
- return var
- }
- ;;;;;;;;;;;;;;;;;;;;
- ;;;;;Funktionen;;;;;
- ;;;;;;;;;;;;;;;;;;;;
- Find2:
- SendChat("/find " . pcID)
- return
- :?:/afind::
- Suspend Permit
- Suspend On
- SendInput, /find{space}
- Input, AID, V I M,{enter}
- Send {enter}
- SetTimer, Find, 6000
- Suspend Off
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF} Das automatische Suchen können Sie mit der Taste '<' deaktivieren.")
- return
- :?:/af::
- Suspend Permit
- Suspend On
- SendInput, /find{space}
- Input, AID, V I M,{enter}
- Send {enter}
- SetTimer, Find, 6000
- Suspend Off
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF} Das automatische Zeigen können Sie mit der Taste '<' deaktivieren.")
- return
- Find:
- SendChat("/find " . AID)
- return
- :?:/ashow::
- :?:/ashowpos::
- Suspend Permit
- Suspend On
- SendInput, /showpos{space}
- Input, AID, V I M,{enter}
- Send {enter}
- SetTimer, Show, 6000
- Suspend Off
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF} Das automatische Zeigen können Sie mit der Taste '<' deaktivieren.")
- return
- :?:/as::
- Suspend Permit
- Suspend On
- SendInput, /showpos{space}
- Input, AID, V I M,{enter}
- Send {enter}
- SetTimer, Show, 6000
- Suspend Off
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF} Das automatische Zeigen können Sie mit der Taste '<' deaktivieren.")
- return
- Show:
- SendChat("/showpos " . AID)
- return
- ~<::
- if(IsInChat())
- {
- return
- }
- SetTimer, Find, Off
- SetTimer, Show, Off
- SetTimer, Find2, Off
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}Automatisches System deaktiviert.")
- return
- :?:/vkn::
- :?:/verkaufen::
- Suspend Permit
- d:=GetPlayerMoney()
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}Fische werden verkauft ...")
- sendChat("/sell fish 1")
- sendChat("/sell fish 2")
- sleep, 1000
- sendChat("/sell fish 3")
- sendChat("/sell fish 4")
- sleep, 1000
- sendChat("/sell fish 5")
- sleep, 1000
- n:=GetPlayerMoney()
- IniRead, FishMoney, Statistiken.ini, Statistiken, FishMoney
- FishMoney += n-d
- IniWrite, %FishMoney%, Statistiken.ini, Statistiken, FishMoney
- sleep, 250
- IniRead, FishMoney, Statistiken.ini, Statistiken, FishMoney
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}Verdienst:{FF0303} " n-d "$ {FFFFFF}Gesamt Verdienst:{FF0303} " . FishMoney . "$")
- return
- :?:/angeln::
- :?:/fischen::
- Suspend Permit
- SendInput {Escape}
- Spam := 0
- Loop
- {
- SendChat("/fish")
- Sleep 250
- GetChatLine(1, chat1)
- GetChatLine(0, chat)
- 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."))
- {
- break
- }
- 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!") )
- {
- Spam := Spam+1
- If(Spam == 3)
- {
- Sleep 2000
- }
- }
- Sleep 250
- }
- Suspend off
- return
- :?:/fishes::
- Suspend Permit
- SendChat("/fishes")
- Sleep 250
- GetChatLine(5, fish1)
- GetChatLine(4, fish2)
- GetChatLine(3, fish3)
- GetChatLine(2, fish4)
- GetChatLine(1, fish5)
- RegExMatch(fish1, "\*\* \(1\) Fisch: (.*) \((.*) LBS\)", fisch1_)
- RegExMatch(fish2, "\*\* \(2\) Fisch: (.*) \((.*) LBS\)", fisch2_)
- RegExMatch(fish3, "\*\* \(3\) Fisch: (.*) \((.*) LBS\)", fisch3_)
- RegExMatch(fish4, "\*\* \(4\) Fisch: (.*) \((.*) LBS\)", fisch4_)
- RegExMatch(fish5, "\*\* \(5\) Fisch: (.*) \((.*) LBS\)", fisch5_)
- HP1 = %fisch1_2%
- HP1*=0.3
- HP1 := Floor(HP1)
- HP2 = %fisch2_2%
- HP2*=0.3
- HP2 := Floor(HP2)
- HP3 = %fisch3_2%
- HP3*=0.3
- HP3 := Floor(HP3)
- HP4 = %fisch4_2%
- HP4*=0.3
- HP4 := Floor(HP4)
- HP5 = %fisch5_2%
- HP5*=0.3
- HP5 := Floor(HP5)
- Gesamt := HP1 + HP2 + HP3 + HP4 + HP5
- Wert1 := FischPreis(fisch1_1, fisch1_2)
- Wert2 := FischPreis(fisch2_1, fisch2_2)
- Wert3 := FischPreis(fisch3_1, fisch3_2)
- Wert4 := FischPreis(fisch4_1, fisch4_2)
- Wert5 := FischPreis(fisch5_1, fisch5_2)
- Gesamt1 := Wert1 + Wert2 + Wert3 + Wert4 + Wert5
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- AddChatMessage(0xFFFFFF, "{FFFFFF}")
- sleep, 200
- AddChatMessage(0xFFFFFF, "{FFFFFF}------------------------{FF0303}[TC-Binder]{FFFFFF}------------------------")
- AddChatMessage(0xFFFFFF, "{FF0303}**{FFFFFF} Deine gefangenen Fische:")
- AddChatMessage(0xFFFFFF, "{FF0303}** (1) {FFFFFF}" fisch1_1 " ({FF0303}" fisch1_2 " LBS{FFFFFF}) | {FF0303}" Wert1 "$ {FFFFFF}|{FF0303} " HP1 " HP")
- AddChatMessage(0xFFFFFF, "{FF0303}** (2) {FFFFFF}" fisch2_1 " ({FF0303}" fisch2_2 " LBS{FFFFFF}) | {FF0303}" Wert2 "$ {FFFFFF}|{FF0303} " HP2 " HP")
- AddChatMessage(0xFFFFFF, "{FF0303}** (3) {FFFFFF}" fisch3_1 " ({FF0303}" fisch3_2 " LBS{FFFFFF}) | {FF0303}" Wert3 "$ {FFFFFF}|{FF0303} " HP3 " HP")
- AddChatMessage(0xFFFFFF, "{FF0303}** (4) {FFFFFF}" fisch4_1 " ({FF0303}" fisch4_2 " LBS{FFFFFF}) | {FF0303}" Wert4 "$ {FFFFFF}|{FF0303} " HP4 " HP")
- AddChatMessage(0xFFFFFF, "{FF0303}** (5) {FFFFFF}" fisch5_1 " ({FF0303}" fisch5_2 " LBS{FFFFFF}) | {FF0303}" Wert5 "$ {FFFFFF}|{FF0303} " HP5 " HP")
- AddChatMessage(0xFFFFFF, "{FFFFFF}---------------------------------------------------------------------")
- AddChatMessage(0xFFFFFF, "{FFFFFF} Gesamt: {FF0303}" Gesamt1 "$ {FFFFFF}oder {FF0303}" Gesamt " HP")
- return
- :?:/afish::
- BilligWert := 1000000000000
- FischNummer := 1
- Weg := 0
- geld := 0
- Loop,
- {
- Sleep,1000
- SendChat("/fish")
- Sleep,200
- GetChatLine(0, Fang)
- If InStr(Fang, "LBS gefangen.")
- {
- RegExMatch(Fang, "Du hast ein/e (.*) mit (.*) LBS gefangen.",fischfang)
- fischfangHP := fischfang2*0.3
- fischfangHP := Floor(fischfangHP)
- Wert := FischPreis(fischfang1, fischfang2)
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}" fischfang1 "{FFFFFF} mit {FF0303}" fischfang2 " LBS ({FF0303}" fischfangHP " HP) {FFFFFF}Wert: {FF0303}" Wert "$")
- geld := (geld+Wert)
- IF(BilligWert>Wert)
- {
- Billig = %FischNummer%
- BilligName = %fischfang1%
- BilligWert = %Wert%
- }
- FischNummer++
- }
- else If InStr(Fang, "Du kannst nur 5 Fische bei dir tragen.")
- {
- IF(Weg == "1")
- {
- break
- }
- geld := (geld-BilligWert)
- SendChat("/releasefish " Billig "")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}" Billig ": {FF0303}" BilligName "{FFFFFF} im Wert von: {FF0303}" BilligWert "$ {FFFFFF} weggeworfen!")
- Weg := 1
- FischNummer := 5
- }
- else If InStr(Fang, "Du bist an keinem Angelplatz (Big Wheel Rods) oder an einem Fischerboot!"){
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}Du kannst hier nicht Angeln!")
- return
- }
- else If InStr(Fang, "Du kannst momentan nicht Angeln. Bitte warte einige Minuten."){
- If (geld > 0){
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}Gesamt Wert {FF0303}" geld "$")
- return
- }
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF}Du kannst noch nicht Angeln!")
- return
- }
- }
- return
- FischPreis(FishName, FishLBS){
- If(FishName == "Delphin")
- Preis := FishLBS*7
- else If(FishName == "Makrele")
- Preis := FishLBS*8
- else If(FishName == "Segelfisch")
- Preis := FishLBS*7
- else If(FishName == "Bernfisch")
- Preis := FishLBS*1
- else If(FishName == "Hai")
- Preis := FishLBS*7
- else If(FishName == "Schwertfisch")
- Preis := FishLBS*3
- else If(FishName == "Schildkröte")
- Preis := FishLBS*10
- else If(FishName == "Thunfisch")
- Preis := FishLBS*12
- else If(FishName == "Hecht")
- Preis := FishLBS*9
- else If(FishName == "Aal")
- Preis := FishLBS*9
- else If(FishName == "Forelle")
- Preis := FishLBS*5
- else If(FishName == "Wolfbarsch")
- Preis := FishLBS*12
- else If(FishName == "Zackenbarsch")
- Preis := FishLBS*3
- else If(FishName == "Katzenfisch")
- Preis := FishLBS*4
- else If(FishName == "Blauer Fächerfisch")
- Preis := FishLBS*4
- else If(FishName == "Roter Schnapper")
- Preis := FishLBS*3
- If(Preis == "")
- Preis := 0
- return Preis
- }
- :?:/cooked::
- :?:/fische::
- Suspend Permit
- SendChat("/cooked")
- Sleep 250
- GetChatLine(5, fish1)
- GetChatLine(4, fish2)
- GetChatLine(3, fish3)
- GetChatLine(2, fish4)
- GetChatLine(1, fish5)
- RegExMatch(fish1, "\*\* \(1\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch1_)
- RegExMatch(fish2, "\*\* \(2\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch2_)
- RegExMatch(fish3, "\*\* \(3\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch3_)
- RegExMatch(fish4, "\*\* \(4\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch4_)
- RegExMatch(fish5, "\*\* \(5\) Hergestellt: gekochten (.*) \((.*) LBS\)", fisch5_)
- HP1 = %fisch1_2%
- HP1*=0.3
- HP1 := Floor(HP1)
- HP2 = %fisch2_2%
- HP2*=0.3
- HP2 := Floor(HP2)
- HP3 = %fisch3_2%
- HP3*=0.3
- HP3 := Floor(HP3)
- HP4 = %fisch4_2%
- HP4*=0.3
- HP4 := Floor(HP4)
- HP5 = %fisch5_2%
- HP5*=0.3
- HP5 := Floor(HP5)
- Gesamt=0
- Gesamt+=%HP1%
- Gesamt+=%HP2%
- Gesamt+=%HP3%
- Gesamt+=%HP4%
- Gesamt+=%HP5%
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}" . fisch1_1 . " (" . fisch1_2 . " LBS) - {FF0303} " . HP1 . " HP")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}" . fisch2_1 . " (" . fisch2_2 . " LBS) - {FF0303} " . HP2 . " HP")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}" . fisch3_1 . " (" . fisch3_2 . " LBS) - {FF0303} " . HP3 . " HP")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}" . fisch4_1 . " (" . fisch4_2 . " LBS) - {FF0303} " . HP4 . " HP")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}" . fisch5_1 . " (" . fisch5_2 . " LBS) - {FF0303} " . HP5 . " HP")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}-----------------------------------------------")
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}Gesamt: {FF0303}" . Gesamt . " HP")
- return
- :?:/kochen::
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}Fische werden gekocht ...")
- sendChat("/cook fish 1")
- sendChat("/cook fish 2")
- sleep, 1000
- sendChat("/cook fish 3")
- sendChat("/cook fish 4")
- sleep, 1000
- sendChat("/cook fish 5")
- sleep, 1000
- AddChatMessage(0xFFFFFF, "{A901DB}[TC-Keybinder]{A901DB}{FFFFFF} " "{FFFFFF}Alle Fische wurden gekocht ...")
- return
- ~NumpadMult::
- {
- if(IsInChat())
- return
- Eeat_F ++
- If(Eeat_F > 5)
- Eeat_F := 1
- SendChat("/eat " Eeat_F)
- }
- return
- ;;;;;;;;;;;;;;;;;;;;
- ;;;;;Belegungen;;;;;
- ;;;;;;;;;;;;;;;;;;;;
- ~1::
- if(IsInChat())
- return
- SendChat("/motor")
- sleep, 1000
- Sendchat("/licht")
- return
- ~y::
- if(IsInChat())
- return
- If(IsPlayerDriver())
- {
- Sendchat("/lock")
- }
- return
- ~!NumpadSub::
- Sendchat("/zoll")
- return
- ~0::
- if(IsInChat())
- return
- SendChat("/heal")
- return
- ~ä::
- if(IsInChat())
- {
- return
- }
- Suspend Permit
- SendInput t{up}{enter}
- return
- ~x::
- if(IsInChat())
- return
- SendChat("/usedrugs")
- return
- ~2::
- if(IsInChat())
- return
- SendChat("/erstehilfe")
- return
- ~!p::
- if(IsInChat())
- return
- id := GetID()
- GetZoneName(zone)
- GetCityName(city)
- HP := GetPlayerHealth()
- if(IsPlayerInAnyInterior() == 1){
- SendChat("/org Ich befinde mich derzeit in einem Interior - ID: " . id . " HP: " . HP . " ")
- }
- else {
- SendChat("/org Aktuelle Position: " Zone ", " city " - ID: " . id . " HP: " . HP . " ")
- }
- return
- :?:/sani::
- :?:/ap::
- Suspend Permit
- SendInput, /accept paket{enter}
- return
- :?:/fg::
- suspend permit
- SendChat("/festgeld 1250000")
- return
- :?:/gkadd::
- :?:/gksave::
- Suspend Permit
- AddChatMessage(0xFFA500,"[GK-Save]{FFFFFF}: Gebe die GK-Nummer ein, die gespeichert werden soll, bestätige mit Leertaste / Enter")
- SendInput ^aNummer:{space}
- Input,number,V I M,{enter}{escape}{space}
- if(errorlevel == "EndKey:Escape")
- return
- SendInput ^a{delete}
- sleep 100
- SendInput Text:{space}
- AddChatMessage(0xFFA500,"[GK-Save]{FFFFFF}: Gebe nun den Text ein, bestätige mit Enter")
- Input text,V I M,{enter}{escape}
- if(errorlevel == "EndKey:Escape")
- return
- SendInput ^a{delete}{enter}
- sleep 100
- IniRead fillcheck, Gebaeudekomplexe.ini, Komplexe, %number%
- if(fillcheck != "ERROR") {
- write := fillcheck . " / " . text . ""
- IniWrite, %write%, Gebaeudekomplexe.ini, Komplexe, %number%
- AddChatMessage(0xFFFF00,"[GK-Save]{FFFFFF}: Du hast '" . text . "' zu '" . number . "' (" . fillcheck . ") hinzugefügt.")
- }
- else {
- IniWrite, %text%, Gebaeudekomplexe.ini, Komplexe, %number%
- AddChatMessage(0xFFFF00,"[GK-Save]{FFFFFF}: Du hast '" . text . "' unter '" . number . "' gespeichert.")
- }
- return
- :?:/gk::
- Suspend Permit
- AddChatMessage(0xFFA500,"[GK-Read]{FFFFFF}: Gebe die GK-Nummer ein, die ausgelesen werden soll, bestätige mit Leertaste / Enter.")
- Input,gk,V I M,{enter}{escape}{space}
- if(errorlevel == "EndKey:Escape")
- return
- SendInput ^a{delete}{enter}
- IniRead gktext, Gebaeudekomplexe.ini, Komplexe, %gk%
- if(gktext == "ERROR") {
- AddChatMessage(0xFFFF00,"[GK-Search]{FFFFFF}: Die Suche nach '" . gk . "' lieferte kein Ergebnis.")
- return
- }
- AddChatMessage(0xFFFF00,"[GK-Search]{FFFFFF}: Die Suche nach '" . gk . "' liefert '" . gktext "'.")
- return
- :?:/gkdelete::
- :?:/gkdel::
- Suspend Permit
- AddChatMessage(0xFF0000,"[GK-Delete]{FFFFFF}: Gebe die GK-Nummer ein, die gelöscht werden soll, bestätige mit Leertaste / Enter.")
- Input,gk,V I M,{enter}{escape}{space}
- if(errorlevel == "EndKey:Escape")
- return
- SendInput ^a{delete}{enter}
- IniRead gktext, Gebaeudekomplexe.ini, Komplexe, %gk%
- if(gktext == "ERROR") {
- AddChatMessage(0xFFFF00,"[GK-Delete]{FFFFFF}: Der Komplex '" . gk . "' wurde nicht gefunden.")
- }
- else {
- IniWrite, "ERROR", Gebaeudekomplexe.ini, Komplexe, %gk%
- AddChatMessage(0xFF0000,"[GK-Delete]{FFFFFF}: Du hast Komplex '" . gk . "' mit dem Inhalt '" . gktext . "' gelöscht.")
- }
- return
- :?:/hpov::
- Suspend Permit
- if(hpOv_On != 1) {
- addChatMessage(0xFFFFFF, "{A901DB}[Keybinder]{A901DB}{FFFFFF} Overlay aktiviert.")
- HPOV := TextCreate("Arial", 6, true, false, 689, 91.5, 0xFFFFFFFF, "" , true, true)
- hpOv_On := 1
- Settimer, HP, 10
- }
- else
- {
- addChatMessage(0xFFFFFF, "{A901DB}[Keybinder]{A901DB}{FFFFFF} Overlay deaktiviert.")
- DestroyAllVisual()
- hpOv_On := 0
- Ov_On := 0
- SetTimer, HP, off
- }
- Return
- HP:
- id := getID()
- hp := getPlayerHealth()
- ping := getPlayerPingById(id)
- TextSetString(HPOV, "ID:" id " | HP:" hp " | Ping:" ping "")
- return
- :?:/ksms::
- Suspend Permit
- callName := PlayerInput("Wen möchtest du eine SMS schreiben: ")
- sleep 50
- text := PlayerInput("Nachricht: ")
- SendChat("/number " . callName)
- sleep, 100
- GetChatLine(0, Chatline)
- if(InStr(Chatline,"Name: ")){
- RegExMatch(Chatline,"Name\: (.*)\, Ph\: (.*)",var)
- SendChat("/sms " . var2 . " " . text)
- }else{
- AddChatMessage(0xFFFFF, "{5F40BA}Es ist ein Fehler aufgetreten, bitte versuche es erneut.")
- }
- return
- :?:/kcall::
- Suspend Permit
- callName := PlayerInput("Wen möchtest du Anrufen: ")
- SendChat("/number " . callName)
- sleep, 100
- GetChatLine(0, Chatline)
- if(InStr(Chatline,"Name: ")){
- RegExMatch(Chatline,"Name\: (.*)\, Ph\: (.*)",var)
- SendChat("/call " . var2)
- }else{
- AddChatMessage(0xFFFFF, "{5F40BA}Es ist ein Fehler aufgetreten, bitte versuche es erneut.")
- }
- return
- :?:/resms::
- :?:/re::
- {
- b := 3
- Loop, read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- {
- If(b = 2){
- d := c SubStr(A_LoopReadLine, 15)
- RegExMatch(d, "Sender: (.*) \((.*)\)", ReSMS)
- If(ReSMS1 = Username)
- continue
- Sender := ReSMS2
- }
- If(InStr(A_LoopReadLine, "SMS: ")){
- If(SubStr(A_LoopReadLine, 12, 5) = "SMS: "){
- StringRight, a, A_LoopReadLine, 3
- If(a = "..."){
- b := 0
- c := SubStr(A_LoopReadLine, 12, StrLen(A_LoopReadLine) - 14)
- }else{
- RegExMatch(A_LoopReadLine, "Sender: (.*) \((.*)\)", ReSMS)
- If(ReSMS1 = Username)
- continue
- Sender := ReSMS2
- }
- }
- }
- b ++
- }
- If(Sender = ""){
- AddChatMessage("0x" IGF1, KBN "{" IGF2 "}Du hast noch keine SMS {" IGF1 "}erhalten!")
- return
- }
- SendInput, /sms %Sender%{space}
- }
- return
- Antispamschutz:
- IfWinNotActive, GTA:SA:MP
- return
- GetChatline(1, AntiSpam)
- GetChatline(0, AntiSpam2)
- Antispam := Antispam Antispam2
- If(Instr(Antistpam, "WARNUNG: Hör auf zu Spamen, sonst wirst du gekickt!"))
- {
- BlockChatInput(1)
- AddChatMessage(0xFFFFFF,"{A901DB}[TC-Keybinder] {FFFFFF}Antispam Schutz aktiviert.")
- Sleep, 3000
- AddChatMessage(0xFFFFFF,"{A901DB}[TC-Keybinder] {FFFFFF}Antispam Schutz deaktiviert.")
- BlockChatInput(0)
- }
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement