Hiya,
Another quick question regarding vending machines - I'd love to know if the status of the broadcast is available in OnToggleVendingBroadcast so I can do a chat broadcast when a machine is made newly available...
Thanks in advance,
T.
Solved Getting status of broadcast in OnToggleVendingBroadcast?
Discussion in 'Rust Development' started by Rebajas, Apr 7, 2017.
-
Never done anything with vending machines, but checking the value of the following bool should give you what you want:
Code:machine.globalBroadcast
-
@Rebajas: The VendingMachine has the method `public bool IsBroadcasting()` which you can use to get the broadcasting status of the vendingmachine.
Code:private void OnToggleVendingBroadcast(VendingMachine machine, BasePlayer player) { bool enabled = machine.IsBroadcasting(); }
-
Nice one - worked perfectly...