Nie wiem czy dobrze napisa?em tytu? samego postu natomiast chodzi mi o takie co?, ?e
i chcia?bym na przyk?ad usun?? Dom3 czyli na p?tli ?eby nie pokazywa?o ju? domu3
Za pomoc daje piwko
EDIT: chodzi mi o to zeby funkcj? usunac dom3
Witam. Ot?? chc? by aktualny d?wi?k nie by? odtwarzany w p?tli tylko jeden raz. Co musz? zmieni? i na co ? Za pomoc oraz
[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 soundSwitch_lu12()
outputDebugString("sw0")
if getTickCount()-soundSwitch_lu1<2000 then return end
soundSwitch_lu1=getTickCount()
local pojazd=getPedOccupiedVehicle(localPla...
Witam! Chcia?bym zrobi? skrypt na odliczanie w p?tli (np. na czacie), tylko nie do ko?ca wiem jak si? do tego zabra?. Mia?em pomys? ?eby zrobi? to timerami ale to ma?o wygodne i przejrzyste Ma kto? pomys? jak to zrobi??
By?bym wdzi?czny za ka?d? pomoc
Mam problem z moimi p?tlami gdy mam w innym callbacku p?tle to dzia?a ale gdy zrobi?em taki kod w komandzie i j? odpalam to tylko wypisuje tekst na czacie "Odpalamy" i nic a gdy zrobie bez p?tli to dzia?a (gra muzyka)