Simple script with a cool idea! You can setup deskbells on reception desks of serviceās like police,ems,mechanic. When players use them every employee gets notified to meet them at the reception. Hope you enjoy
Iām having issue with the height, so in the config.lua it has teh x,y,z and then 0.9
I changed that to 0.1 and has increased the height a little, but if I put 1.0 or anything higher it dissapeares
first you have to create and add a sound like ābell.oggā to the interact-sound script
put the ogg file in \interact-sound\client\html\sounds
then add the file in the fxmanifest.lua
so next you add
TriggerServerEvent(āInteractSound_SV:PlayWithinDistanceā, 1.0, ābellā, 1.0)
in \core_deskbell\client\main.lua at line 76
Citizen.CreateThread(
function()
while true do
Citizen.Wait(5)
for __, v in ipairs(Config.Desks) do
if GetDistanceBetweenCoords(GetEntityCoords(GetPlayerPed(-1)), v.coords) < 3 then
if alerted then
DrawText3D(v.coords[1], v.coords[2], v.coords[3], Config.Text["please_wait"] .. timeleft)
else
DrawText3D(v.coords[1], v.coords[2], v.coords[3], Config.Text["press_to_call"])
if IsControlJustReleased(0, 38) then
alerted = true
timeleft = 30
TriggerServerEvent("core_deskbell:alert_s", v.job)
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 1.0, 'bell', 1.0)
end
end
end
end
end
end
)