diff --git a/CAM/DisableCinematicBonnetCameraThisUpdate.md b/CAM/DisableCinematicBonnetCameraThisUpdate.md new file mode 100644 index 000000000..26c5f132f --- /dev/null +++ b/CAM/DisableCinematicBonnetCameraThisUpdate.md @@ -0,0 +1,12 @@ +--- +ns: CAM +aliases: ["_DISABLE_VEHICLE_FIRST_PERSON_CAM_THIS_FRAME"] +--- +## DISABLE_CINEMATIC_BONNET_CAMERA_THIS_UPDATE + +```c +// 0xADFF1B2A555F5FBA 0x5AC6DAC9 +void DISABLE_CINEMATIC_BONNET_CAMERA_THIS_UPDATE(); +``` + +Disables first person camera while in a vehicle for the current tick. diff --git a/CAM/DisableFirstPersonCamThisFrame.md b/CAM/DisableFirstPersonCamThisFrame.md deleted file mode 100644 index b65948b42..000000000 --- a/CAM/DisableFirstPersonCamThisFrame.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -ns: CAM ---- -## _DISABLE_FIRST_PERSON_CAM_THIS_FRAME - -```c -// 0xDE2EF5DA284CC8DF -void _DISABLE_FIRST_PERSON_CAM_THIS_FRAME(); -``` - -``` -Disables first person camera for the current frame. -Found in decompiled scripts: -GRAPHICS::DRAW_DEBUG_TEXT_2D("Disabling First Person Cam", 0.5, 0.8, 0.0, 0, 0, 255, 255); -CAM::_DE2EF5DA284CC8DF(); -``` - diff --git a/CAM/DisableOnFootFirstPersonViewThisUpdate.md b/CAM/DisableOnFootFirstPersonViewThisUpdate.md new file mode 100644 index 000000000..14d493167 --- /dev/null +++ b/CAM/DisableOnFootFirstPersonViewThisUpdate.md @@ -0,0 +1,12 @@ +--- +ns: CAM +aliases: ["_DISABLE_FIRST_PERSON_CAM_THIS_FRAME"] +--- +## DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE + +```c +// 0xDE2EF5DA284CC8DF +void DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE(); +``` + +Disables first person camera while on foot for the current tick. diff --git a/CAM/DisableVehicleFirstPersonCamThisFrame.md b/CAM/DisableVehicleFirstPersonCamThisFrame.md deleted file mode 100644 index 25380ef9f..000000000 --- a/CAM/DisableVehicleFirstPersonCamThisFrame.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -ns: CAM ---- -## _DISABLE_VEHICLE_FIRST_PERSON_CAM_THIS_FRAME - -```c -// 0xADFF1B2A555F5FBA 0x5AC6DAC9 -void _DISABLE_VEHICLE_FIRST_PERSON_CAM_THIS_FRAME(); -``` - - diff --git a/MISC/GetNextWeatherTypeHashName.md b/MISC/GetNextWeatherTypeHashName.md index 73007e211..b05e52b40 100644 --- a/MISC/GetNextWeatherTypeHashName.md +++ b/MISC/GetNextWeatherTypeHashName.md @@ -9,6 +9,6 @@ aliases: ["_GET_NEXT_WEATHER_TYPE"] Hash GET_NEXT_WEATHER_TYPE_HASH_NAME(); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Return value diff --git a/MISC/GetPrevWeatherTypeHashName.md b/MISC/GetPrevWeatherTypeHashName.md index c3d8830ac..eb697f948 100644 --- a/MISC/GetPrevWeatherTypeHashName.md +++ b/MISC/GetPrevWeatherTypeHashName.md @@ -9,6 +9,6 @@ aliases: ["_GET_PREV_WEATHER_TYPE"] Hash GET_PREV_WEATHER_TYPE_HASH_NAME(); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Return value diff --git a/MISC/GetWeatherTypeTransition.md b/MISC/GetWeatherTypeTransition.md index 2dea5fe99..11de50c03 100644 --- a/MISC/GetWeatherTypeTransition.md +++ b/MISC/GetWeatherTypeTransition.md @@ -8,7 +8,7 @@ ns: MISC void _GET_WEATHER_TYPE_TRANSITION(Hash* weatherType1, Hash* weatherType2, float* percentWeather2); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Parameters * **weatherType1**: diff --git a/MISC/IsNextWeatherType.md b/MISC/IsNextWeatherType.md index e16e2b454..54beb45c4 100644 --- a/MISC/IsNextWeatherType.md +++ b/MISC/IsNextWeatherType.md @@ -8,7 +8,7 @@ ns: MISC BOOL IS_NEXT_WEATHER_TYPE(char* weatherType); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Parameters * **weatherType**: diff --git a/MISC/IsPrevWeatherType.md b/MISC/IsPrevWeatherType.md index 61da2cd1d..43573edf2 100644 --- a/MISC/IsPrevWeatherType.md +++ b/MISC/IsPrevWeatherType.md @@ -8,7 +8,7 @@ ns: MISC BOOL IS_PREV_WEATHER_TYPE(char* weatherType); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Parameters * **weatherType**: diff --git a/MISC/SetOverrideWeather.md b/MISC/SetOverrideWeather.md index 8d1bbe29f..8f3868683 100644 --- a/MISC/SetOverrideWeather.md +++ b/MISC/SetOverrideWeather.md @@ -8,7 +8,7 @@ ns: MISC void SET_OVERRIDE_WEATHER(char* weatherType); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Parameters * **weatherType**: diff --git a/MISC/SetWeatherTypeNow.md b/MISC/SetWeatherTypeNow.md index c082fe411..82f40c9d1 100644 --- a/MISC/SetWeatherTypeNow.md +++ b/MISC/SetWeatherTypeNow.md @@ -32,6 +32,8 @@ NativeDB Introduced: v323 - BLIZZARD - HALLOWEEN - NEUTRAL +- RAIN_HALLOWEEN +- SNOW_HALLOWEEN ## Parameters * **weatherType**: The weather type to set. This should be one of the predefined weather type strings. diff --git a/MISC/SetWeatherTypeOvertimePersist.md b/MISC/SetWeatherTypeOvertimePersist.md index ca97ea803..96a41c2aa 100644 --- a/MISC/SetWeatherTypeOvertimePersist.md +++ b/MISC/SetWeatherTypeOvertimePersist.md @@ -9,7 +9,7 @@ aliases: ["_SET_WEATHER_TYPE_OVER_TIME"] void SET_WEATHER_TYPE_OVERTIME_PERSIST(char* weatherType, float time); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ## Parameters * **weatherType**: The weather type to override to. diff --git a/MISC/SetWeatherTypePersist.md b/MISC/SetWeatherTypePersist.md index 0ab19c7e5..bc3ab52d5 100644 --- a/MISC/SetWeatherTypePersist.md +++ b/MISC/SetWeatherTypePersist.md @@ -17,4 +17,4 @@ NativeDB Introduced: v323 ``` ## Parameters -* **weatherType**: The weather type to be set as persistent. Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for a list of weather type strings. +* **weatherType**: The weather type to be set as persistent. Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for a list of weather type strings. diff --git a/MISC/SetWeatherTypeTransition.md b/MISC/SetWeatherTypeTransition.md index 66537bb7a..a3a3ba0e3 100644 --- a/MISC/SetWeatherTypeTransition.md +++ b/MISC/SetWeatherTypeTransition.md @@ -8,7 +8,7 @@ ns: MISC void _SET_WEATHER_TYPE_TRANSITION(Hash weatherType1, Hash weatherType2, float percentWeather2); ``` -Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](#_0xED712CA327900C8A) for weather types. +Refer to [`SET_WEATHER_TYPE_NOW`](#_0x29B487C359E19889) for weather types. ``` Mixes two weather types. If percentWeather2 is set to 0.0f, then the weather will be entirely of weatherType1, if it is set to 1.0f it will be entirely of weatherType2. If it's set somewhere in between, there will be a mixture of weather behaviors. To test, try this in the RPH console, and change the float to different values between 0 and 1: diff --git a/PATHFIND/GetSafeCoordForPed.md b/PATHFIND/GetSafeCoordForPed.md index 5a611af2c..7b959010a 100644 --- a/PATHFIND/GetSafeCoordForPed.md +++ b/PATHFIND/GetSafeCoordForPed.md @@ -5,28 +5,33 @@ ns: PATHFIND ```c // 0xB61C8E878A4199CA 0xB370270A -BOOL GET_SAFE_COORD_FOR_PED(float x, float y, float z, BOOL onGround, Vector3* outPosition, int flags); +BOOL GET_SAFE_COORD_FOR_PED(float x, float y, float z, BOOL onlyOnPavement, Vector3* outPosition, int flags); ``` -``` -Flags are: -1 = 1 = B02_IsFootpath -2 = 4 = !B15_InteractionUnk -4 = 0x20 = !B14_IsInterior -8 = 0x40 = !B07_IsWater -16 = 0x200 = B17_IsFlatGround -When onGround == true outPosition is a position located on the nearest pavement. -When a safe coord could not be found the result of a function is false and outPosition == Vector3.Zero. -In the scripts these flags are used: 0, 14, 12, 16, 20, 21, 28. 0 is most commonly used, then 16. -16 works for me, 0 crashed the script. +```cpp +enum eSafePositionFlags { + // Only navmesh polygons marked as pavement + GSC_FLAG_ONLY_PAVEMENT = 1, + // Only navmesh polygons not marked as "isolated" + GSC_FLAG_NOT_ISOLATED = 2, + // No navmesh polygons created from interiors + GSC_FLAG_NOT_INTERIOR = 4, + // No navmesh polygons marked as water + GSC_FLAG_NOT_WATER = 8, + // Only navmesh polygons marked as "network spawn candidate" + GSC_FLAG_ONLY_NETWORK_SPAWN = 16, + // Specify whether to use a flood-fill from the starting position, as opposed to scanning all polygons within the search volume + GSC_FLAG_USE_FLOOD_FILL = 32 +} ``` ## Parameters -* **x**: -* **y**: -* **z**: -* **onGround**: -* **outPosition**: -* **flags**: +* **x**: The X coordinate of the point to check. +* **y**: The Y coordinate of the point to check. +* **z**: The Z coordinate of the point to check. +* **onlyOnPavement**: Sets the `GSC_FLAG_ONLY_PAVEMENT` flag. +* **outPosition**: The location of the safe coord. +* **flags**: The search flags. ## Return value +Returns true if a safe coord was found and false otherwise. \ No newline at end of file diff --git a/VEHICLE/GetVehicleWeaponCapacity.md b/VEHICLE/GetVehicleWeaponCapacity.md deleted file mode 100644 index 38ff9edaf..000000000 --- a/VEHICLE/GetVehicleWeaponCapacity.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -ns: VEHICLE -aliases: ["0x8181CE2F25CB9BB7"] ---- -## _GET_VEHICLE_WEAPON_CAPACITY - -```c -// 0x8181CE2F25CB9BB7 -int _GET_VEHICLE_WEAPON_CAPACITY(Vehicle vehicle, int weaponIndex); -``` - - -## Parameters -* **vehicle**: -* **weaponIndex**: - -## Return value diff --git a/VEHICLE/GetVehicleWeaponRestrictedAmmo.md b/VEHICLE/GetVehicleWeaponRestrictedAmmo.md new file mode 100644 index 000000000..401e57408 --- /dev/null +++ b/VEHICLE/GetVehicleWeaponRestrictedAmmo.md @@ -0,0 +1,18 @@ +--- +ns: VEHICLE +aliases: ["0x8181CE2F25CB9BB7", "_GET_VEHICLE_WEAPON_CAPACITY"] +--- +## GET_VEHICLE_WEAPON_RESTRICTED_AMMO + +```c +// 0x8181CE2F25CB9BB7 +int GET_VEHICLE_WEAPON_RESTRICTED_AMMO(Vehicle vehicle, int weaponIndex); +``` + + +## Parameters +* **vehicle**: The vehicle handle +* **weaponIndex**: The weapon index we're getting ammo for (see [SET_VEHICLE_WEAPON_RESTRICTED_AMMO](#_0x44CD1F493DB2A0A6) for information on how to access these slots). + +## Return value +Gets the current restricted ammo count for a particular vehicle weapon index on a vehicle. \ No newline at end of file diff --git a/VEHICLE/SetVehicleWeaponCapacity.md b/VEHICLE/SetVehicleWeaponCapacity.md deleted file mode 100644 index 2d9c2b8ca..000000000 --- a/VEHICLE/SetVehicleWeaponCapacity.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -ns: VEHICLE -aliases: ["0x44CD1F493DB2A0A6"] ---- -## _SET_VEHICLE_WEAPON_CAPACITY - -```c -// 0x44CD1F493DB2A0A6 -void _SET_VEHICLE_WEAPON_CAPACITY(Vehicle vehicle, int weaponIndex, int capacity); -``` - - -## Parameters -* **vehicle**: -* **weaponIndex**: -* **capacity**: - diff --git a/VEHICLE/SetVehicleWeaponRestrictedAmmo.md b/VEHICLE/SetVehicleWeaponRestrictedAmmo.md new file mode 100644 index 000000000..822f26eb5 --- /dev/null +++ b/VEHICLE/SetVehicleWeaponRestrictedAmmo.md @@ -0,0 +1,29 @@ +--- +ns: VEHICLE +aliases: ["0x44CD1F493DB2A0A6", "_SET_VEHICLE_WEAPON_CAPACITY"] +--- +## SET_VEHICLE_WEAPON_RESTRICTED_AMMO + +```c +// 0x44CD1F493DB2A0A6 +void SET_VEHICLE_WEAPON_RESTRICTED_AMMO(Vehicle vehicle, int weaponIndex, int ammoCount); +``` +Sets a limited number of ammo for a particular vehicle weapon index on a vehicle. + +Information about weapon indexes can be found in `handling.meta`. + +In the example given below, `uWeaponHash` defines weapon hashes for the vehicle. Each `` corresponds to an index starting from `0`. + +``` + + VEHICLE_WEAPON_PLAYER_BUZZARD + VEHICLE_WEAPON_SPACE_ROCKET + VEHICLE_WEAPON_SEARCHLIGHT + +``` + +## Parameters +* **vehicle**: The vehicle handle +* **weaponIndex**: The weapon index we're setting ammo for (between `0` and `3`), see description for more. +* **ammoCount**: When set positive, will count down with every fire and prevent firing at `0`. Set `-1` to disable restricted ammo. +