Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-05-11, 19:26


xHardus







Wiek: 28
Na forum: 4928 dni
Posty: 90
Nick w MP: Harduś

Piwa: 786

Respekt: 15,3

Witam stworzylem system syren kiedy uruchamiam syreny to slysze tylko ja, jak zrobic zeby wszyscy slyszeli ?


function syreny()
if getElementData(localPlayer,"syreny:wlaczone") == true then return end
local veh = getPedOccupiedVehicle(localPlayer)
if getElementModel(veh) == 596 or getElementModel(veh) == 597 or getElementModel(veh) == 598 and seat == 0 then
if getVehicleSirensOn(veh) then
local sound = playSound3D("police.mp3",0,0,0,true)
setTimer(destroyElement,50000,1,sound)
setTimer(syrenyoff,50000,1)
--setSoundMinDistance(sound,20)
setSoundMaxDistance(sound,200)
setSoundVolume(sound,0.3)
attachElements(sound, veh, 0, 0, 0)
setElementData(localPlayer,"syreny:wlaczone",true)
end
end
end
addEventHandler("onClientRender",root, syreny)


Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 2 piw(a):
Mezo., psychol.
Wysłany: 2016-05-11, 21:17


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4471 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

zrob trigger na s-side i tam daj dzwiek

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-05-11, 21:49


iNev.







Wiek: 24
Na forum: 4092 dni
Posty: 94
Nick w MP: iNev

Piwa: 953

Respekt: 180
Respekt: 180Respekt: 180

Spr?buj tak:
Server-Side:

addEventHandler("onResourceStart", resourceRoot, function()
    triggerClientEvent("playSound", root)
end)


Client-side:

addEvent("playSound", true)
addEventHandler("playSound", root, function()
    playSound3D(?cie?ka, x, y, z)
end)



Nie jestem pewny, ?e zadzia?a, ale warto spr?bowa?! :-) Trzymam kciuki.

Postaw piwo autorowi tego posta
 

 
Tagi: system :: syren
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku