⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdlgtasadeclares.bas

📁 著名单机游戏 gta 圣安地列斯 的外挂 有兴趣的朋友可以看下!
💻 BAS
📖 第 1 页 / 共 2 页
字号:
Type GTASAPlayerAdr
    lngObjectStart As Long
    lngPositionPtr As Long   'this is actually objectstart + 20 offset
    lngPlayerPosAdr As Long  'this is the value of lngPositionPtr
    lngXposAdr As Long       'these values are calculated from the value of lngPositionPtr with offsets
    lngYposAdr As Long
    lngZposAdr As Long
    lngAngleAdr As Long      'offset 1372, Angle in Bogenmass
    lngHealthAdr As Long
    lngMaxHealthAdr As Long
    lngArmorAdr As Long
    lngLastCarAdr As Long
    lngLastBoatAdr As Long
    lngSpecialsAdr As Long
    lngPedSpeedAdr As Long
    lngBrassKnucklesAdr As Long
    lngWeaponsAdr(10) As Long   'addresses for 0-10 combo weapons
    lngWeaponSlotAdr As Long
    lngWeaponIDAdr As Long
    lngDetonatorAdr As Long
End Type
Global GTASAPlayerAddresse As GTASAPlayerAdr

Type GTASAWeaponSlotData
    lngWeaponID As Long
    lngWas1 As Long
    lngLoadedAmmo As Long
    lngTotalAmmo As Long
End Type
Global GTASAPlayerWeapon As GTASAWeaponSlotData
Global HookPlayerWeapon As GTASAWeaponSlotData
Global ExecPlayerWeapon As GTASAWeaponSlotData
Global ConsolePlayerWeapon As GTASAWeaponSlotData

Type GTASACarAdr
    isUsable As Boolean      'if this adr block actually and still belongs to a car or not (gtasa addresses cars and peds in the same manner!!)
    isRCCar As Boolean
    lngObjectStart As Long   'this object start is equal to player object start if player is not in car !!!!
    lngPositionPtr As Long   'this is actually objectstart + 20 offset
    lngCarPosAdr As Long     'this is the value that is read from lngPositionPtr
    lngCarLocAdr As Long     'these values are calculated from lngPositionPtr with offsets
    lngCarIDAdr As Long      'saved in HiWord of a long value. We point to the integer offset: 34
    lngSpecialsAdr As Long   'bit coded specials as integer will be read from this location (obj start + 66 offset)
    lngCarSpeedAdr As Long   'objstart + 68
    lngCarSpinAdr As Long    'objstart + 80
    lngCarWeightAdr As Long  'objstart + 140
    lngBikeWheelAdr As Long  'objstart + vc:812???
    lngStalledAdr As Long    'objstart + 1064
    lngCarColorAdr As Long   'objstart + 1076
    lngSirenTimeAdr As Long  'objstart + 1116
    lngCarDamageAdr As Long  'objstart + 1216
    lngCarTrailerAdr As Long 'objstart + 1224 (dynamic. gets the pointer if car has trailer, otherwise 0)
    lngCarLastTrailerPtr As Long 'this is the mirror to the trailer, in case the trailer is temporarily not anymore attached)
    lngCarDoorAdr As Long    'objstart + 1272
    lngLicensePlateAdr As Long 'objstart + 1416 -> read value + 16
    lngCarWheelAdr As Long   'objstart + 1444
    lngBurnTimerAdr As Long  'objstart + 2276 float in ms that counts up until car explodes
    lngCarDetachPosAdr(14) As Long 'according to car or bike, different offsets...
    lngBikeDetachPosAdr(13) As Long 'according to car or bike, different offsets...
End Type
Global tCurrCarAdr As GTASACarAdr
Global tCurrTrailer As GTASACarAdr
Global tOldCarAdr As GTASACarAdr

Global GTASACheats As New cCheatCollection        'Holds the cheats read from ini
Global GTASANewCheat As New cCheats
Global GTASAWarpLocs As New cWarpLocCollection     'Holds the WarpLocs read from ini
Global GTASANewWarpLoc As New cWarpLocs     'Holds the WarpLoc information, read online from GTASA
Global GTASAShortcuts As New cShortcutCollection
Global GTASANewShortcut As New cShortcuts

'ConsoleCommand (internal command of GTASA Control Center)
Type GTASAConsoleCommand
    Command As Integer
    Description As String
    Data As String
    DataPage As Integer
End Type
Global GTASAConsoleCommands(150) As GTASAConsoleCommand

'Positioning Data buffer for Read/Paste Warp Locations:
Type GTASAWarpCarPosData '60 Bytes
    XGrad As Single
    YGrad As Single
    ZGrad As Single
    Reserve1 As Single
    XLook As Single
    YLook As Single
    ZLook As Single
    Reserve2 As Single
    XWhat As Single
    YWhat As Single
    ZWhat As Single
    Reserve3 As Single
    XPos As Single
    YPos As Single
    ZPos As Single
End Type
Global GTASAWarpCarPos As GTASAWarpCarPosData
Global GTASAWarpCarPosBefore As GTASAWarpCarPosData
Global GTASAWarpTrailerPos As GTASAWarpCarPosData
Global GTASAWarpTrailerPosBefore As GTASAWarpCarPosData
Global intCarIDforWarp As Integer
Global WarpTrailerExecBuffer As GTASAWarpCarPosData
Global WarpCarExecBuffer As GTASAWarpCarPosData
Global WarpPlayerExecBuffer As GTASAWarpCarPosData

Type GTASATurnCarDegreeData '44 Bytes
    XGrad As Single
    YGrad As Single
    ZGrad As Single
    Reserve1 As Single
    XLook As Single
    YLook As Single
    ZLook As Single
    Reserve2 As Single
    XWhat As Single
    YWhat As Single
    ZWhat As Single
End Type
Global turnCarExecBuffer As GTASATurnCarDegreeData
Global turnPedExecBuffer As GTASATurnCarDegreeData

Type GTASAScreenText '64 Bytes
    CharValue(63) As Byte
End Type
Global GTASAText As GTASAScreenText

Type GTASASubMissionTimes
    lngAddresse As Long
    lngTimeLeft As Long
End Type

Global SubMissionTime(20) As GTASASubMissionTimes '21 SubMission Time Adresses

Global WeaponSlotMatrix(10, 8) As Long '10 combo's, up to 8+1 items
Global WeaponSlotCombo(46, 1) As Long 'up to weapon id:46. cell2 is for 0, combo ordinal, for 1, item ordinal

Global WeaponIDtoDatID(46) As Long
Global DatIDtoWeaponID(400) As Long


'Types/API Calls for Window Placement (of GTASA, if GTASA has focus or not)
Type POINTAPI
    x As Long
    y As Long
End Type
Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Type WINDOWPLACEMENT
    Length As Long
    flags As Long
    showCmd As Long
    ptMinPosition As POINTAPI
    ptMaxPosition As POINTAPI
    rcNormalPosition As RECT
End Type
Global gtaSAWindow As WINDOWPLACEMENT
'API CALL for Window Placement:
Declare Function GetWindowPlacement Lib "user32" (ByVal hwnd As Long, lpwndpl As WINDOWPLACEMENT) As Long
'SLEEP API:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'Send Keystrokes (for Internal Cheats:
Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    Global Const KEYEVENTF_KEYUP = &H2
    Global Const KEYEVENTF_EXTENDEDKEY = &H1
'GetKeystates (for Shortcuts):
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
'Memory Management API's
Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
    Global Const SYNCHRONIZE As Long = &H100000
    Global Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000
    Global Const PROCESS_ALL_ACCESS As Long = (STANDARD_RIGHTS_REQUIRED Or SYNCHRONIZE Or &HFFF)
'Copy Memory API:
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)
'Declare Sub CopyMemoryFromPtr Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Long, ByVal ByteLen As Long)
'Declare Sub CopyMemoryToPtr Lib "kernel32" Alias "RtlMoveMemory" (pDst As Long, pSrc As Any, ByVal ByteLen As Long)
'Sound Feedback:
Declare Function BeepNow Lib "kernel32" Alias "Beep" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
'Read / Write INI File API's
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
'Global Variables:
Global lngHWnd As Long              'HWND variable for GotHandleToGTASA function
Global lngPid As Long               'process-id
Global lngPHandle As Long           'process handle
Global lngReadBuffer As Long        'ReadALong buffer
Global intWriteBuffer As Integer    'WriteAnInt buffer
Global intReadBuffer As Integer     'ReadAnInt buffer
Global bytReadBuffer As Byte        'ReadAByte buffer
Global sngReadBuffer As Single      'ReadAFloat buffer
Global MemAddress As Long           'Memory Address
Global isHasHandle As Boolean       'If GTASA Handle retrieved or not
Global isHasPlayer As Boolean          'If Player initialised or not
Global intCounter As Integer        'integer counter
Global lngZSpeed As Long            'Z speed temp. variable
Global strBuffer As String          'misc. temp. buffer
Global intCharCounter As Integer    'int. counter
Global intSendOrdinal As Integer    'int. counter
Global strTextLine As String        'temp string var. to read from files
Global lngCarAdr As Long            'Start Adr. of Car
Global lngPreviousCarAdr As Long    'Start Adr. of Previous Car
Global isCollectingGarbage As Boolean   'If closing the program or not
Global strIniFileName As String        'FileName of ini File
Global strPicFileName As String         'Filename of dat file
Global strDatFileName As String         'Filename of dat file
Global strCfgFileName As String         'Filename of cfg file
Global strCheatFileName As String             'Filename of cfg file
Global strLocsFileName      As String         'Filename of cfg file
Global intLastPickedColor As Integer 'Ordinal of Last Picked Color
Global Const TrueBool As Boolean = True  'For Select case on bool.
Global Const mathPI As Double = 3.14159265358979  'for Float to Degrees calculation
                               '3.1415926535897932384626433832795
Global sngMMsPerTwipX As Single
Global sngMMsPerTwipY As Single

Global isCarPicsReady As Boolean

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -