Scripting/Squirrel/Functions/CreateRadioStream

From Vice City Multiplayer
Revision as of 14:12, 7 March 2015 by Ysc3839 (talk | contribs)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

This function will add a online radio to vehicle's radio.

Syntax

1

CreateRadioStream( radioName, radioURL, CanSelect )

2

CreateRadioStream( streamID, radioName, radioURL, CanSelect )

Arguments

1

  • string radioName - The radio name.
  • string radioURL - The online radio URL.
  • bool CanSelect - Show the radio stream on vehicle's radio list.

2

  • int streamID - The radio id.
  • string radioName - The radio name.
  • string radioURL - The online radio URL.
  • bool CanSelect - Show the radio stream on vehicle's radio list.

Example

The following is an example for radio stream. Link not provided.

function onPlayerCommand( player, cmd, text );
{
 if ( cmd == "radio" )
 {
  player.Vehicle.Radio = CreateRadioStream( "TestRadio", "YourURL", true );
 }
}

Notes

Call onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions