Witam ot?? mam dwa skrypty na sygna?y d?wi?kowe. Dla przyk?adu mam sygna?y pod klawiszem "1" oraz "h" i gdy w??cz? dwa wszystko dzia?a Okej, ale gdy chce wy??czy? jeden z nich to wy??czaj? si? dwa. Jak to naprawi? ?Bo generalnie chce ?eby ten pod "h" by? jako horn. ZA POMOC PIWO i RESPEKT
[lua]
addEvent("broadcastSound3D1", true)
addEventHandler("broadcastSound3D1", 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("onCaptionedEvent1", root, bliskiKomunikat, 10)
outputChatBox(" * " .. bliskiKomunikat)
elseif dalekiKomunikat and dist<range then
triggerEvent("onCaptionedEvent1", root, dalekiKomunikat, 10)
outputChatBox(" * " .. dalekiKomunikat)
end
local s=playSound3D(sound, x2,y2,z2)
setSoundMinDistance(s, minrange or 5)
setSoundMaxDistance(s, range)
end
end)
--------------------------------------------------------------------------------------- SAPD
local soundSwitch_lu1=getTickCount()-2000
local function soundS... |