-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(natives/3407): support 3407 natives
All credit goes to @gottfriedleibniz, @alloc8or and @fingaweg for finding those natives.
- Loading branch information
Showing
23 changed files
with
440 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
`true` if the named Scaleform movie is loaded, `false` otherwise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
17
TASK/ClearPedScriptTaskIfRunningThreatResponseNonTempTask.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
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 | ||
local function CreateShark(coords) | ||
RequestModel(sharkModel) | ||
while not HasModelLoaded(sharkModel) do | ||
Wait(0) | ||
end | ||
shark = CreatePed(28, sharkModel, coords.x, coords.y, coords.z, 0.0, true, true) | ||
SetModelAsNoLongerNeeded(sharkModel) | ||
return shark | ||
end | ||
local function SharkCircle(sharkHandle, coords) | ||
if (DoesEntityExist(shark)) then | ||
TaskSharkCircleCoord(sharkHandle, coords.x, coords.y, coords.z - 5.0, 1.0, 10.0) | ||
Wait(10000) -- We're letting the shark doing circles movement for 10 seconds | ||
ClearPedTasks(shark) -- Going to shop the task | ||
end | ||
end | ||
local coords = GetEntityCoords(PlayerPedId()) | ||
local shark = CreateShark(coords) | ||
SharkCircle(shark, coords) | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
* **vehicle**: The propeller plane. | ||
* **propeller**: The propeller index to enable (starts at 0). | ||
## Examples | ||
```lua | ||
RegisterCommand("start", 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, false) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
VEHICLE/SetDisableExplodeFromBodyDamageReceivedByAiVehicle.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
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**: | ||
## Return value | ||
Does not actually return anything. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
17
VEHICLE/SetPlaneControlSectionsShouldBreakOffFromExplosions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
* **vehicle**: | ||
* **toggle**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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**: | ||
Oops, something went wrong.