Witam posiadam problem z syrenami poniewa? dla wszystkich frakcji dzia?a opr?cz sapd
[code]
addEvent("broadcastSound3D", true)
addEventHandler("broadcastSound3D", root, function(sound,range,minrange, bliskiKomunikat, dalekiKomunikat)
local el=source
if getElementDimension(localPlayer)~=getElementDimension(el) then return end
if getElementInterior(localPlayer)~=getElementInterior(el) then return end
local x,y,z=getElementPosition(localPlayer)
local x2,y2,z2=getElementPosition(el)
local dist=getDistanceBetweenPoints3D(x,y,z,x2,y2,z2)
if dist<range*2 then
if bliskiKomunikat and minrange and dist<minrange then
triggerEvent("onCaptionedEvent", root, bliskiKomunikat, 10)
outputChatBox(" * " .. bliskiKomunikat)
elseif dalekiKomunikat and dist<range then
triggerEvent("onCaptionedEvent", root, dalekiKomunikat, 10)
outputChatBox(" * " .. dalekiKomunikat)
end
local s=playSound3D(sound, x2,y2,z2)
setSoundMinDistance(s, minrange or 5)
setSoundMaxDistance(s, range)
end
end)
local soundTrigger_lu=getTickCount()-2800
local function soundTrigger()
if getTickCount()-soundTrigger_lu<2800 then return end
soundTrigger_lu=getTickCount()
local pojazd=getPedOccupiedVehicle(localPlayer)
if pojazd and getVehicleController(pojazd)==localPlayer then
local em=getElementModel(pojazd)
if getElementData(pojazd,"vehicle:duty") == "SAPD" t...
Witam mam ma?y problem od nie dawana pr?bowa?em zrobi? syrenki dla frakcji Lecz nadal mam ten sam problem w linice
local em=getElementData(vehicle,"vehicle:police")