dazzlepoint Posted July 17, 2013 Share 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 ? Link to comment
xXMADEXx Posted July 17, 2013 Share Posted July 17, 2013 What do you mean? Like the sound play around the airplane? Link to comment
codeluaeveryday Posted July 18, 2013 Share 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 ) Link to comment
dazzlepoint Posted July 18, 2013 Author Share Posted July 18, 2013 thanks for the script, I'm going to test it later Link to comment
dazzlepoint Posted July 18, 2013 Author Share 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" /> Link to comment
Castillo Posted July 18, 2013 Share Posted July 18, 2013 No, you must put it on the playSound function, instead of the sound filepath. Link to comment
dazzlepoint Posted July 19, 2013 Author Share Posted July 19, 2013 is this only for client, i want it for server ? Link to comment
MIKI785 Posted July 19, 2013 Share Posted July 19, 2013 Yes, it's client side. Why would you want it server side? There's no need. Link to comment
dazzlepoint Posted July 19, 2013 Author Share 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 ? Link to comment
dazzlepoint Posted July 19, 2013 Author Share Posted July 19, 2013 You can't do it server side. ok thanks Link to comment
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