mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 04:01:22 +00:00
Merge pull request #1385 from Mirrrrrow/main
refactor: used cached esx ped and fixed some lua ls annotations
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local Debug = ESX.GetConfig().EnableDebug
|
||||
|
||||
---@param type string the notification type
|
||||
---@param notificatonType string the notification type
|
||||
---@param length number the length of the notification
|
||||
---@param message any the message :D
|
||||
local function Notify(notificatonType, length, message)
|
||||
@@ -36,6 +36,7 @@ RegisterNetEvent("ESX:Notify", Notify)
|
||||
|
||||
if Debug then
|
||||
RegisterCommand("oldnotify", function()
|
||||
---@diagnostic disable-next-line
|
||||
ESX.ShowNotification("No Waypoint Set.", true, false, 140)
|
||||
end)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ local function Progressbar(message, length, Options)
|
||||
end
|
||||
end
|
||||
if CurrentProgress.FreezePlayer then
|
||||
FreezeEntityPosition(PlayerPedId(), CurrentProgress.FreezePlayer)
|
||||
FreezeEntityPosition(ESX.PlayerData.ped, CurrentProgress.FreezePlayer)
|
||||
end
|
||||
SendNUIMessage({
|
||||
type = "Progressbar",
|
||||
@@ -30,7 +30,7 @@ local function Progressbar(message, length, Options)
|
||||
else
|
||||
ClearPedTasks(ESX.PlayerData.ped)
|
||||
if CurrentProgress.FreezePlayer then
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
FreezeEntityPosition(ESX.PlayerData.ped, false)
|
||||
end
|
||||
if CurrentProgress.onFinish then
|
||||
CurrentProgress.onFinish()
|
||||
@@ -50,7 +50,7 @@ local function CancelProgressbar()
|
||||
})
|
||||
ClearPedTasks(ESX.PlayerData.ped)
|
||||
if CurrentProgress.FreezePlayer then
|
||||
FreezeEntityPosition(PlayerPedId(), false)
|
||||
FreezeEntityPosition(ESX.PlayerData.ped, false)
|
||||
end
|
||||
if CurrentProgress.onCancel then
|
||||
CurrentProgress.onCancel()
|
||||
|
||||
Reference in New Issue
Block a user