Jump to content

Voicedlc - Custom URL for boombox youtube etc


HowlingWolf
 Share

Recommended Posts

Once I get some free time ill be looking into this.
I imagin something like this will work after having a quick look in dnspy.

Havn't tested yet since I have to many other things to fix at the moment due to the update.

       [ChatCommand("customstation")]
        void ChangeStation(BasePlayer player, string arg2, string[] args)
        {
            if (!player.IsAdmin) return;
            if (args.Length < 1)
            {
                player.ChatMessage("InvalidArgs");
                return;
            }
            RaycastHit rhit;
            if (!Physics.Raycast(player.eyes.HeadRay(), out rhit))
            {
                return;
            }
            var entity = rhit.GetEntity();
            if (entity == null)
            {
                return;
            }
            if (rhit.distance > 5f)
            {
                return;
            }
            if(entity.ShortPrefabName == "boombox.deployed")
            {
                DeployableBoomBox radio = entity as DeployableBoomBox;
                radio.SetFlag(DeployableBoomBox.Flag_HasPower, true);
                radio.ClientRPC<string>(null, "OnRadioIPChanged", args[0]);
                radio.SetFlag(global::BaseEntity.Flags.On, true);
            }
        }

 

  • Like 1
Link to comment
Share on other sites

13 hours ago, MikeHawke said:

You can add internet feeds e.g. my station RustRadio

boombox.serverurllist "RustRadio,http://listen.rustradio.co.uk:8000/stream"

in console obviously

yes, but.. not all admins wish to do this.. thats the sad part.. so thats why the question in here 🙂

Link to comment
Share on other sites

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
 Share

389.7k

Downloads

Total number of downloads.

2k

Customers

Total customers served.

28k

Files Sold

Total number of files sold.

436.2k

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.