Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global sizeofDataType := { "UChar": 1, "Char": 1
- , "UShort": 2, "Short": 2
- , "UInt": 4, "Int": 4
- , "UFloat": 4, "Float": 4
- , "Int64": 8, "Double": 8}
- global b := [22, 32, 42, 52, 21, 31]
- global bmode := ["[HEAD]", "[TORSO]", "[KNEE]", "[RANDOM]"]
- global SAMP_AC_PATCHES := [0x99250, 0xB2F70, 0xB30F0, 0x99247]
- global SAMP_AC_BYTES := ["C3", "B845000000C21C00", "B801000000C3", "9090"]
- 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","BalistaCompact","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_CPED_PTR := 0xB6F5F0
- global ADDR_CVEHICLE_PTR := 0xB6F980
- global ADDR_VEHICLE_PTR := 0xBA18FC
- global ADDR_FPS_PTR := 0xB729A0
- global OFFSET_MATRIX := 0x14
- global OFFSET_POSX := 0x30
- global OFFSET_POSY := 0x34
- global OFFSET_POSZ := 0x38
- global OFFSET_ROTATION_X := 0x10
- global OFFSET_ROTATION_Y := 0x14
- global OFFSET_GTA_ENTITY := 0x40
- global ADDR_POSITION_X := 0xB6F2E4
- global ADDR_POSITION_Y := 0xB6F2E8
- global ADDR_POSITION_Z := 0xB6F2EC
- global ADDR_REDMARKER_POSX := 0xC7DEC8
- global ADDR_REDMARKER_POSY := 0xC7DECC
- global ADDR_REDMARKER_POSZ := 0xC7DED0
- global OFFSET_CPED_HP := 0x540
- global OFFSET_CPED_ARMOR := 0x548
- global OFFSET_CPED_SKINID := 0x22
- global OFFSET_CPED_OTARGET := 0x79C
- global OFFSET_CPED_FLAGS := 0x42
- global OFFSET_CPED_ROTATION := 0x558
- global OFFSET_CPED_TROTATION := 0x55C
- global OFFSET_CPED_FLAGS := 0x42
- global OFFSET_CPED_STATE := 0x46C
- global OFFSET_CPED_STATE2 := 0x530
- global OFFSET_VEH_SPEED_X := 0x44
- global OFFSET_VEH_SPEED_Y := 0x48
- global OFFSET_VEH_SPEED_Z := 0x4C
- global OFFSET_VEH_SPIN_X := 0x50
- global OFFSET_VEH_SPIN_Y := 0x54
- global OFFSET_VEH_SPIN_Z := 0x58
- global OFFSET_VEH_HPOFF := 0x4C0
- global OFFSET_VEH_DOORSTATE := 0x4F8
- global OFFSET_VEH_ENGINESTATE := 0x428
- global OFFSET_VEH_LIGHTSTATE := 0x584
- global OFFSET_VEH_MODEL := 0x22
- global OFFSET_VEH_TYPE := 0x590
- global OFFSET_VEH_DRIVER := 0x460
- global OFFSET_VEH_LASTVEH := 0x58C
- global ADDR_WEAPON_TARGET := 0xB6F3B8
- global ADDR_WEAPON_DATA := 0xC8AAB8
- global OFFSET_WEAPON_MAX := 100
- global OFFSET_WEAPON_STACK := 0x70
- global OFFSET_WEAPON_TRANGE := 0x4
- global OFFSET_WEAPON_ID := 0x740
- global OFFSET_WEAPON_SLOT := 0x718
- global OFFSET_WEAPON_DMG := 0x760
- global ADDR_WORLD_GRAVITY := 0x863984
- global ADDR_WORLD_MAPX := 0xBA67B8
- global ADDR_WORLD_MAPY := 0xBA67BC
- global FUNC_GETBONEPOS := 0x5E4280
- global SAMPFUNCS_FUNC_DBGCHECK := 0x65098
- global SAMPFUNCS_FUNC_SETSKIN := 0x65090
- global pData_iAFKState := 0x1D1
- global pData_iGlobalMarkers := 0x1E9
- global pData_iMapX := 0x1ED
- global pData_iMapY := 0x1F1
- global pData_iMapZ := 0x1F5
- global pData_iGTAPed := 0x2A4
- global pData_iHP := 0x1BC
- global pData_iArmor := 0x1B8
- global ADDR_SAMP_CRASHREPORT := 0x5CF2C
- 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_COLOR_OFFSET := 0x216378
- global SAMP_SCOREBOARD_INFO := 0x21A0B4
- global SAMP_DRAWING_DISTANCE := 0xD3DCC
- global SAMP_SETTINGS_OFFSET := 0x3C5
- global SAMP_PPOOLS_OFFSET := 0x3CD
- global SAMP_PPOOL_PLAYER_OFFSET := 0x18
- global SAMP_PPOOL_VEHICLE_OFFSET := 0x1C
- global SAMP_PPOOL_PICKUP_OFFSET := 0x20
- global SAMP_PPOOL_OBJECT_OFFSET := 0x4
- global SAMP_PPOOL_TEXTDRAW_OFFSET := 0x10
- global SAMP_PPOOL_GANGZONE_OFFSET := 0x8
- global SAMP_SLOCALPLAYERID_OFFSET := 0x4
- global SAMP_LOCALPLAYER_OFFSET := 0x22
- global SAMP_ISTRLEN_LOCALPLAYERNAME_OFFSET := 0x1A
- global SAMP_SZLOCALPLAYERNAME_OFFSET := 0xA
- global SAMP_PSZLOCALPLAYERNAME_OFFSET := 0xA
- 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_PLAYER_MAX := 1000
- global SAMP_MAX_PLAYERS := 1004
- global SIZE_SAMP_CHATMSG := 0xFC
- getPID(szWindow)
- { local dwPID := 0
- WinGet, dwPID, PID, %szWindow%
- return dwPID
- }
- openProcess(dwPID, dwRights = 0x1F0FFF)
- { return DllCall("OpenProcess", "UInt", dwRights, "int", 0, "UInt", dwPID, "Uint")
- }
- closeProcess(hProcess)
- { DllCall("CloseHandle", "UInt", hProcess, "UInt")
- }
- getModuleBaseAddress(sModule, hProcess)
- { dwSize = 1024*4
- VarSetCapacity(hMods, dwSize)
- VarSetCapacity(cbNeeded, 4)
- dwRet := DllCall("Psapi.dll\EnumProcessModules", "UInt", hProcess, "UInt", &hMods, "UInt", dwSize, "UInt*", cbNeeded, "UInt")
- dwMods := cbNeeded / 4
- i := 0
- VarSetCapacity(hModule, 4)
- VarSetCapacity(sCurModule, A_IsUnicode ? 2*260 : 260)
- while(i < dwMods) {
- hModule := NumGet(hMods, i*4)
- DllCall("Psapi.dll\GetModuleFileNameEx", "UInt", hProcess, "UInt", hModule, "Str", sCurModule, "UInt", A_IsUnicode ? 2*260 : 260)
- SplitPath, sCurModule, sFilename
- if(sModule == sFilename)
- return hModule
- i := i + 1
- }
- return 0
- }
- callWithParams(dwFunc, aParams, bCleanupStack = true, thiscall = 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_%
- __WSTRING(dwMemAddress, aParams[i][2])
- if(ErrorLevel)
- return false
- i_ += 1
- } else if(aParams[i][1] == "i") {
- dwMemAddress := aParams[i][2]
- } else {
- return false
- }
- NumPut((thiscall && i == 1 ? 0xB9 : 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")
- }
- __RAW(pInjectFunc, &injectData, dwLen)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return true
- }
- virtualAllocEx(hProcess, dwSize, flAllocationType, flProtect)
- { return DllCall("VirtualAllocEx", "UInt", hProcess, "UInt", 0, "UInt", dwSize, "UInt", flAllocationType, "UInt", flProtect, "UInt")
- }
- virtualFreeEx(hProcess, lpAddress, dwSize, dwFreeType)
- { return DllCall("VirtualFreeEx", "UInt", hProcess, "UInt", lpAddress, "UInt", dwSize, "UInt", dwFreeType, "UInt")
- }
- createRemoteThread(lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId)
- { return DllCall("CreateRemoteThread", "UInt", hGTA, "UInt", lpThreadAttributes, "UInt", dwStackSize, "UInt", lpStartAddress, "UInt", lpParameter, "UInt", dwCreationFlags, "UInt", lpThreadId, "UInt")
- }
- waitForSingleObject(hThread, dwMilliseconds) {
- return DllCall("WaitForSingleObject", "UInt", hThread, "UInt", dwMilliseconds, "UInt")
- }
- __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
- }
- __READ(dwAddress, dwLen, type, ByRef dwRead=0)
- { VarSetCapacity(dwRead, dwLen)
- DllCall("ReadProcessMemory", "UInt", hGTA, "UInt", dwAddress, "Str", dwRead, "UInt", dwLen, "UInt", 0, "UInt*", 0)
- dwRead := NumGet(dwRead, 0, type)
- return dwRead
- }
- __FLOAT(dwAddress, ByRef dwRead=0)
- { VarSetCapacity(dwRead, 4)
- DllCall("ReadProcessMemory", "UInt", hGTA, "UInt", dwAddress, "Str", dwRead, "UInt", 4, "UInt*", 0, "UInt", 0)
- dwRead := NumGet(dwRead, 0, "Float")
- return dwRead
- }
- __DWORD(dwAddress, ByRef dwRead=0)
- { VarSetCapacity(dwRead, 4)
- DllCall("ReadProcessMemory", "UInt", hGTA, "UInt", dwAddress, "Str", dwRead, "UInt", 4, "UInt", 0, "UInt*", 0)
- dwRead := NumGet(dwRead, 0, "UInt")
- return dwRead
- }
- __WRITE(dwAddress, writevalue, size=4, type="Int")
- { VarSetCapacity(finalvalue,size, 0)
- NumPut(writevalue,finalvalue,0,type)
- DllCall("WriteProcessMemory","Uint",hGTA,"Uint",dwAddress,"Uint",&finalvalue,"Uint",size,"Uint",0)
- }
- __WSTRING(dwAddress, wString)
- { sString := wString
- if A_IsUnicode
- sString := __unicodeToAnsi(wString)
- DllCall("WriteProcessMemory", "UInt", hGTA, "UInt", dwAddress, "Str", sString, "UInt", StrLen(wString) + 1, "UInt", 0, "UInt")
- }
- __RAW(dwAddress, pBuffer, dwLen)
- { DllCall("WriteProcessMemory", "UInt", hGTA, "UInt", dwAddress, "UInt", pBuffer, "UInt", dwLen, "UInt", 0, "UInt")
- }
- CPed(matrix)
- { If(!matrix)
- return __DWORD(ADDR_CPED_PTR)
- else return Matrix(__DWORD(ADDR_CPED_PTR))
- }
- Matrix(dwAddress)
- { return __DWORD(dwAddress + OFFSET_MATRIX)
- }
- Vehicle(matrix)
- { If(!matrix)
- return __DWORD(ADDR_VEHICLE_PTR)
- else return Matrix(__DWORD(ADDR_VEHICLE_PTR))
- }
- InfoOffset(settings)
- { If(!settings)
- return __DWORD(g_dwSAMP_Addr + SAMP_INFO_OFFSET)
- else return __DWORD(__DWORD(g_dwSAMP_Addr + SAMP_INFO_OFFSET) + SAMP_SETTINGS_OFFSET)
- }
- SAMP_pPool(pool){
- return __DWORD(__DWORD(InfoOffset + SAMP_PPOOLS_OFFSET) + SAMP_PPOOL_PLAYER_OFFSET)
- }
- _sub5L920(pointer, matrix=0)
- { If(matrix)
- pointer := Matrix(pointer)
- return [__FLOAT(pointer + OFFSET_POSX), __FLOAT(pointer + OFFSET_POSY), __FLOAT(pointer + OFFSET_POSZ)]
- }
- IsPlayerInAnyVehicle()
- { return (Vehicle(0) > 0)
- }
- GetTargetPed()
- { return __DWORD(__DWORD(ADDR_WEAPON_TARGET) + OFFSET_CPED_OTARGET)
- }
- _sub5L92M(){
- return (__READ(m + 1856, 2, "Short") == 358 ? 1 : 0)
- }
- AddChatMessage(text,color=0xffffffff)
- { dwFunc := g_dwSAMP_Addr + 0x64010
- __DWORD(g_dwSAMP_Addr + 0x21A0E4, dwAddress)
- callWithParams(dwFunc, [["i", dwAddress],["i", 8],["s", text],["i", 0],["i", color],["i", 0]], false, true)
- }
- IsChatOpen()
- { return (__DWORD(__DWORD(g_dwSAMP_Addr + ADDR_SAMP_INCHAT_PTR) + ADDR_SAMP_INCHAT_PTR_OFF) > 0)
- }
- _sub5L9367()
- {
- sub5L9 := []
- if(!updateScoreboardDataEx())
- return 0
- Loop, % SAMP_PLAYER_MAX
- {
- i := A_Index-1
- dwRemoteplayer := __DWORD(stPlayerPool+46+i*4)
- if(dwRemoteplayer==0)
- continue
- __DWORD(dwRemoteplayer, dwRemoteplayerData)
- if(dwRemoteplayerData==0)
- continue
- __DWORD(dwRemoteplayerData, dwpSAMP_Actor)
- if(dwpSAMP_Actor==0)
- continue
- __DWORD(dwpSAMP_Actor + 676, dwPed)
- if(dwPed==0)
- continue
- o := Object("sub", dwPed)
- sub5L9[i] := o
- }
- return 1
- }
- updateScoreboardDataEx(){
- callWithParams(g_dwSAMP_Addr + FUNC_UPDATESCOREBOARD, [["i", InfoOffset]], false, true)
- return true
- }
- AntiCrash(){
- cReport := ADDR_SAMP_CRASHREPORT
- __WRITE(g_dwSAMP_Addr + cReport, 0x90909090, 4)
- cReport += 0x4
- __WRITE(g_dwSAMP_Addr + cReport, 0x90, 1)
- cReport += 0x9
- __WRITE(g_dwSAMP_Addr + cReport, 0x90909090, 4)
- cReport += 0x4
- __WRITE(g_dwSAMP_Addr + cReport, 0x90, 1)
- }
- SampPatchDisableAnticheat(){
- for i, patch in SAMP_AC_PATCHES
- {
- tobin(d, SAMP_AC_BYTES[i])
- __RAW(g_dwSAMP_Addr + patch, &d, StrLen(SAMP_AC_BYTES[i]) / 2)
- }
- }
- tobin(byref addr, str="")
- {
- if(!RegExMatch(str,"^([a-fA-F0-9][a-fA-F0-9])*$"))
- {
- msgbox % "fail tobin"
- return
- }
- i:=Strlen(str)/2
- VarSetCapacity(addr, i)
- dataddr := &addr
- x:=""
- loop,parse,str
- {
- if(A_Index & 1)
- x := A_Loopfield
- else
- {
- DllCall("RtlFillMemory"
- , "UInt", dataddr
- , "UInt", 1
- , "UChar", "0x" x A_Loopfield)
- dataddr++
- }
- }
- }
- _subr()
- {
- If(GetKeyState("RButton", "P"))
- {
- _sub5L9367()
- for i, k in sub5L9
- {
- If(k)
- {
- If(_sub5L2411b(k.sub))
- {
- If(__FLOAT(k.sub + 1344))
- {
- sub5L9299 := _sub5L920(k.sub, 1)
- sub5B588A := _sub5L920(mainMatrix, 0)
- If(_sub5L9211(sub5L9299[1], sub5L9299[2], sub5L9299[3] - 1.0, subMO89, subMO90) && _sub5L9211(sub5L9299[1], sub5L9299[2], sub5L9299[3] + 0.9, subMO91, subMO92))
- {
- If(subMO89)
- {
- submH := subMO90 - subMO92
- subMW23 := submH / 2.5
- subNT89L := chairX
- subNT98L := chairY
- subT89LN := _sub5L92M()
- if(subT89LN){
- subNT89L := s_chairX
- subNT98L := s_chairY
- }
- If(aim || pSilent)
- {
- if((subNT89L > subMO91 - (subMW23 * usedFOV) && subNT89L < subMO91 + (subMW23 * usedFOV)) && (subNT98L > subMO92 && subNT98L < subMO92 + submH))
- {
- __FLOAT(11989592, sub5L9212)
- sub5L9300 := __FLOAT(11991500, sub5L9221) - sub5L9299[1]
- sub5L9301 := __FLOAT(11991504, sub5L9295) - sub5L9299[2]
- subI9301 := sqrt((sub5L9300 * sub5L9300) + (sub5L9301 * sub5L9301))
- subI9987 := acos(sub5L9300 / subI9301)
- If(subI9301 > 3.5)
- {
- if(sub5L9300 <= 0 && sub5L9301 >= 0 || sub5L9300 >= 0 && sub5L9301 >= 0)
- {
- If(subT89LN)
- subM167L := (subI9987)- sub5L9212
- else
- subM167L := (subI9987 + 0.0389) - sub5L9212
- subMI78 := sub5L9212 - subI9987
- }
- if(sub5L9300 >= 0 && sub5L9301 <= 0 || sub5L9300 <= 0 && sub5L9301 <= 0)
- {
- If(subT89LN)
- subM167L := (-subI9987) - sub5L9212
- else
- subM167L := (-subI9987 + 0.0389) - sub5L9212
- subMI78 := sub5L9212 - (-subI9987)
- }
- subSM894 := subM167L / smooth
- If(aim)
- {
- If(subSM894 > -1.0 && subSM894 < 0.5 && subM167L > -2.0 && subM167L < 2.0 && subMI78 < 0.1800 && subMI78 > -0.1800){
- VarSetCapacity(d, 4, 0)
- NumPut(sub5L9212 += subSM894, d, 0, "float")
- SEC(11989592, &d, 4)
- }
- }
- If(pSilent){
- If(subMI78 < 0.1800 && subMI78 > -0.1800){
- sub5L9897 := _sub5L920(mainMatrix, 0)
- __DWORD(12231696, w)
- If(boneMode == 1)
- cbone := 8
- else if(boneMode == 2)
- cbone := 4
- else if(boneMode == 3)
- cbone := 42
- else if(boneMode == 4){
- d := b.MaxIndex()
- a := b.minIndex()
- Random, cbone, %a%, %d%
- }
- bonepos := GetBonePosition(k.sub, (cbone == 4 ? b[cbone] : cbone))
- SendBulletSync(1,i,w,sub5L9897[1],sub5L9897[2],sub5L9897[3],bonepos[1],bonepos[2],bonepos[3], bonepos[1]-sub5L9299[1], bonepos[2]-sub5L9299[2], bonepos[3]-sub5L9299[3])
- if(!subI9288){
- subI9288 := 1
- _subK78L77()
- }
- }
- }
- }
- }else if(subI9288 && pSilent){
- subI9288 := 0
- _subK78L74()
- }
- }
- }
- }
- }
- }
- }
- }
- }else{
- if(subI9288){
- subI9288 := 0
- _subK78L74()
- }
- }
- }
- _sub5L9211(posX, posY, posZ, byref sX, byref sY) {
- VarSetCapacity(params, 12)
- NumPut(posX, params, 0, "Float")
- NumPut(posY, params, 4, "Float")
- NumPut(posZ, params, 8, "Float")
- __RAW(pParam1, ¶ms, 12)
- if(ErrorLevel)
- return false
- VarSetCapacity(injectData, 25, 0)
- NumPut(0x68, injectData, 0, "UChar")
- NumPut(pParam2, injectData, 1, "UInt")
- NumPut(0x68, injectData, 5, "UChar")
- NumPut(pParam1, injectData, 6, "UInt")
- NumPut(0xE8, injectData, 10, "UChar")
- offset := 0x71DAB0 - (pInjectFunc + 15)
- NumPut(offset, injectData, 11, "Int")
- NumPut(0xC483, injectData, 15, "UShort")
- NumPut(8, injectData, 17, "UChar")
- NumPut(0x0589, injectData, 18, "UShort")
- NumPut(pParam2 +8, injectData, 20, "UInt")
- NumPut(0xC3, injectData, 24, "UChar")
- __RAW(pInjectFunc, &injectData, 25)
- if(ErrorLevel)
- return false
- hThread := createRemoteThread(0, 0, pInjectFunc, 0, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- __FLOAT(pParam2, sX)
- __FLOAT(pParam2 + 4, sY)
- return true
- }
- GetBonePosition(ped,boneId){
- callWithParams(0x5E4280, [["i", ped],["i", pParam1],["i", boneId],["i", 1]], false, true)
- return [__FLOAT(pParam1), __FLOAT(pParam1 + 4), __FLOAT(pParam1 + 8)]
- }
- _sub5L2411b(ped)
- {
- VarSetCapacity(injectData, 16, 0)
- NumPut(0xB9, injectData, 0, "UChar")
- NumPut(ped, injectData, 1, "UInt")
- NumPut(0xE8, injectData, 5, "UChar")
- offset := 0x536BC0 - (pInjectFunc + 10)
- NumPut(offset, injectData, 6, "Int")
- NumPut(0xA2, injectData, 10, "UChar")
- NumPut(pParam1, injectData, 11, "Int")
- NumPut(0xC3, injectData, 15, "UChar")
- __RAW(pInjectFunc, &injectData, 16)
- hThread := createRemoteThread(0, 0, pInjectFunc, 0, 0, 0)
- waitForSingleObject(hThread, 0xFFFFFFFF)
- closeProcess(hThread)
- return __READ(pParam1, 1, "UChar")
- }
- SEC(dwAddress, pBuffer, dwLen)
- ; by paul
- {
- bufAddr := pInjectFunc+200
- __RAW(bufAddr, pBuffer, dwLen)
- if(ErrorLevel)
- return false
- str := "5589E583EC108B45088B008945FC8B45088B40048945F88B45088B40088945F4C745F0000000008B45F03B45F4731A8B45FC8B55F001C28B45F80345F00FB60088028D45F0FF00EBDEB800000000C9C20400"
- tobin(injectData, str)
- VarSetCapacity(params, 12)
- NumPut(dwAddress, params, 0, "UInt")
- NumPut(bufAddr, params, 4, "UInt")
- NumPut(dwLen, params, 8, "UInt")
- __RAW(pInjectFunc+180, ¶ms, 12)
- if(ErrorLevel)
- return false
- __RAW(pInjectFunc, &injectData, strlen(str)/2)
- hThread := createRemoteThread(0, 0, pInjectFunc, pInjectFunc+180, 0, 0)
- if(ErrorLevel)
- return false
- waitForSingleObject(hThread, 0xFFFFFFFF)
- return true
- }
- _subK78L77()
- ; by paul
- { codeaddr := pInjectFunc+357
- valaddr := pInjectFunc+951
- VarSetCapacity(injectData1, 118)
- NumPut(0x5824448D, injectData1, 0, "UInt")
- NumPut(0x408B, injectData1, 4, "UShort")
- NumPut(0x0C, injectData1, 6, "UChar")
- NumPut(0x158B, injectData1, 7, "UShort")
- NumPut(valaddr, injectData1, 9, "UInt")
- NumPut(0x1089, injectData1, 13, "UShort")
- NumPut(0x158B, injectData1, 15, "UShort")
- NumPut(valaddr+4, injectData1, 17, "UInt")
- NumPut(0x5089, injectData1, 21, "UShort")
- NumPut(0x04, injectData1, 23, "UChar")
- NumPut(0x158B, injectData1, 24, "UShort")
- NumPut(valaddr+8, injectData1, 26, "UInt")
- NumPut(0x5089, injectData1, 30, "UShort")
- NumPut(0x08, injectData1, 32, "UChar")
- NumPut(0x158B, injectData1, 33, "UShort")
- NumPut(valaddr+12, injectData1, 35, "UInt")
- NumPut(0x5089, injectData1, 39, "UShort")
- NumPut(0x0C, injectData1, 41, "UChar")
- NumPut(0x158B, injectData1, 42, "UShort")
- NumPut(valaddr+16, injectData1, 44, "UInt")
- NumPut(0x5089, injectData1, 48, "UShort")
- NumPut(0x10, injectData1, 50, "UChar")
- NumPut(0x158B, injectData1, 51, "UShort")
- NumPut(valaddr+20, injectData1, 53, "UInt")
- NumPut(0x5089, injectData1, 57, "UShort")
- NumPut(0x14, injectData1, 59, "UChar")
- NumPut(0x158B, injectData1, 60, "UShort")
- NumPut(valaddr+24, injectData1, 62, "UInt")
- NumPut(0x5089, injectData1, 66, "UShort")
- NumPut(0x18, injectData1, 68, "UChar")
- NumPut(0x158B, injectData1, 69, "UShort")
- NumPut(valaddr+28, injectData1, 71, "UInt")
- NumPut(0x5089, injectData1, 75, "UShort")
- NumPut(0x1C, injectData1, 77, "UChar")
- NumPut(0x158B, injectData1, 78, "UShort")
- NumPut(valaddr+32, injectData1, 80, "UInt")
- NumPut(0x5089, injectData1, 84, "UShort")
- NumPut(0x20, injectData1, 86, "UChar")
- NumPut(0x158B, injectData1, 87, "UShort")
- NumPut(valaddr+36, injectData1, 89, "UInt")
- NumPut(0x5089, injectData1, 93, "UShort")
- NumPut(0x24, injectData1, 95, "UChar")
- NumPut(0x158B, injectData1, 96, "UShort")
- NumPut(valaddr+40, injectData1, 98, "UInt")
- NumPut(0x90285088, injectData1, 102, "UInt")
- NumPut(0x118B, injectData1, 106, "UShort")
- NumPut(0x5824448D, injectData1, 108, "UInt")
- NumPut(0x50, injectData1, 112, "UChar")
- NumPut(0xE9, injectData1, 113, "UChar")
- offset := (g_dwSAMP_Addr + 0x6B83) - (codeaddr+118)
- NumPut(offset, injectData1, 114, "UInt")
- VarSetCapacity(injectData2, 5)
- NumPut(0xE9, injectData2, 0, "UChar")
- offset := codeaddr - (g_dwSAMP_Addr + 0x6B83)
- NumPut(offset, injectData2, 1, "UInt")
- __RAW(codeaddr, &injectData1, 118)
- if(ErrorLevel)
- return
- __RAW(g_dwSAMP_Addr + 0x6B7E, &injectData2, 5)
- ErrorLevel := ERROR_OK
- }
- _subK78L74()
- ; by paul
- { VarSetCapacity(injectData, 5)
- NumPut(0x5824448D, injectData, 0, "UInt")
- NumPut(0x50, injectData, 4, "UChar")
- __RAW(g_dwSAMP_Addr + 0x6B7E, &injectData, 5)
- }
- SendBulletSync(hittype,hitid,weaponid, fOrigX,fOrigY,fOrigZ,fTargetX,fTargetY,fTargetZ,fCenterX,fCenterY,fCenterZ)
- ; by paul
- { valaddr := pInjectFunc+951
- VarSetCapacity(val, 41)
- NumPut(0xCE, val, 0, "UChar")
- NumPut(hittype, val, 1, "UChar")
- NumPut(hitid, val, 2, "UShort")
- NumPut(fOrigX, val, 4, "Float")
- NumPut(fOrigY, val, 8, "Float")
- NumPut(fOrigZ, val, 12, "Float")
- NumPut(fTargetX, val, 16, "Float")
- NumPut(fTargetY, val, 20, "Float")
- NumPut(fTargetZ, val, 24, "Float")
- NumPut(fCenterX, val, 28, "Float")
- NumPut(fCenterY, val, 32, "Float")
- NumPut(fCenterZ, val, 36, "Float")
- NumPut(weaponid, val, 40, "UChar")
- __RAW(valaddr, &val, 41)
- }
- PATH_OVERLAY := RelToAbs(A_ScriptDir, "DX39.dll")
- hModule := DllCall("LoadLibrary", Str, PATH_OVERLAY)
- if(hModule == -1 || hModule == 0)
- {
- MsgBox, 48, Error, The dll-file couldn't be found!
- ExitApp
- }
- Init_func := DllCall("GetProcAddress", UInt, hModule, Str, "Init")
- SetParam_func := DllCall("GetProcAddress", UInt, hModule, Str, "SetParam")
- TextCreate_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextCreate")
- TextDestroy_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextDestroy")
- TextSetShadow_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShadow")
- TextSetShown_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetShown")
- TextSetColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetColor")
- TextSetPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetPos")
- TextSetString_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextSetString")
- TextUpdate_func := DllCall("GetProcAddress", UInt, hModule, Str, "TextUpdate")
- BoxCreate_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxCreate")
- BoxDestroy_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxDestroy")
- BoxSetShown_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetShown")
- BoxSetBorder_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorder")
- BoxSetBorderColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetBorderColor")
- BoxSetColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetColor")
- BoxSetHeight_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetHeight")
- BoxSetPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetPos")
- BoxSetWidth_func := DllCall("GetProcAddress", UInt, hModule, Str, "BoxSetWidth")
- LineCreate_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineCreate")
- LineDestroy_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineDestroy")
- LineSetShown_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetShown")
- LineSetColor_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetColor")
- LineSetWidth_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetWidth")
- LineSetPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "LineSetPos")
- ImageCreate_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageCreate")
- ImageDestroy_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageDestroy")
- ImageSetShown_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetShown")
- ImageSetAlign_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetAlign")
- ImageSetPos_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetPos")
- ImageSetRotation_func := DllCall("GetProcAddress", UInt, hModule, Str, "ImageSetRotation")
- DestroyAllVisual_func := DllCall("GetProcAddress", UInt, hModule, Str, "DestroyAllVisual")
- ShowAllVisual_func := DllCall("GetProcAddress", UInt, hModule, Str, "ShowAllVisual")
- HideAllVisual_func := DllCall("GetProcAddress", UInt, hModule, Str, "HideAllVisual")
- GetFrameRate_func := DllCall("GetProcAddress", UInt, hModule, Str, "GetFrameRate")
- GetScreenSpecs_func := DllCall("GetProcAddress", UInt, hModule, Str, "GetScreenSpecs")
- SetCalculationRatio_func:= DllCall("GetProcAddress", UInt, hModule, Str, "SetCalculationRatio")
- SetOverlayPriority_func := DllCall("GetProcAddress", UInt, hModule, Str, "SetOverlayPriority")
- 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
- }
- SetCalculationRatio(width, height)
- {
- global SetCalculationRatio_func
- res := DllCall(SetCalculationRatio_func, Int, width, Int, height)
- return res
- }
- SetOverlayPriority(id, priority)
- {
- global SetOverlayPriority_func
- res := DllCall(SetOverlayPriority_func, Int, id, Int, priority)
- return res
- }
- 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
- }
- cheatItem(d)
- {
- global
- If(d){
- TextSetColor(rectangle%output%, 0xFF00FF00)
- TextSetString(rectangle%output%, "1")
- }else{
- TextSetColor(rectangle%output%, 0xFF545454)
- TextSetString(rectangle%output%, "0")
- }
- }
- Inputwindow(info="Please enter the value") {
- global
- TextSetString(Ov_Inputwindow_Input, "")
- TextSetString(Ov_Inputwindow_Info, info)
- BoxSetShown(Ov_Inputwindow_Box, true)
- BoxSetShown(Ov_Inputwindow_Box_Info, true)
- BoxSetShown(Ov_Inputwindow_Text_Box, true)
- TextSetShown(Ov_Inputwindow_Info, true)
- TextSetShown(Ov_Inputwindow_Input, true)
- BlockInput, On
- Inputwindow_Input := ""
- Loop, {
- Input, Inputwindow_nchar, L1 I, {Backspace}{Enter}{Escape}
- StringTrimLeft, Inputwindow_Endkey, Errorlevel, 7
- If ( Inputwindow_Endkey = "Escape" )
- {
- CloseInputwindow()
- return ""
- }
- else If ( Inputwindow_Endkey = "Enter" )
- {
- CloseInputwindow()
- return Inputwindow_Input
- }
- else If ( Inputwindow_Endkey = "Backspace" )
- StringTrimRight, Inputwindow_Input, Inputwindow_Input, 1
- Inputwindow_Input := Inputwindow_Input Inputwindow_nchar
- TextSetString(Ov_Inputwindow_Input, Inputwindow_Input)
- }
- }
- CloseInputwindow() {
- global
- BlockInput, Off
- BoxSetShown(Ov_Inputwindow_Box, false)
- BoxSetShown(Ov_Inputwindow_Box_Info, false)
- BoxSetShown(Ov_Inputwindow_Text_Box, false)
- TextSetShown(Ov_Inputwindow_Info, false)
- TextSetShown(Ov_Inputwindow_Input, false)
- }
- MenuUpdate(){
- global
- If(!WinActive("GTA:SA:MP"))
- return
- text := Color_Primary_Text
- onoff := Color_Primary_Text
- for i, in Menu%Menu_Menu%
- {
- If(!txtcr)
- text .= Menu%Menu_Menu%[i] "`n"
- If ( Menu%Menu_Menu%_%i%_State )
- {
- onoff .= "1.00`n"
- }else if(i == 3){
- onOff .= "" Round(smooth, 1) "`n"
- }else if(i == 4){
- onOff .= "" Round(fov, 1) "`n"
- }else if(i == 7){
- onOff .= "" Round(silentFOV, 1) "`n"
- }else if(i == 8){
- onOff .= "" bmode[boneMode] "`n"
- }else if(i == 1 || i == 5 || i == 9){
- onoff .= "`n"
- }else{
- onoff .= "-`n"
- }
- }
- If(!txtcr)
- txtcr := 1
- BoxSetPos(Ov_Menu_Box_Cursor, Menu_X +1, Menu_Y + TEXT_SPACE_Y+ 1+ (Menu_Position - 1) * Menu_Factor)
- BoxSetPos(Ov_Menu_Box_Lighter, Menu_X +1, Menu_Y + TEXT_SPACE_Y+1+ (Menu_Position - 1) * Menu_Factor)
- Menu_Height := Menu%Menu_Menu%.MaxIndex() * Menu_Factor + 5
- BoxSetHeight(Ov_Menu_Box_Text, Menu_Height)
- if(!set){
- TextSetString(Ov_Menu_Text_Text, text)
- set := 1
- }
- TextSetString(Ov_Menu_Text_State, onoff)
- }
- MenuCreate() {
- global
- Ov_Menu_Titlebar := BoxCreate(menu_X, menu_Y - 10, menuwidth + 2, 12, 0xFF262626, 0)
- Ov_Menu_Box_Text := BoxCreate(Menu_X, Menu_Y, menuwidth + 2, 0, menubackground, false)
- Ov_Menu_Title := TextCreate("Calibri", 5, 0, 0, menu_X +5, menu_Y -9, 0xFFF57384, "~gsf aimbot 2k18", 1, 0)
- Ov_Menu_Box_Cursor := BoxCreate(Menu_X, Menu_Y -20, menuwidth, 10, swcolor, false)
- Ov_Menu_Box_Lighter := BoxCreate(Menu_X, Menu_Y -20, 1, 10, 0xFFFF5E6E, false)
- Ov_Menu_Text_Text := TextCreate("Calibri", 7, 0, 0, Menu_X + 5, Menu_Y+ TEXT_SPACE_Y, textcolor_default, "...", 1, 0)
- Ov_Menu_Text_State := TextCreate("Calibri", 7, 0, 1, Menu_X + menuwidth -30, Menu_Y + TEXT_SPACE_Y, 0xFFBABABA ,eerrur, 1, 0)
- BoxSetBorder(Ov_Menu_Box_Text, 1, 1)
- BoxSetBorderColor(Ov_Menu_Box_Text, 0xFF000000)
- }
- ListLines, Off
- SetBatchLines, -1
- If(!A_IsAdmin){
- Run *RunAs "%A_ScriptFullPath%" %FullArgsQuoted%,, UseErrorLevel
- If(ErrorLevel){
- MsgBox, 53, WICHTIG: Als Admin starten.
- IfMsgBox, Retry
- Reload
- Else
- ExitApp
- }
- ExitApp
- return
- }
- #NoEnv
- #HotkeyInterval 1
- #KeyHistory 0
- #IfWinActive, GTA:SA:MP
- #SingleInstance, force
- #Persistent
- #HotString EndChars `n
- #HotString ?
- OnExit, freeMemory
- gosub getProcessAndModules
- gosub vars
- gosub arrays
- SetParam("use_window", "1")
- SetParam("window", "GTA:SA:MP")
- gosub mainmenu
- Hotkey, Insert, Menu_Toggle, on
- return
- getProcessAndModules:
- global newPID := getPID("GTA:SA:MP")
- if(newPID)
- global hGTA := openProcess(newPID)
- else{
- MsgBox,GTA wurde nicht gefunden
- ExitApp
- }
- global g_dwSAMP_Addr := getModuleBaseAddress("samp.dll", hGTA)
- global g_dwProcess := 0x400000
- global pMemory := virtualAllocEx(hGTA, 6144, 0x1000 | 0x2000, 0x40)
- global pParam1 := pMemory
- global pParam2 := pMemory + 1024
- global pParam3 := pMemory + 2048
- global pParam4 := pMemory + 3072
- global pParam5 := pMemory + 4096
- global pInjectFunc := pMemory + 5120
- global m := CPed(0)
- global mainMatrix := CPed(1)
- global InfoOffset := InfoOffset(0)
- global SAMPSettings := InfoOffset(1)
- global stPlayerPool := SAMP_pPool("Player")
- __DWORD(12677188, l1)
- __DWORD(12677192, l2)
- global chairX := l1 / 1.885
- global chairY := l2 / 2.50
- global s_chairX := l1 / 2.0
- global s_chairY := l2 / 2.0
- global divX := l1 / 800
- global sub5L9 := ""
- global locked_ped := 0
- AntiCrash()
- SampPatchDisableAnticheat()
- return
- freeMemory:
- virtualFreeEx(hGTA, pMemory, 0, 0x8000)
- closeProcess(hGTA)
- DestroyAllvIsual()
- _subK78L74()
- ExitApp
- return
- vars:
- IniRead, Menu_X, siixmod.ini, d3d9, Menu_X
- IniRead, Menu_Y, siixmod.ini, d3d9, Menu_Y
- IniRead, Smooth, siixmod.ini, d3d9, Smooth, 1.0
- IniRead, fov, siixmod.ini, d3d9, fov, 2.0
- IniRead, silentFOV, siixmod.ini, d3d9, silentFOV, 1.5
- IniRead, boneMode, siixmod.ini, d3d9, boneMode, 4
- global started
- global Smooth
- global FOV
- global silentFOV
- global usedFOV
- global boneMode
- global aim
- global pSilent
- global subI9288 := 0
- global menuwidth := 105
- global titlecolor := 0xFF919191
- global textcolor_default := 0xFFFFFFFF
- global lightercolor := 0xff42B7FF
- global swcolor := 0xAA000000
- global menubackground := 0xff404040
- global Menu_Menu := "Main"
- global Menu_Position := 1
- global Menu_Level := 1
- global Menu_History1 := "Main"
- global Menu_Factor := 10.52
- global TEXT_SPACE_Y := 3
- return
- arrays:
- MenuMain := ["{4286f4}[Smooth Aimbot]{FFFFFF}"
- , " - Smooth Aimbot"
- , " - Smooth +/-"
- , " - FOV +/-"
- , "{8642f4}[Silent Aimbot]{FFFFFF}"
- , " - pSilent"
- , " - FOV +/-"
- , " - Bone"]
- return
- mainmenu:
- MenuCreate()
- return
- Menu_Toggle:
- Menu_State := !Menu_State
- If ( Menu_State )
- {
- Hotkey, Up, Menu_Up, On
- Hotkey, Down, Menu_Down, On
- Hotkey, Enter, Menu_Enter, On
- Hotkey, NumpadAdd, DefineVars, On
- Hotkey, NumpadSub, DefineVars, On
- If ( ! Menu_FT )
- {
- Menu_FT := 1
- MenuUpdate()
- }
- }Else{
- Hotkey, Up, Menu_Up, Off
- Hotkey, Down, Menu_Down, Off
- Hotkey, Enter, Menu_Enter, Off
- Hotkey, NumpadAdd, DefineVars, Off
- Hotkey, NumpadSub, DefineVars, Off
- }
- BoxSetShown(Ov_Menu_Titlebar, Menu_State)
- BoxSetShown(Ov_Menu_Box_Cursor, Menu_State)
- BoxSetShown(Ov_Menu_Box_Lighter, Menu_State)
- BoxSetShown(Ov_Menu_Box_Text, Menu_State)
- TextSetShown(Ov_Menu_Text_Text, Menu_State)
- TextSetShown(Ov_Menu_Title, Menu_State)
- TextSetShown(Ov_Menu_Text_State, Menu_State)
- return
- Menu_Up:
- If (Menu_Position = 1)
- Menu_Position := Menu%Menu_Menu%.MaxIndex()
- else
- Menu_Position--
- MenuUpdate()
- return
- Menu_Down:
- If ( Menu_Position = Menu%Menu_Menu%.MaxIndex())
- Menu_Position := 1
- else Menu_Position++
- MenuUpdate()
- return
- Menu_Enter:
- Goto, Menu%Menu_Menu%_%Menu_Position%
- return
- MenuMain_3:
- MenuMain_4:
- MenuMain_9:
- return
- DefineVars:
- If(A_ThisHotkey == "NumpadAdd"){
- If(Menu_Position == 3){
- If(Smooth < 30.0)
- smooth++
- }else if(Menu_Position == 4){
- If(FOV < 3.5)
- fov += 0.1
- }else if(Menu_Position == 7){
- if(silentFOV < 3.5)
- silentFOV += 0.1
- }else if(Menu_Position == 8){
- If(boneMode < 4)
- boneMode++
- else boneMode := 1
- }
- }else If(A_ThisHotkey == "NumpadSub"){
- If(Menu_Position == 3)
- {
- If(Smooth >1.0)
- smooth--
- }else if(Menu_Position == 4){
- If(FOV > 0.4)
- fov -= 0.1
- }else if(Menu_Position == 7){
- if(silentFOV > 0.4)
- silentFOV -= 0.1
- }else if(Menu_Position == 8){
- If(boneMode >1)
- boneMode--
- else boneMode := 4
- }
- }
- If(aim)
- usedFOV := FOV
- else If(pSilent)
- usedFOV := silentFOV
- IniWrite, %smooth%, siixmod.ini, d3d9, Smooth
- IniWrite, %fov%, siixmod.ini, d3d9, fov
- IniWrite, %silentFOV%, siixmod.ini, d3d9, silentFOV
- IniWrite, %boneMode%, siixmod.ini, d3d9, boneMode
- MenuUpdate()
- return
- MenuMain_1:
- return
- MenuMain_2:
- If(pSilent)
- return
- if(!aim)
- {
- usedFOV := FOV
- If(!started){
- SetTimer, aimer, 30
- started := 1
- }
- }else{
- if(started){
- SetTimer, aimer, off
- started := 0
- }
- }
- aim := !aim, MenuMain_%Menu_Position%_State := aim
- MenuUpdate()
- return
- MenuMain_5:
- return
- MenuMain_6:
- If(aim)
- return
- if(!pSilent)
- {
- usedFOV := silentFOV
- If(!started){
- SetTimer, aimer, 10
- started := 1
- }
- }else{
- if(started){
- SetTimer, aimer, off
- started := 0
- }
- subI9288 := 0
- _subK78L74()
- }
- pSilent := !pSilent, MenuMain_%Menu_Position%_State := pSilent
- MenuUpdate()
- return
- MenuMain_7:
- return
- MenuMain_8:
- return
- aimer:
- If(!WinActive("GTA:SA:MP") || IsChatOpen() || Vehicle(0))
- return
- _subr()
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement