Cze??, mam problem z sygna?ami d?wi?kowymi. Chcia?em sobie doda? poganiacz do wozu stra?ackiego, ale d?wi?k si? nie zap?tla, po prostu si? wy??cza. Czy jest kto? w stanie zrobi? tak, aby ten d?wi?k si? zap?tla??
addEvent( "broadCast" , true )
addEventHandler ( "broadCast" , root , function( thePlayer )
triggerClientEvent ( root , "toggleSound" , root )
end )
function bind ()
local veh = getPedOccupiedVehicle ( localPlayer )
local id = getElementModel ( veh )
if id == 579 then
triggerServerEvent ( "broadCast" , localPlayer , veh , id )
end
end
bindKey ( "ralt" , "down" , bind )
addEvent ( "toggleSound" , true )
addEventHandler ( "toggleSound" , root , function()
if isElement ( sound ) then return end
local veh = getPedOccupiedVehicle ( localPlayer )
local x , y , z = getElementPosition ( veh )
sound = playSound3D ( "poganiacz.mp3" , x , y , z )
setSoundVolume ( sound , 10.50 )
attachElements ( sound , veh , 0 , 0 , 0 )
end )
function destroy ()
if isElement ( sound ) then
destroyElement ( sound )
end
end
bindKey ( "rctrl" , "down" , destroy )
Za pomoc dzi?kuj?!