Sign in to follow this  
TDK

[Question]Internet Radio

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?

Share this post


Link to post

Online stream support will be included in MTA 1.1(however, that won't be replacing existing radio stations), but for now, there's no such thing.

Share this post


Link to post

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)

Share this post


Link to post
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).

Share this post


Link to post
I don't know too, but, u can try the radio3d resource

http://community.mtasa.com/index.html?p ... ils&id=532

But, what I've seen and understanded, you need to put the musics (.mp3 files) on a web host and set up the resource to show the musics for the players.

U can try ;)

Yep sir!

But, im's sory, this resource called radio3d sucks

Share this post


Link to post
Online stream support will be included in MTA 1.1(however, that won't be replacing existing radio stations), but for now, there's no such thing.

I know it, i downloaded mta sa 1.1 unstable and install it

Share this post


Link to post
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)

Share this post


Link to post
omg, TDK! Do not quadruple-post! You can answer to all questions in one post

yep sir!)) okay,sorry=D hm.... how to disable standart radio?

Share this post


Link to post
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!))

Share this post


Link to post

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()

Share this post


Link to post
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 )

Share this post


Link to post

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
)

Share this post


Link to post
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)

Share this post


Link to post

TIMER???

this is timer for setting radio station (but you dont need if you cancel radio changes)

setTimer(function() setRadioChannel(0) end, 50, 0)

and setting new timer each time you enter vehicle - more and more lag.

adn your event was wrong anyway :P

Share this post


Link to post

thank you Mr. Guru varez =D You're the best lua teacher in all over the world=D

Share this post


Link to post
i think wiki is better, as im using it all the time.

Recipe for timer:

1. Open wiki

2. In search field type "timer". Hit enter.

3. :mrgreen:

i too using wiki=DDD

1. start computer

2. start browser

3. open wiki

4. open server directory

5. scripting

6. play =D

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.