Scripting/Squirrel/Functions/CreateRadioStream

From Vice City Multiplayer
Revision as of 16:44, 8 November 2014 by Ysc3839 (talk | contribs) (Created page with "This function will add a online radio to vehicle's radio. == Syntax == <pre>CreateRadioStream( radioName, radioURL, CanSelect )</pre> == Arguments == * ''string'' '''radio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

CreateRadioStream( radioName, radioURL, CanSelect )

Arguments

  • 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 example send a message to all saying Hello, have fun here!:

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