Skip to content

Commit

Permalink
Merge branch 'citizenfx:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
coalaura authored Nov 5, 2024
2 parents 29e665d + 35b42e8 commit fcdfb2f
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 89 deletions.
12 changes: 12 additions & 0 deletions CAM/DisableCinematicBonnetCameraThisUpdate.md
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 0 additions & 17 deletions CAM/DisableFirstPersonCamThisFrame.md

This file was deleted.

12 changes: 12 additions & 0 deletions CAM/DisableOnFootFirstPersonViewThisUpdate.md
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 0 additions & 11 deletions CAM/DisableVehicleFirstPersonCamThisFrame.md

This file was deleted.

2 changes: 1 addition & 1 deletion MISC/GetNextWeatherTypeHashName.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion MISC/GetPrevWeatherTypeHashName.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion MISC/GetWeatherTypeTransition.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand Down
2 changes: 1 addition & 1 deletion MISC/IsNextWeatherType.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand Down
2 changes: 1 addition & 1 deletion MISC/IsPrevWeatherType.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand Down
2 changes: 1 addition & 1 deletion MISC/SetOverrideWeather.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**:
Expand Down
2 changes: 2 additions & 0 deletions MISC/SetWeatherTypeNow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion MISC/SetWeatherTypeOvertimePersist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion MISC/SetWeatherTypePersist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion MISC/SetWeatherTypeTransition.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
41 changes: 23 additions & 18 deletions PATHFIND/GetSafeCoordForPed.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
17 changes: 0 additions & 17 deletions VEHICLE/GetVehicleWeaponCapacity.md

This file was deleted.

18 changes: 18 additions & 0 deletions VEHICLE/GetVehicleWeaponRestrictedAmmo.md
Original file line number Diff line number Diff line change
@@ -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.
17 changes: 0 additions & 17 deletions VEHICLE/SetVehicleWeaponCapacity.md

This file was deleted.

29 changes: 29 additions & 0 deletions VEHICLE/SetVehicleWeaponRestrictedAmmo.md
Original file line number Diff line number Diff line change
@@ -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 `<Item>` corresponds to an index starting from `0`.
```
<uWeaponHash>
<Item>VEHICLE_WEAPON_PLAYER_BUZZARD</Item> <!-- Index: 0 -->
<Item>VEHICLE_WEAPON_SPACE_ROCKET</Item> <!-- Index: 1 -->
<Item>VEHICLE_WEAPON_SEARCHLIGHT</Item> <!-- Index: 2 -->
</uWeaponHash>
```
## 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.

0 comments on commit fcdfb2f

Please sign in to comment.