curatenie si fix target

This commit is contained in:
2026-04-10 14:04:59 +03:00
parent 24b682532e
commit 3dcff3ce6d
1247 changed files with 22172 additions and 144368 deletions
@@ -0,0 +1,54 @@
--drawui (NUI-based interaction prompts)
local function OpenDraw(text, press)
SendNUIMessage({
response = 'openDraw',
data = {
press = press,
text = text
}
})
end exports('OpenDraw', OpenDraw)
local function CloseDraw()
SendNUIMessage({
response = 'closeDraw'
})
end exports('CloseDraw', CloseDraw)
-- 3-stage proximity interaction (DrawSprite-based)
-- Stage 1 (3m): small dot
-- Stage 2 (2m): hexagon key prompt
-- Stage 3 (1m): hexagon key + label
Coords = {}
CreateThread(function()
while not HasStreamedTextureDictLoaded("lunny_ui") do Wait(10) RequestStreamedTextureDict("lunny_ui", true) end
local sleep
while true do
local myCoords = GetEntityCoords(PlayerPedId())
sleep = 500
for _, v in ipairs(Coords) do
local distance = #(myCoords - vector3(v.coords.x, v.coords.y, v.coords.z))
if distance < 6 then
sleep = 0
SetDrawOrigin(v.coords.x, v.coords.y, v.coords.z + 1, 0)
if distance > 2 and distance < 6 then
-- Stage 1: small dot (blue)
DrawSprite("lunny_ui", "point", 0, 0, 0.015, 0.025, 0, 92, 151, 247, 200)
end
if distance < 2 and distance > 1 then
-- Stage 2: key hexagon (blue)
DrawSprite("lunny_ui", "key", 0, 0, 0.018, 0.030, 0, 92, 151, 247, 255)
end
if distance < 1 then
-- Stage 3: key + label (blue)
DrawSprite("lunny_ui", "key", 0, 0, 0.018, 0.030, 0, 92, 151, 247, 255)
DrawSprite("lunny_ui", "npc_talk", 0.044, 0, 0.06, 0.028, 0, 92, 151, 247, 255)
end
ClearDrawOrigin()
end
end
Wait(sleep)
end
end)