AR/setRadioChannel

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function sets the currently active radio channel.

This function also works while not in a vehicle.

Syntax

bool setRadioChannel ( int ID )             

Required Arguments

  • ID: .ايدي الراديو الذي تريد تشغيله
  • 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

"true" اذا تم تعين محطة راديو بنجاح "false" اذا لم يتم تعين محطة راديو

مثال

هذا المثال يقوم بأضافة امر "setradio " لتغير قناة الراديو الحالية عبر الايدي

Click to collapse [-]
Client
addCommandHandler ( "setradio", -- "setradio" اضافة امر 
    function ( command, stationID ) -- تعريف
        local result = setRadioChannel ( tonumber( stationID ) ) -- وضع قناة الراديو عبر الايدي
        if result then -- if we had a valid ID
            outputChatBox ( "Changed your radio station to " .. getRadioChannelName ( tonumber ( stationID ) ) .. "!" ) -- اضهار نص في الشات
        else
            outputChatBox ( "Invalid radio station ID, valid ones are 0-12." ) -- اضهار نص في الشات
        end
    end 
)

أنظر أيضاً