mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Merge pull request #73 from GoatG33k/main
refactor(esx_legacy): Converted all backtick usages to GetHashKey()
This commit is contained in:
@@ -27,7 +27,7 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
|
||||
y = ESX.PlayerData.coords.y,
|
||||
z = ESX.PlayerData.coords.z + 0.25,
|
||||
heading = ESX.PlayerData.coords.heading,
|
||||
model = `mp_m_freemode_01`,
|
||||
model = GetHashKey("mp_m_freemode_01"),
|
||||
skipFade = false
|
||||
}, function()
|
||||
TriggerServerEvent('esx:onPlayerSpawn')
|
||||
@@ -398,8 +398,8 @@ function StartServerSyncLoops()
|
||||
|
||||
if weapon then
|
||||
currentWeapon.name = weapon.name
|
||||
currentWeapon.hash = weaponHash
|
||||
currentWeapon.timer = 100 * sleep
|
||||
currentWeapon.hash = weaponHash
|
||||
currentWeapon.timer = 100 * sleep
|
||||
end
|
||||
end
|
||||
else
|
||||
@@ -533,7 +533,7 @@ AddEventHandler("esx:noclip", function(input)
|
||||
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
|
||||
if admin then
|
||||
local player = PlayerId()
|
||||
|
||||
|
||||
local msg = "disabled"
|
||||
if(noclip == false)then
|
||||
noclip_pos = GetEntityCoords(ESX.PlayerData.ped, false)
|
||||
@@ -549,7 +549,7 @@ AddEventHandler("esx:noclip", function(input)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
local heading = 0
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -111,9 +111,9 @@ function LoadDefaultModel(malePed, cb)
|
||||
local characterModel
|
||||
|
||||
if malePed then
|
||||
characterModel = `mp_m_freemode_01`
|
||||
characterModel = GetHashKey("mp_m_freemode_01")
|
||||
else
|
||||
characterModel = `mp_f_freemode_01`
|
||||
characterModel = GetHashKey("mp_f_freemode_01")
|
||||
end
|
||||
|
||||
RequestModel(characterModel)
|
||||
|
||||
@@ -393,7 +393,7 @@ function OpenMobileMechanicActionsMenu()
|
||||
local playerPed = PlayerPedId()
|
||||
local vehicle = GetVehiclePedIsIn(playerPed, true)
|
||||
|
||||
local towmodel = `flatbed`
|
||||
local towmodel = GetHashKey("flatbed")
|
||||
local isVehicleTow = IsVehicleModel(vehicle, towmodel)
|
||||
|
||||
if isVehicleTow then
|
||||
@@ -937,9 +937,9 @@ Citizen.CreateThread(function()
|
||||
else
|
||||
|
||||
if
|
||||
GetEntityModel(vehicle) == `flatbed` or
|
||||
GetEntityModel(vehicle) == `towtruck2` or
|
||||
GetEntityModel(vehicle) == `slamvan3`
|
||||
GetEntityModel(vehicle) == GetHashKey("flatbed") or
|
||||
GetEntityModel(vehicle) == GetHashKey("towtruck2") or
|
||||
GetEntityModel(vehicle) == GetHashKey("slamvan3")
|
||||
then
|
||||
TriggerServerEvent('esx_service:disableService', 'mechanic')
|
||||
end
|
||||
|
||||
@@ -142,7 +142,7 @@ function OpenCloakroomMenu()
|
||||
ESX.ShowNotification(_U('service_in'))
|
||||
end
|
||||
end, 'police')
|
||||
else
|
||||
else
|
||||
awaitService = true
|
||||
playerInService = true
|
||||
|
||||
@@ -997,7 +997,7 @@ AddEventHandler('esx_policejob:hasEnteredEntityZone', function(entity)
|
||||
CurrentActionData = {entity = entity}
|
||||
end
|
||||
|
||||
if GetEntityModel(entity) == `p_ld_stinger_s` then
|
||||
if GetEntityModel(entity) == GetHashKey("p_ld_stinger_s") then
|
||||
local playerPed = PlayerPedId()
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
|
||||
@@ -1574,4 +1574,4 @@ if ESX.PlayerLoaded and ESX.PlayerData.job == 'police' then
|
||||
SetTimeout(1000, function()
|
||||
TriggerServerEvent('esx_policejob:forceBlip')
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user