mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
refactor(interface/progress): allow rotation order for created props (#564)
This commit is contained in:
@@ -9,6 +9,7 @@ local createdProps = {}
|
|||||||
---@field bone? number
|
---@field bone? number
|
||||||
---@field pos vector3
|
---@field pos vector3
|
||||||
---@field rot vector3
|
---@field rot vector3
|
||||||
|
---@field rotOrder? number
|
||||||
|
|
||||||
---@class ProgressProps
|
---@class ProgressProps
|
||||||
---@field label? string
|
---@field label? string
|
||||||
@@ -29,7 +30,7 @@ local function createProp(ped, prop)
|
|||||||
local coords = GetEntityCoords(ped)
|
local coords = GetEntityCoords(ped)
|
||||||
local object = CreateObject(prop.model, coords.x, coords.y, coords.z, false, false, false)
|
local object = CreateObject(prop.model, coords.x, coords.y, coords.z, false, false, false)
|
||||||
|
|
||||||
AttachEntityToEntity(object, ped, GetPedBoneIndex(ped, prop.bone or 60309), prop.pos.x, prop.pos.y, prop.pos.z, prop.rot.x, prop.rot.y, prop.rot.z, true, true, false, true, 0, true)
|
AttachEntityToEntity(object, ped, GetPedBoneIndex(ped, prop.bone or 60309), prop.pos.x, prop.pos.y, prop.pos.z, prop.rot.x, prop.rot.y, prop.rot.z, true, true, false, true, prop.rotOrder or 0, true)
|
||||||
SetModelAsNoLongerNeeded(prop.model)
|
SetModelAsNoLongerNeeded(prop.model)
|
||||||
|
|
||||||
return object
|
return object
|
||||||
|
|||||||
Reference in New Issue
Block a user