diff --git a/saco/game/common.h b/saco/game/common.h index de3af63..9cedff0 100644 --- a/saco/game/common.h +++ b/saco/game/common.h @@ -121,6 +121,13 @@ typedef struct _VEHICLE_TYPE //----------------------------------------------------------- +typedef struct _BUILDING_TYPE +{ + char _gap0[56]; +} BUILDING_TYPE; + +//----------------------------------------------------------- + #define TRAIN_PASSENGER_LOCO 537 #define TRAIN_FREIGHT_LOCO 538 #define TRAIN_PASSENGER 569 diff --git a/saco/game/util.cpp b/saco/game/util.cpp index 555d7aa..f16584d 100644 --- a/saco/game/util.cpp +++ b/saco/game/util.cpp @@ -1145,6 +1145,20 @@ PED_TYPE * __stdcall GamePool_FindPlayerPed() return *(PED_TYPE **)(0xB7CD98); } +//----------------------------------------------------------- + +BUILDING_TYPE * GamePool_GetBuilding() +{ + BUILDING_TYPE *pBuildingRet; + + _asm mov eax, 0xB74498 + _asm mov edx, [eax] + _asm mov eax, [edx] + _asm mov pBuildingRet, eax + + return pBuildingRet; +} + //----------------------------------------------------------- // Translate Weapon model ID into actual weapon ID. diff --git a/saco/game/util.h b/saco/game/util.h index 8f8cb63..ce8d62f 100644 --- a/saco/game/util.h +++ b/saco/game/util.h @@ -34,3 +34,6 @@ BOOL IsFileOrDirectoryExists(char * szPath); DWORD unnamed_100B6100(char *szString, int nMaxLen); bool unnamed_100B4B50(VECTOR *vecPos); + +BUILDING_TYPE * GamePool_GetBuilding(); +