style(events): indentation

This commit is contained in:
BerkieBb
2022-02-18 10:13:08 +01:00
committed by GitHub
parent a5bb0c99ce
commit c615159c28
+14 -18
View File
@@ -4,10 +4,9 @@
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
ShutdownLoadingScreenNui()
LocalPlayer.state:set('isLoggedIn', true, false)
if QBConfig.Server.pvp then
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
end
if not QBConfig.Server.pvp then return end
SetCanAttackFriendly(PlayerPedId(), true, false)
NetworkSetFriendlyFireOption(true)
end)
RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
@@ -33,17 +32,16 @@ end)
RegisterNetEvent('QBCore:Command:GoToMarker', function()
local ped = PlayerPedId()
local blip = GetFirstBlipInfoId(8)
if DoesBlipExist(blip) then
local blipCoords = GetBlipCoords(blip)
for height = 1, 1000 do
if not DoesBlipExist(blip) then return end
local blipCoords = GetBlipCoords(blip)
for height = 1, 1000 do
SetPedCoordsKeepVehicle(ped, blipCoords.x, blipCoords.y, height + 0.0)
local foundGround, zPos = GetGroundZFor_3dCoord(blipCoords.x, blipCoords.y, height + 0.0)
if foundGround then
SetPedCoordsKeepVehicle(ped, blipCoords.x, blipCoords.y, height + 0.0)
local foundGround, zPos = GetGroundZFor_3dCoord(blipCoords.x, blipCoords.y, height + 0.0)
if foundGround then
SetPedCoordsKeepVehicle(ped, blipCoords.x, blipCoords.y, height + 0.0)
break
end
Wait(0)
break
end
Wait(0)
end
end)
@@ -52,12 +50,10 @@ end)
RegisterNetEvent('QBCore:Command:SpawnVehicle', function(vehName)
local ped = PlayerPedId()
local hash = GetHashKey(vehName)
if not IsModelInCdimage(hash) then
return
end
if not IsModelInCdimage(hash) then return end
RequestModel(hash)
while not HasModelLoaded(hash) do
Wait(10)
Wait(0)
end
local vehicle = CreateVehicle(hash, GetEntityCoords(ped), GetEntityHeading(ped), true, false)
TaskWarpPedIntoVehicle(ped, vehicle, -1)
@@ -152,4 +148,4 @@ RegisterNetEvent('QBCore:Client:OnSharedUpdateMultiple', function(tableName, val
QBCore.Shared[tableName][key] = value
end
TriggerEvent('QBCore:Client:UpdateObject')
end)
end)