Skip to content

Commit

Permalink
feat(natives/heli): update (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacevx authored Aug 21, 2024
1 parent f4ba605 commit 54a0002
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 39 deletions.
40 changes: 20 additions & 20 deletions VEHICLE/GetHeliTailRotorHealth.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
ns: VEHICLE
aliases: ["_GET_HELI_TAIL_ROTOR_HEALTH"]
---
## GET_HELI_TAIL_ROTOR_HEALTH

```c
// 0xAE8CE82A4219AC8C 0xA41BC13D
float GET_HELI_TAIL_ROTOR_HEALTH(Vehicle vehicle);
```
```
Max 1000.
At 0 the tail rotor will stall.
```
## Parameters
* **vehicle**:
## Return value
---
ns: VEHICLE
aliases: ["_GET_HELI_TAIL_ROTOR_HEALTH"]
---
## GET_HELI_TAIL_ROTOR_HEALTH

```c
// 0xAE8CE82A4219AC8C 0xA41BC13D
float GET_HELI_TAIL_ROTOR_HEALTH(Vehicle heli);
```
```
NativeDB Introduced: v323
```
## Parameters
* **heli**: Helicopter for which you want to get the rotor health.
## Return value
Returns the health of the rear rotor of the helicopter, not the tail rotor as the name suggests. The maximum value is 1000. At 0, the tail rotor will stall.
6 changes: 3 additions & 3 deletions VEHICLE/SetDisableHeliExplodeFromBodyDamage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases: ["0xEDBC8405B3895CC9"]
void SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE(Vehicle helicopter, cs_type(Any) BOOL disableExplode);
```
Prevents a helicopter from exploding due to relatively minor body damage. This native can be particularly useful in gameplay scenarios or missions where helicopters are subject to damage that would not realistically cause an explosion, ensuring they remain operational unless subjected to more significant damage.
Prevents a helicopter from exploding due to relatively minor body damage.
```
NativeDB Introduced: v1103
Expand Down Expand Up @@ -52,10 +52,10 @@ SetDisableHeliExplodeFromBodyDamage(helicopter, true);
using static CitizenFX.Core.Native.API;

// Retrieve the player ped.
Ped playerPed = PlayerPedId();
int playerPed = PlayerPedId();

// Retrieve the helicopter the player is currently in.
Vehicle helicopter = GetVehiclePedIsIn(playerPed, false);
int helicopter = GetVehiclePedIsIn(playerPed, false);

// If the player is not in a helicopter, or the vehicle is not a helicopter, return.
if (helicopter == 0 || !IsThisModelAHeli(GetEntityModel(helicopter))) return;
Expand Down
44 changes: 44 additions & 0 deletions VEHICLE/SetHeliTailBoomCanBreakOff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
ns: VEHICLE
aliases: ["SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD", "WAS_COUNTER_ACTIVATED","0x3EC8BF18AA453FE9"]
---
## SET_HELI_TAIL_BOOM_CAN_BREAK_OFF

```c
// 0x3EC8BF18AA453FE9 0x2916D69B
cs_type(BOOL) void SET_HELI_TAIL_BOOM_CAN_BREAK_OFF(Vehicle heli, BOOL toggle);
```
Enables or disables the ability for a helicopter's tail boom to break off.
```
NativeDB Introduced: v323
```
## Parameters
* **heli**: The helicopter for which the tail boom can break off.
* **toggle**: Determines whether the helicopter's tail boom can break off.
## Examples
```lua
local heli = GetVehiclePedIsIn(PlayerPedId(), false)
if heli == 0 or GetVehicleType(heli) ~= "heli" then return end
SetHeliTailBoomCanBreakOff(heli, true)
```

```javascript
const heli = GetVehiclePedIsIn(PlayerPedId(), false);
if (heli === 0 || GetVehicleType(heli) !== "heli") return;

SetHeliTailBoomCanBreakOff(heli, true);
```

```csharp
using static CitizenFX.Core.Native.API;

int heli = GetVehiclePedIsIn(PlayerPedId(), false);
if (heli == 0 || GetVehicleType(heli) !== "heli") return;

SetHeliTailBoomCanBreakOff(heli, true);
```
16 changes: 0 additions & 16 deletions VEHICLE/SetHeliTailExplodeThrowDashboard.md

This file was deleted.

0 comments on commit 54a0002

Please sign in to comment.