diff --git a/client/client.lua b/client/client.lua index c121d9d..390d41d 100644 --- a/client/client.lua +++ b/client/client.lua @@ -82,15 +82,15 @@ function attachPaper() local player = PlayerPedId() local x,y,z = table.unpack(GetEntityCoords(player)) - while not HasModelLoaded(GetHashKey(Config.PaperProp)) do - RequestModel(GetHashKey(Config.PaperProp)) + while not HasModelLoaded(GetHashKey(Config.PaperProp.name)) do + RequestModel(GetHashKey(Config.PaperProp.name)) Wait(10) end - prop = CreateObject(GetHashKey(Config.PaperProp), x, y, z+0.2, true, true, true) + prop = CreateObject(GetHashKey(Config.PaperProp.name), x, y, z+0.2, true, true, true) SetEntityCompletelyDisableCollision(prop, false, false) - AttachEntityToEntity(prop, player, GetPedBoneIndex(player, 36029), 0.16, 0.08, 0.1, -130.0, -50.0, 0.0, true, true, false, true, 1, true) - SetModelAsNoLongerNeeded(Config.PaperProp) + AttachEntityToEntity(prop, player, GetPedBoneIndex(player, 36029), 0.16, 0.08, 0.1, Config.PaperProp.xRot, Config.PaperProp.yRot, Config.PaperProp.zRot, true, true, false, true, 1, true) + SetModelAsNoLongerNeeded(Config.PaperProp.name) end function detachPaper() diff --git a/config.lua b/config.lua index 7aa499f..495b881 100644 --- a/config.lua +++ b/config.lua @@ -4,7 +4,12 @@ Config.Framework = "esx" -- "esx" or "qb" Config.Command = "documents" -Config.PaperProp = "prop_cd_paper_pile1" --Previously "h4_prop_h4_files_paper_01b" +Config.PaperProp = { + name = "prop_cd_paper_pile1". + xRot = -130.0, + yRot = -50.0, + zRot = 0.0, +} -- These texts only show up on client side. To change texts in the NUI, -- go to the web/build/config.js file Config.Locale = {