Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 3407 natives #1234

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ENTITY/SetEntityNoCollisionWithNetworkedEntity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
ns: ENTITY
---
## _SET_ENTITY_NO_COLLISION_WITH_NETWORKED_ENTITY

```c
// 0x0A27A7827347B3B1
void _SET_ENTITY_NO_COLLISION_WITH_NETWORKED_ENTITY(Entity entity1, Entity entity2);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **entity1**:
* **entity2**:
23 changes: 23 additions & 0 deletions GRAPHICS/HasScaleformMovieNamedLoaded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
ns: GRAPHICS
---
## _HAS_SCALEFORM_MOVIE_NAMED_LOADED

```c
// 0x9743BCCF7CD6E1F6
BOOL _HAS_SCALEFORM_MOVIE_NAMED_LOADED(int* scaleformHandle, char* scaleformName);
```

Check if a Scaleform movie with the given name has been loaded.

```
NativeDB Introduced: v3407
```

## Parameters
* **scaleformHandle**: Scaleform movie handle
* **scaleformName**: Name of the Scaleform movie to check


## Return value
Returns `true` if the named Scaleform movie is loaded, `false` otherwise.
17 changes: 17 additions & 0 deletions HUD/ShowPurchaseInstructionalButton.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: HUD
---
## _SHOW_PURCHASE_INSTRUCTIONAL_BUTTON

```c
// 0xF6865E26067B708C
void _SHOW_PURCHASE_INSTRUCTIONAL_BUTTON(BOOL toggle);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **toggle**:
23 changes: 23 additions & 0 deletions PED/IsPedInSphereAreaOfAnyEnemyPeds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
ns: PED
---
## IS_PED_IN_SPHERE_AREA_OF_ANY_ENEMY_PEDS

```c
// 0x082D79E15302F0C2
BOOL IS_PED_IN_SPHERE_AREA_OF_ANY_ENEMY_PEDS(Ped ped, float x, float y, float z, float range);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **ped**: The ped to check.
* **x**: X coordinate
* **y**: Y coordinate
* **z**: Z coordinate
* **range**: Radius of sphere.
## Return value
Returns `true` if ped is within range of any enemies, `false` otherwise.
22 changes: 22 additions & 0 deletions PED/SetPedSurvivesBeingOutOfWater.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
ns: PED
---
## _SET_PED_SURVIVES_BEING_OUT_OF_WATER

```c
// 0x100CD221F572F6E1
BOOL _SET_PED_SURVIVES_BEING_OUT_OF_WATER(Ped ped, BOOL toggle);
```
Allows marine animals to survive outside of water (R* is using it for sharks).
```
NativeDB Introduced: v3407
```
## Parameters
* **ped**: The marine animal ped
* **toggle**: `true` to allow survival out of water, `false` to apply normal water restrictions.
## Return value
Returns `true` if successful.
19 changes: 19 additions & 0 deletions PHYSICS/GetDamping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: PHYSICS
---
## GET_DAMPING

```c
// 0x8C520A929415BCD2
Vector3 GET_DAMPING(Entity entity, int type);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **entity**:
* **type**:
## Return value
17 changes: 17 additions & 0 deletions TASK/ClearPedScriptTaskIfRunningThreatResponseNonTempTask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: TASK
---
## CLEAR_PED_SCRIPT_TASK_IF_RUNNING_THREAT_RESPONSE_NON_TEMP_TASK

```c
// 0xF6DC48E56BE1243A
void CLEAR_PED_SCRIPT_TASK_IF_RUNNING_THREAT_RESPONSE_NON_TEMP_TASK(Ped ped);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **ped**:
47 changes: 47 additions & 0 deletions TASK/TaskSharkCircleCoord.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
ns: TASK
---
## TASK_SHARK_CIRCLE_COORD

```c
// 0x60A19CF85FF4CEFA
void TASK_SHARK_CIRCLE_COORD(Ped ped, float x, float y, float z, float moveBlendRatio, float radius);
```

Makes a shark ped circle around specified coordinates.

```
NativeDB Introduced: v3407
```

## Parameters
* **ped**: The shark ped.
* **x**: X coordinate to circle around
* **y**: Y coordinate to circle around
* **z**: Z coordinate to circle around
* **moveBlendRatio**: Animation blend ratio from 0.0 to 1.0
* **radius**: Radius of the circular path in meters

## Examples
```lua
CreateThread(function()
RequestModel(sharkModel)

while not HasModelLoaded(sharkModel) do
Wait(0)
end

local sharkModel = GetHashKey("a_c_sharktiger")
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
local coords = GetEntityCoords(PlayerPedId(), false)
local shark = CreatePed(28, sharkModel, coords.x, coords.y, coords.z, 0.0, true, true)

SetModelAsNoLongerNeeded(sharkModel)

if shark == 0 then return end

TaskSharkCircleCoord(shark, coords.x, coords.y, coords.z - 5.0, 1.0, 10.0)

Wait(10000) -- We're letting the shark do circle movement for 10 seconds
ClearPedTasks(shark) -- Going to stop the task
end)
```
8 changes: 6 additions & 2 deletions VEHICLE/DisableIndividualPlanePropeller.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ aliases: ["0x500873A45724C863","_DISABLE_PLANE_PROPELLER"]
void DISABLE_INDIVIDUAL_PLANE_PROPELLER(Vehicle vehicle, int propeller);
```
```
NativeDB Introduced: v323
```
## Parameters
* **vehicle**:
* **propeller**:
* **vehicle**: The propeller plane
* **propeller**: The propeller index to disable (starts at 0).
32 changes: 32 additions & 0 deletions VEHICLE/EnableIndividualPlanePropeller.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
ns: VEHICLE
---
## _ENABLE_INDIVIDUAL_PLANE_PROPELLER

```c
// 0xDC05D2777F855F44
void _ENABLE_INDIVIDUAL_PLANE_PROPELLER(Vehicle plane, int propeller);
```

Enables individual propeller on a propeller plane. This native is the inverse of [`DISABLE_INDIVIDUAL_PLANE_PROPELLER`](#_0x500873A45724C863).

```
NativeDB Introduced: v3407
```

## Parameters
* **plane**: The propeller plane.
* **propeller**: The propeller index to enable (starts at 0).

## Examples
```lua
CreateThread(function()
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) -- The plane used in this example is the cuban800

DisableIndividualPlanePropeller(vehicle, 0)
DisableIndividualPlanePropeller(vehicle, 1)
-- We are disabling both propellers so we can start a specific one (since both are automatically started when entering the plane)
Wait(5000) -- We are waiting 5 seconds
EnableIndividualPlanePropeller(vehicle, 1) -- Starting the second propeller (since the index starts at 0)
end)
```
19 changes: 19 additions & 0 deletions VEHICLE/IsVehicleOnBoostPad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: VEHICLE
---
## _IS_VEHICLE_ON_BOOST_PAD

```c
// 0xFC40CBF7B90CA77C
BOOL _IS_VEHICLE_ON_BOOST_PAD(Vehicle vehicle);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **vehicle**: The vehicle to check.
## Return value
Return `true` if the vehicle is on a boost pad, `false` otherwise.
2 changes: 1 addition & 1 deletion VEHICLE/SetDisableExplodeFromBodyDamageOnCollision.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases: ["0x26E13D440E7F6064"]
void SET_DISABLE_EXPLODE_FROM_BODY_DAMAGE_ON_COLLISION(Vehicle vehicle, cs_type(float) BOOL disableExplode);
```
Prevents a vehicle from exploding upon sustaining body damage from physical collisions. This can be used to increase the durability of vehicles in high-impact scenarios, such as races or combat situations, by preventing them from being destroyed due to collision-induced body damage.
Prevents a vehicle from exploding upon sustaining body damage from physical collisions. Only works for planes.
AvarianKnight marked this conversation as resolved.
Show resolved Hide resolved
For helicopters, you might want to check [`SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE`](#_0xEDBC8405B3895CC9) instead.
Expand Down
19 changes: 19 additions & 0 deletions VEHICLE/SetDisableExplodeFromBodyDamageReceivedByAiVehicle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: VEHICLE
---
## _SET_DISABLE_EXPLODE_FROM_BODY_DAMAGE_RECEIVED_BY_AI_VEHICLE

```c
// 0xB0B7DF5CB876FF5E
void _SET_DISABLE_EXPLODE_FROM_BODY_DAMAGE_RECEIVED_BY_AI_VEHICLE(Vehicle plane, BOOL disable);
```

```
NativeDB Introduced: v3407
```

Prevents the plane from exploding when taking body damage if the inflictor is an AI-controlled vehicle. Only works for planes.

## Parameters
* **plane**:
* **disable**:
4 changes: 3 additions & 1 deletion VEHICLE/SetDisableHeliExplodeFromBodyDamage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ 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 works on helicopters and planes.

Prevents a helicopter from exploding due to relatively minor body damage.

```
NativeDB Introduced: v1103
Expand Down
18 changes: 18 additions & 0 deletions VEHICLE/SetPlaneAvoidsOther.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
ns: VEHICLE
---
## _SET_PLANE_AVOIDS_OTHERS

```c
// 0xFC40CBF7B90CA77C
void _SET_PLANE_AVOIDS_OTHERS(Vehicle plane, BOOL toggle);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **plane**:
* **toggle**:
17 changes: 17 additions & 0 deletions VEHICLE/SetPlaneControlSectionsShouldBreakOffFromExplosions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
ns: VEHICLE
---
## SET_PLANE_CONTROL_SECTIONS_SHOULD_BREAK_OFF_FROM_EXPLOSIONS

```c
// 0xDD8A2D3337F04196
void SET_PLANE_CONTROL_SECTIONS_SHOULD_BREAK_OFF_FROM_EXPLOSIONS(Vehicle plane, BOOL toggle);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **plane**:
* **toggle**:
20 changes: 20 additions & 0 deletions VEHICLE/SetVehicleExplosiveDamageScale.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
ns: VEHICLE
---
## _SET_VEHICLE_EXPLOSIVE_DAMAGE_SCALE

```c
// 0x84D7FFD223CAAFFD
Any _SET_VEHICLE_EXPLOSIVE_DAMAGE_SCALE(Vehicle vehicle, float scale);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **vehicle**:
* **scale**:
## Return value
Does not actually return anything.
19 changes: 19 additions & 0 deletions WEAPON/GetAmmoInVehicleWeaponClip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
ns: WEAPON
---
## _GET_AMMO_IN_VEHICLE_WEAPON_CLIP

```c
// 0x2857938C5D407AFA
BOOL _GET_AMMO_IN_VEHICLE_WEAPON_CLIP(Vehicle vehicle, int seat, int ammo);
```
```
NativeDB Introduced: v3407
```
## Parameters
* **vehicle**:
* **seat**:
* **ammo**:
18 changes: 18 additions & 0 deletions WEAPON/GetTimeBeforeVehicleWeaponReloadFinishes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
ns: WEAPON
---
## _GET_TIME_BEFORE_VEHICLE_WEAPON_RELOAD_FINISHES

```c
// 0xC8C6F4B1CDEB40EF
int _GET_TIME_BEFORE_VEHICLE_WEAPON_RELOAD_FINISHES(Vehicle vehicle, int seat);
```

```
NativeDB Introduced: v3407
```

## Parameters
* **vehicle**:
* **seat**:

Loading
Loading