Jump to content

[Question]Internet Radio


TDK

Recommended Posts

Hi all! i have a question: it's possible to replace original radiostations (like PlayBack FM) via Internet radio? my friend say yes, and he said that he done it, but he don't try me to hear his script.. help plz how?)) i need to download fixes?

Link to comment
so, tdk:

not yet..

but after release of 1.1 i will write resource allowing to play each internal radio stations and addional ones (you will be able to disable interal ones via xml, and add new streams)

If you are at it, it would be great if there would be a setting for default radio station (or custom stream).

Link to comment
so, tdk:

not yet..

but after release of 1.1 i will write resource allowing to play each internal radio stations and addional ones (you will be able to disable interal ones via xml, and add new streams)

//use MTA 1.1 Unstable, it really great)

Link to comment
function radio ( theVehicle, seat, jacked )
toggleControl (  "radio_next", false )
toggleControl (  "radio_previous", false )
end
addEventHandler ( "onResourceStart", getRootElement(), radio )
 
 
function contr ( theVehicle, seat, jacked )
setRadioChannel ( 0 )
end
addEventHandler ( "onPlayerVehicleEnter", getRootElement(), contr )

//it's my clientside turnoffradio script, but it's don't work(( anybody can help me?) plz!))

Link to comment

when i was saying not to quadruple post, i meant multi-post in general.. there's edit button.

your "clientside" scirpt have server-side events (use onClientResourceStart etc)

and arguments in your radio function are copied from another event, and they are wrong.

dont forget to attach onClientResourceStart to getResourceRootElement(getThisResource()) instead of getRootElement()

Link to comment
when i was saying not to quadruple post, i meant multi-post in general.. there's edit button.

your "clientside" scirpt have server-side events (use onClientResourceStart etc)

and arguments in your radio function are copied from another event, and they are wrong.

dont forget to attach onClientResourceStart to getResourceRootElement(getThisResource()) instead of getRootElement()

My new script (help by KagerA) , but if i enter vehicle radio not switched to RADIO OFF, help plz)) this is my lua code:

addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(),
function(station)
cancelEvent();
setRadioChannel(0)
end
)
 
function contr ( theVehicle, seat, jacked )
setRadioChannel (50,1,0)
end
addEventHandler ( "onPlayerVehicleEnter", getLocalPlayer(), contr )

Link to comment

wtf is this

setRadioChannel (50,1,0)

something new in syntax in 1.1?

tbh i didnt check 1.1 yet.

this should disable gta standard radio:

addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), function()
setRadioChannel(0)
end)
 
addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(),
function()
setRadioChannel(0)
cancelEvent() -- or try without canelling too.. hope that firing setRadioChannel is not causing onClientPlayerRadioSwitch event -- cause it will be cancelling itself, making impossible to change radio station ;|
end
)

Link to comment
wtf is this
setRadioChannel (50,1,0)

something new in syntax in 1.1?

tbh i didnt check 1.1 yet.

this should disable gta standard radio:

addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), function()
setRadioChannel(0)
end)
 
addEventHandler("onClientPlayerRadioSwitch", getLocalPlayer(),
function()
setRadioChannel(0)
cancelEvent() -- or try without canelling too.. hope that firing setRadioChannel is not causing onClientPlayerRadioSwitch event -- cause it will be cancelling itself, making impossible to change radio station ;|
end
)

hmmmm okay, thanks... yep, it's a timer for 50 ms)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...