Client/editable.lua
local lang = config.langs[config.lang]
function getVehicleCoordForUi(vehicle)
return GetOffsetFromEntityInWorldCoords(vehicle, -0.5, 0.0, 0.75)
end
function playSyncSound(entity, name, maxDistance, volume)
if config.useTgiannSound then
local data = {
entity = entity,
soundFile = name,
checkDistance = true,
maxDistance = maxDistance,
soundMaxVolume = volume,
sync = true,
}
TriggerEvent("tgiann-sounds:play-sound", data)
else
TriggerEvent('InteractSound_CL:PlayOnOne', name, volume)
end
end
function emote(text, type)
TriggerServerEvent('3dme:display', text, "me", false, false)
end
function searchFunction()
local value = nil
tgiCore.Progressbar("search", lang.progressBarSearch, config.search.progressBarTime, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {
animDict = "veh@van@ds@base",
anim = "hotwire",
flags = 16,
}, {}, {}, function()
value = true
end, function()
value = false
end)
while value == nil do Wait(10) end
return value
end
function lockpickOutSideFunction()
local value = nil
tgiCore.Progressbar("lockpickoutside", lang.outsideLockpickProgressBar, config.outSideLockpick.progressBarTime, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function()
Wait(1000)
if tgiCore.skillCheck(25000) then
Wait(100)
if tgiCore.skillCheck(4000) then
Wait(100)
value = tgiCore.skillCheck(math.random(2500, 4550))
else
value = false
end
else
value = false
end
end, function()
value = false
end)
while value == nil do Wait(10) end
return value
end
function hotwireFunction()
if tgiCore.skillCheck(25000) then
Wait(100)
if tgiCore.skillCheck(4000) then
Wait(100)
return tgiCore.skillCheck(math.random(2500, 4550))
end
end
return false
end
Last updated