Jump to content

[Question]Internet Radio


TDK

Recommended Posts

Posted

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?

Posted

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.

Posted

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)

Posted
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).

Posted
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

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

Posted
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?

Posted
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!))

Posted

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

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

Posted

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
)

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

Posted

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

Posted
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

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...