dazzlepoint Posted July 17, 2013 Posted July 17, 2013 i want to stream "http://d.liveatc.net/kjfk_twr" when you putt radio off in an plane, can you help me ?
xXMADEXx Posted July 17, 2013 Posted July 17, 2013 What do you mean? Like the sound play around the airplane?
codeluaeveryday Posted July 18, 2013 Posted July 18, 2013 Not sure if this is what you want, please edit it if it has errors: local soundLocation = 'http://d.liveatc.net/kjfk_twr' local soundMessage = 'Connecting to air traffic control (jka), please stand by.' addEventHandler('onClientResourceStart', getRootElement(), function(startedRes) if startedRes == getThisResource() then if isPedInVehicle(localPlayer) and getVehicleType(getPedOccupiedVehicle(localPlayer)) == 'Plane' then if getRadioChannel() ~= 0 then soundElement = playSound(soundLocation) outputChatBox(soundMessage) end end end end ) addEventHandler('onClientPlayerRadioSwitch', getRootElement(), function(radioID) if isPedInVehicle(localPlayer) and getVehicleType(getPedOccupiedVehicle(localPlayer)) == 'Plane' then if radioID ~= 0 then cancelEvent() soundElement = playSound(soundLocation) outputChatBox(soundMessage) elseif soundElement then setRadioChannel(0) stopSound(soundElement) soundElement = nil end end end ) addEventHandler('onClientPlayerVehicleEnter', getRootElement(), function(theVehicle, theSeat) if getVehicleType(theVehicle) == 'Plane' then if getRadioChannel() ~= 0 then soundElement = playSound(soundLocation) outputChatBox(soundMessage) end end end ) addEventHandler('onClientPlayerVehicleExit', getRootElement(), function(theVehicle, theSeat) if getVehicleType(theVehicle) == 'Plane' then if soundElement then setRadioChannel(0) stopSound(soundElement) soundElement = nil end end end )
dazzlepoint Posted July 18, 2013 Author Posted July 18, 2013 thanks for the script, I'm going to test it later
dazzlepoint Posted July 18, 2013 Author Posted July 18, 2013 do i have to putt the link in the meta fille ? how i can do it ? like this ? but it's not working "YourName" />
Castillo Posted July 18, 2013 Posted July 18, 2013 No, you must put it on the playSound function, instead of the sound filepath.
dazzlepoint Posted July 19, 2013 Author Posted July 19, 2013 is this only for client, i want it for server ?
MIKI785 Posted July 19, 2013 Posted July 19, 2013 Yes, it's client side. Why would you want it server side? There's no need.
dazzlepoint Posted July 19, 2013 Author Posted July 19, 2013 Yes, it's client side. Why would you want it server side? There's no need. yes i want it for server and not for client, works client on server then ?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now