From 1820344c000f3c680dd470fe02e11f02838662c8 Mon Sep 17 00:00:00 2001 From: darknight2590 <87971656+darknight2590@users.noreply.github.com> Date: Sat, 25 Dec 2021 12:34:55 +0200 Subject: [PATCH 1/2] add RequestModel --- client/functions.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index 67919f2..7f0fff8 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -121,6 +121,13 @@ function QBCore.Functions.RequestAnimDict(animDict) end end +function QBCore.Functions.loadModel(ModelName) + RequestModel(ModelName) + while not HasModelLoaded(ModelName) do + Wait(100) + end +end + RegisterNUICallback('getNotifyConfig', function(_, cb) cb(QBCore.Config.Notify) end) From 8f521078961ad87e06ee2dca66ed7166706861a4 Mon Sep 17 00:00:00 2001 From: darknight2590 <87971656+darknight2590@users.noreply.github.com> Date: Tue, 28 Dec 2021 09:13:51 +0200 Subject: [PATCH 2/2] change name --- client/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/functions.lua b/client/functions.lua index 7f0fff8..c55bd7a 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -121,7 +121,7 @@ function QBCore.Functions.RequestAnimDict(animDict) end end -function QBCore.Functions.loadModel(ModelName) +function QBCore.Functions.LoadModel(ModelName) RequestModel(ModelName) while not HasModelLoaded(ModelName) do Wait(100)