mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
fix: SetMaxWantedLevel doesn't need to be in a loop.
This commit is contained in:
+6
-6
@@ -22,12 +22,6 @@ AddEventHandler('esx:playerLoaded', function(playerData, isNew)
|
||||
SetCanAttackFriendly(PlayerPedId(), true, false)
|
||||
NetworkSetFriendlyFireOption(true)
|
||||
end
|
||||
|
||||
-- disable wanted level
|
||||
if not Config.EnableWantedLevel then
|
||||
ClearPlayerWantedLevel(PlayerId())
|
||||
SetMaxWantedLevel(0)
|
||||
end
|
||||
|
||||
if Config.EnableHud then
|
||||
for k,v in ipairs(playerData.accounts) do
|
||||
@@ -415,6 +409,12 @@ if Config.EnableDefaultInventory then
|
||||
RegisterKeyMapping('showinv', _U('keymap_showinventory'), 'keyboard', 'F2')
|
||||
end
|
||||
|
||||
-- disable wanted level
|
||||
if not Config.EnableWantedLevel then
|
||||
ClearPlayerWantedLevel(PlayerId())
|
||||
SetMaxWantedLevel(0)
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
|
||||
Reference in New Issue
Block a user