mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +00:00
Fix Styling (#758)
* style: ensure consistent indentation * style: add spacing * style: add newlines * style: simplify html * fix: update javascript indent size in contribution guidelines
This commit is contained in:
+8
-8
@@ -36,7 +36,7 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function()
|
||||
|
||||
local blipMarker <const> = GetFirstBlipInfoId(8)
|
||||
if not DoesBlipExist(blipMarker) then
|
||||
QBCore.Functions.Notify('No Waypoint Set.', "error",5000)
|
||||
QBCore.Functions.Notify('No Waypoint Set.', "error", 5000)
|
||||
return 'marker'
|
||||
end
|
||||
|
||||
@@ -107,12 +107,12 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function()
|
||||
-- If we can't find the coords, set the coords to the old ones.
|
||||
-- We don't unpack them before since they aren't in a loop and only called once.
|
||||
SetPedCoordsKeepVehicle(ped, oldCoords['x'], oldCoords['y'], oldCoords['z'] - 1.0)
|
||||
QBCore.Functions.Notify('Error While Teleporting.', "error",5000)
|
||||
QBCore.Functions.Notify('Error While Teleporting.', "error", 5000)
|
||||
end
|
||||
|
||||
-- If Z coord was found, set coords in found coords.
|
||||
SetPedCoordsKeepVehicle(ped, x, y, groundZ)
|
||||
QBCore.Functions.Notify('Teleported To Waypoint.', "success",5000)
|
||||
QBCore.Functions.Notify('Teleported To Waypoint.', "success", 5000)
|
||||
end)
|
||||
|
||||
-- Vehicle Commands
|
||||
@@ -196,16 +196,16 @@ end)
|
||||
|
||||
local function Draw3DText(coords, str)
|
||||
local onScreen, worldX, worldY = World3dToScreen2d(coords.x, coords.y, coords.z)
|
||||
local camCoords = GetGameplayCamCoord()
|
||||
local scale = 200 / (GetGameplayCamFov() * #(camCoords - coords))
|
||||
local camCoords = GetGameplayCamCoord()
|
||||
local scale = 200 / (GetGameplayCamFov() * #(camCoords - coords))
|
||||
if onScreen then
|
||||
SetTextScale(1.0, 0.5 * scale)
|
||||
SetTextFont(4)
|
||||
SetTextColour(255, 255, 255, 255)
|
||||
SetTextEdge(2, 0, 0, 0, 150)
|
||||
SetTextProportional(1)
|
||||
SetTextOutline()
|
||||
SetTextCentre(1)
|
||||
SetTextProportional(1)
|
||||
SetTextOutline()
|
||||
SetTextCentre(1)
|
||||
BeginTextCommandDisplayText("STRING")
|
||||
AddTextComponentSubstringPlayerName(str)
|
||||
EndTextCommandDisplayText(worldX, worldY)
|
||||
|
||||
Reference in New Issue
Block a user