Skip to content

Commit

Permalink
refactor(interface/progress): allow rotation order for created props (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xhorntail authored May 7, 2024
1 parent a3952a0 commit 9649ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resource/interface/client/progress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local createdProps = {}
---@field bone? number
---@field pos vector3
---@field rot vector3
---@field rotOrder? number

---@class ProgressProps
---@field label? string
Expand All @@ -29,7 +30,7 @@ local function createProp(ped, prop)
local coords = GetEntityCoords(ped)
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)

return object
Expand Down

0 comments on commit 9649ffa

Please sign in to comment.