From 4a613bd57f11d8f3ce635a4a0f599fb5e1b06cbf Mon Sep 17 00:00:00 2001 From: kac5a Date: Tue, 6 Sep 2022 22:42:14 +0200 Subject: [PATCH] Move prop name to config --- client/client.lua | 9 ++++----- config.lua | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/client.lua b/client/client.lua index c111311..c121d9d 100644 --- a/client/client.lua +++ b/client/client.lua @@ -81,17 +81,16 @@ end function attachPaper() local player = PlayerPedId() local x,y,z = table.unpack(GetEntityCoords(player)) - local propName = "prop_cd_paper_pile1" - while not HasModelLoaded(GetHashKey(propName)) do - RequestModel(GetHashKey(propName)) + while not HasModelLoaded(GetHashKey(Config.PaperProp)) do + RequestModel(GetHashKey(Config.PaperProp)) Wait(10) end - prop = CreateObject(GetHashKey(propName), x, y, z+0.2, true, true, true) + prop = CreateObject(GetHashKey(Config.PaperProp), 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(propName) + SetModelAsNoLongerNeeded(Config.PaperProp) end function detachPaper() diff --git a/config.lua b/config.lua index 30ea6ce..7aa499f 100644 --- a/config.lua +++ b/config.lua @@ -4,6 +4,7 @@ Config.Framework = "esx" -- "esx" or "qb" Config.Command = "documents" +Config.PaperProp = "prop_cd_paper_pile1" --Previously "h4_prop_h4_files_paper_01b" -- These texts only show up on client side. To change texts in the NUI, -- go to the web/build/config.js file Config.Locale = {