SetRadioChannel: Difference between revisions
Jump to navigation
Jump to search
m (→Returns) |
m (→Example) |
||
Line 18: | Line 18: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("setradio", | addCommandHandler ( "setradio", | ||
function ( | function ( command, stationID ) | ||
setRadioChannel ( tonumber( stationID ) ) | |||
outputChatBox ( "You set your radio station to: " .. stationID ) | |||
end | |||
end | |||
) | ) | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 19:24, 25 March 2009
This function sets the currently active radio channel.
Syntax
bool setRadioChannel ( int ID )
Required Arguments
- ID: The ID of the radio station you want to play.
- 0: Radio Off
- 1: Playback FM
- 2: K-Rose
- 3: K-DST
- 4: Bounce FM
- 5: SF-UR
- 6: Radio Los Santos
- 7: Radio X
- 8: CSR 103.9
- 9: K-Jah West
- 10: Master Sounds 98.3
- 11: WCTR
- 12: User Track Player
Returns
Returns true if channel was set successfully, false otherwise.
Example
addCommandHandler ( "setradio", function ( command, stationID ) setRadioChannel ( tonumber( stationID ) ) outputChatBox ( "You set your radio station to: " .. stationID ) end )
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd