RegisterNetEvent('fs_placeables:notification')
AddEventHandler('fs_placeables:notification',function (msg)
lib.notify({
title = "Placeables",
description = msg,
type = 'info'
})
end)
function Draw3DText(coords, textInput, scaleX)
scaleX = scaleX * Config.textScale
local px, py, pz = table.unpack(GetGameplayCamCoords())
local dist = GetDistanceBetweenCoords(px, py, pz, coords, true)
local scale = (1 / dist) * 20
local fov = (1 / GetGameplayCamFov()) * 100
scale = scale * fov
SetTextScale(scaleX * scale, scaleX * scale)
SetTextFont(Config.textFont or 4)
SetTextProportional(1)
SetTextDropshadow(1, 1, 1, 1, 255)
SetTextEdge(2, 0, 0, 0, 150)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(textInput)
SetDrawOrigin(coords, 0)
DrawText(0.0, 0.0)
ClearDrawOrigin()
end
by default we added ox target as target system but if you want to add any other target system then you can modify this
function applytarget(model)
local options = {
label = "Pickup",
icon = "fa-solid fa-hand-holding",
canInteract = function (entity, distance, coords, name, bone)
if Entity(entity).state.fs_placeable and distance <= 1.5 then
return true
else
return false
end
end,
onSelect = function(data)
TriggerServerEvent('fs_placeables:DeleteEntity', NetworkGetNetworkIdFromEntity( data.entity))
end
}
exports.ox_target:addModel(model, options)
end