From 21fb9b08ffc01b18449822c5c4355f42a2af2b60 Mon Sep 17 00:00:00 2001 From: Space V <40030799+ahcenezdh@users.noreply.github.com> Date: Sun, 18 Aug 2024 20:00:51 +0200 Subject: [PATCH] feat(natives/heli): update --- VEHICLE/GetHeliTailRotorHealth.md | 40 ++++++++--------- .../SetDisableHeliExplodeFromBodyDamage.md | 6 +-- VEHICLE/SetHeliTailBoomCanBreakOff.md | 44 +++++++++++++++++++ VEHICLE/SetHeliTailExplodeThrowDashboard.md | 16 ------- 4 files changed, 67 insertions(+), 39 deletions(-) create mode 100644 VEHICLE/SetHeliTailBoomCanBreakOff.md delete mode 100644 VEHICLE/SetHeliTailExplodeThrowDashboard.md diff --git a/VEHICLE/GetHeliTailRotorHealth.md b/VEHICLE/GetHeliTailRotorHealth.md index ad734c4e0..c520bd32f 100644 --- a/VEHICLE/GetHeliTailRotorHealth.md +++ b/VEHICLE/GetHeliTailRotorHealth.md @@ -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. \ No newline at end of file diff --git a/VEHICLE/SetDisableHeliExplodeFromBodyDamage.md b/VEHICLE/SetDisableHeliExplodeFromBodyDamage.md index 630f0eebe..f660b4564 100644 --- a/VEHICLE/SetDisableHeliExplodeFromBodyDamage.md +++ b/VEHICLE/SetDisableHeliExplodeFromBodyDamage.md @@ -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 @@ -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; diff --git a/VEHICLE/SetHeliTailBoomCanBreakOff.md b/VEHICLE/SetHeliTailBoomCanBreakOff.md new file mode 100644 index 000000000..a8f9cc1f5 --- /dev/null +++ b/VEHICLE/SetHeliTailBoomCanBreakOff.md @@ -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); +``` \ No newline at end of file diff --git a/VEHICLE/SetHeliTailExplodeThrowDashboard.md b/VEHICLE/SetHeliTailExplodeThrowDashboard.md deleted file mode 100644 index 037262e1d..000000000 --- a/VEHICLE/SetHeliTailExplodeThrowDashboard.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -ns: VEHICLE -aliases: ["WAS_COUNTER_ACTIVATED","0x3EC8BF18AA453FE9"] ---- -## SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD - -```c -// 0x3EC8BF18AA453FE9 0x2916D69B -cs_type(BOOL) void SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD(Vehicle vehicle, BOOL p1); -``` - -## Parameters -* **vehicle**: -* **p1**: - -## Return value