Skip to content

Commit e95e926

Browse files
Release 2023-01-30
1 parent 2452e3f commit e95e926

File tree

4 files changed

+30
-44
lines changed

4 files changed

+30
-44
lines changed

docs-gen/native-entity.def.lua

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,9 +1738,7 @@ function N_0x9ebc85ed0fffe51c(entity, toggle, keepPhysics) end
17381738
function SetEntityCollision_2(entity, toggle, keepPhysics) end
17391739

17401740

1741-
--- ```
1742-
--- Returns the model hash from the entity
1743-
--- ```
1741+
--- Returns the model hash from an entity.
17441742
--- @usage local hash = GetEntityModel(PlayerPedId())
17451743
---
17461744
--- if hash == `mp_m_freemode_01` then
@@ -1821,13 +1819,9 @@ function N_0xa80ae305e0a3044f(entity, toggle) end
18211819
function SetEntityAlwaysPrerender(entity, toggle) end
18221820

18231821

1824-
--- ```
1825-
--- Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine.
1826-
--- p1 has no effect when either its on or off
1827-
--- maybe a quick disassembly will tell us what it does
1828-
--- p2 has no effect when either its on or off
1829-
--- maybe a quick disassembly will tell us what it does
1830-
--- ```
1822+
--- Assigns an existing entity to be owned by the current script. If the entity was not owned by a script yet, this also means the entity will remain persistent until released.
1823+
---
1824+
--- Note that this is not needed right after creating an entity as a script-created entity will automatically be assigned.
18311825
---
18321826
--- @hash [0xAD738C3085FE7E11](https://docs.fivem.net/natives/?_0xAD738C3085FE7E11)
18331827
--- @param entity Entity
@@ -1838,9 +1832,7 @@ function SetEntityAlwaysPrerender(entity, toggle) end
18381832
function SetEntityAsMissionEntity(entity, p1, p2) end
18391833

18401834

1841-
--- ```
1842-
--- Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
1843-
--- ```
1835+
--- Deletes the specified entity, and invalidates the passed handle (i.e. in/out argument).
18441836
---
18451837
--- @hash [0xAE3CBE5BF394C9C9](https://docs.fivem.net/natives/?_0xAE3CBE5BF394C9C9)
18461838
--- @param entity Entity (Entity*)

docs-gen/native-player.def.lua

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
function N_0x0032a6dba562c518() end
1212

1313

14-
--- Set the model for a specific Player. Be aware that this will destroy the current Ped for the Player and create a new one, any reference to the old ped should be reset
15-
--- Make sure to request the model first and wait until it has loaded.
16-
--- @usage local model = 'a_f_m_beach_01'
14+
--- Set the model for a specific Player. Note that this will destroy the current Ped for the Player and create a new one, any reference to the old ped will be invalid after calling this.
15+
---
16+
--- As per usual, make sure to request the model first and wait until it has loaded.
17+
--- @usage local model = `a_f_m_beach_01`
1718
--- if IsModelInCdimage(model) and IsModelValid(model) then
1819
--- RequestModel(model)
1920
--- while not HasModelLoaded(model) do
20-
--- Citizen.Wait(0)
21+
--- Wait(0)
2122
--- end
2223
--- SetPlayerModel(PlayerId(), model)
2324
--- SetModelAsNoLongerNeeded(model)
@@ -952,10 +953,7 @@ function SetPlayerStealthPerceptionModifier(player, value) end
952953
function IsPlayerRidingTrain(player) end
953954

954955

955-
--- ```
956-
--- This returns YOUR 'identity' as a Player type.
957-
--- Always returns 0 in story mode.
958-
--- ```
956+
--- Returns the player index for the local player.
959957
---
960958
--- @hash [0x4F8644AF03D0E0D6](https://docs.fivem.net/natives/?_0x4F8644AF03D0E0D6)
961959
---
@@ -2834,9 +2832,7 @@ function SpecialAbilityDeactivate(player) end
28342832
function HasPlayerBeenSpottedInStolenVehicle(player) end
28352833

28362834

2837-
--- ```
2838-
--- Returns current player ped
2839-
--- ```
2835+
--- Returns the entity handle for the local player ped. Note that this entity handle will change after using commands such as SET_PLAYER_MODEL.
28402836
---
28412837
--- @hash [0xD80958FC74E988A6](https://docs.fivem.net/natives/?_0xD80958FC74E988A6)
28422838
---

docs-gen/native-streaming.def.lua

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,20 +1052,27 @@ function N_0x95a7dabddbb78ae7(iplName1, iplName2) end
10521052
function StopPlayerSwitch() end
10531053

10541054

1055-
--- ```
1056-
--- Request a model to be loaded into memory.
1057-
--- ```
1058-
---
1055+
--- Request a model (archetype) to be loaded for use by the current script. Use SET_MODEL_AS_NO_LONGER_NEEDED when done using the model in script.
1056+
--- @usage local modelHash = `adder`
1057+
--- RequestModel(modelHash)
1058+
--- while not HasModelLoaded(modelHash) do
1059+
--- Wait(0)
1060+
--- end
1061+
---
1062+
--- -- omitted: creating a vehicle
1063+
---
1064+
--- -- when done using the model
1065+
--- SetModelAsNoLongerNeeded(modelHash
10591066
--- @hash [0x963D27A58DF860AC](https://docs.fivem.net/natives/?_0x963D27A58DF860AC)
10601067
--- @param model Hash
10611068
--- @return void
10621069
--- @overload fun(model: Hash): void
10631070
function RequestModel(model) end
10641071

10651072

1066-
--- ```
1067-
--- Checks if the specified model has loaded into memory.
1068-
--- ```
1073+
--- Returns whether the specified model (archetype) is currently loaded.
1074+
---
1075+
--- Note that this will return 'true' even if the model has been requested and loaded by something other than the current script, if you're intending to actually use the model in a later frame, you should call REQUEST_MODEL anyway.
10691076
---
10701077
--- @hash [0x98A4EB5D89A0C952](https://docs.fivem.net/natives/?_0x98A4EB5D89A0C952)
10711078
--- @param model Hash
@@ -1779,9 +1786,7 @@ function N_0xdfa80cb25d0a19b3() end
17791786
function SetInteriorActive(interiorID, toggle) end
17801787

17811788

1782-
--- ```
1783-
--- Unloads model from memory
1784-
--- ```
1789+
--- Releases the script ownership assigned by REQUEST_MODEL. This command should be used when done using a specific model hash in script.
17851790
---
17861791
--- @hash [0xE532F5D78798DAAB](https://docs.fivem.net/natives/?_0xE532F5D78798DAAB)
17871792
--- @param model Hash

docs-gen/native-vehicle.def.lua

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9414,8 +9414,8 @@ function N_0xaf03011701811146(vehicle, entity) end
94149414
--- @usage local ModelHash = `adder` -- Use Compile-time hashes to get the hash of this model
94159415
--- if not IsModelInCdimage(ModelHash) then return end
94169416
--- RequestModel(ModelHash) -- Request the model
9417-
--- while not HasModelLoaded(ModelHash) do -- Waits for the model to load with a check so it does not get stuck in an infinite loop
9418-
--- Citizen.Wait(10)
9417+
--- while not HasModelLoaded(ModelHash) do -- Waits for the model to load
9418+
--- Wait(0)
94199419
--- end
94209420
--- local MyPed = PlayerPedId()
94219421
--- local Vehicle = CreateVehicle(ModelHash, GetEntityCoords(MyPed), GetEntityHeading(MyPed), true, false) -- Spawns a networked vehicle on your current coords
@@ -9562,14 +9562,7 @@ function N_0xb0ad1238a709b1a2(vehicle) end
95629562
function IsVehicleOnAllWheels(vehicle) end
95639563

95649564

9565-
--- ```
9566-
--- Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name.
9567-
--- -----------------------------------------------------------------------------------------------------------------------------------------
9568-
--- While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name.
9569-
--- -----------------------------------------------------------------------------------------------------------------------------------------
9570-
--- Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash.
9571-
--- Using HUD::_GET_LABEL_TEXT, you can get the localized name.
9572-
--- ```
9565+
--- Returns the display name/text label (`gameName` in `vehicles.meta`) for the specified vehicle model.
95739566
---
95749567
--- @hash [0xB215AAC32D25D019](https://docs.fivem.net/natives/?_0xB215AAC32D25D019)
95759568
--- @param modelHash Hash

0 commit comments

Comments
 (0)