Jump to content
terox

Txu_InfoLinks (Briefing with external working links)

Recommended Posts

What is this.

Example MP  mission that has 4 working configurable clickable buttons in the briefing.

Purely VANILLA, no addons

These buttons can be configured to

  • Open an external web page in your default browser
  • Start and connect a client to your Teamspeak server ( If they have Teamspeak installed )
  • Download a file
  • And most likely also allow you to link to your discord channel (not tested)

 

No issues found while running with an anti virus and doesn't interrupt Arma

(Tested in full screen mode with multiple monitors)

 

Txu_InfoLinks.png

 

 

DOWNLOAD LATEST VERSION

Download Example mission and source code

Following download has  a working packed (pbo) mission file

and the source files

Txu_InfoLinks.zip

(see changelog)

 

The example mission will (If you click the links)

(Please don't spam them)

Allow you to

  • Join my teamspeak server
  • Open up the teamspeak client download page
  • Open up our website front page
  • Download our clientside addon pack

 

INSERTING INTO MISSION

1) Copy the TXU_Info folder into the root of your unpacked mission folder

2) Add the following lines to your Description.EXT

 

#include "Txu_Info\CfgControls.hpp"
class cfgFunctions
{
	#include "Txu_Info\cfgfunctions.hpp"
};

 

If your CfgFunctions class already exists then just copy the "#include" line as seen above

3) Open  the TXU_info\CfgControls.hpp

Edit the txt= and url= entries for the 4 button classes in there

and your done.

 

Also if your mission doesn't have a briefing like for example OPEX, you can comment out the 

TXU_INFO_FrameEHId = addMissionEventHandler ["EachFrame",{[] call TXU_INFO_fbriefingEH}];

 

e.g.

//TXU_INFO_FrameEHId = addMissionEventHandler ["EachFrame",{[] call TXU_INFO_fbriefingEH}];

 

so that it doesnt attempt to display in the initial briefing screen

 

ADVANCED EDITING

You can ad parameters to your Teamspeak URL

For example, automatically add a bookmark to the players Teamspeak Client as well as passwords, default channels etc

 

Complete format:

  • ts3server://ts9.teamspeak.cc?port=9987
  • &nickname=UserNickname
  • &password=serverPassword
  • &channel=MyDefaultChannel
  • &channelpassword=defaultChannelPassword
  • &token=TokenKey
  • &addbookmark=SomeBookmarkText
  •  

Parameters are optional. In most cases, specifying the host and port should be sufficient. Nicknames usually should not be specified, leave this to be configured by the users in the client. So a common URL would look like this: ts3server://ts9.teamspeak.cc?port=9987

Or simplified if only the port is given: ts3server://ts9.teamspeak.cc:9987

 

CREDITS

The orginal concept and a working example was by Larrow
His original post 
https://forums.bohemia.net/forums/topic/169501-link-to-website-in-briefing/?do=findComment&comment=3277456
He is the one that deserves the credit for this.

His original version only had 1 button and wasn't available in the initial briefing screen.

My version has 4 buttons (I cant see you needing more than 3 really)

 

LIMITATIONS

The system uses classes to create buttons that are defined in the Description.ext environment.

This is the only way I can see to pass an external  URL link.

For that reason it cannot be injected into the client using a serverside addon.

So the only way to get this to work is as part of the mission file.

That's a lot of editing for server admins and their mission devs

 

FUTURE DEVELOPMENT

If someone better at coding than me wants to rip this and optimise it more, feel free, I'll happily update the example mission and re update it.

 

ENJOY !

 

CHANGELOG

V.01 (Date: 18/5/2020)

File: TXU_info\f\fmapEH.sqf Line 20

Changed from    

    if(TXU_INFO_ButtonAdded)exitwith{}; 

to

    if(TXU_INFO_ButtonAdded1)exitwith{};

__________________________________________

 

V.02 (Date: 24/5/2020)

Removed the requirement to #include "Txu_Info\CfgBaseDefines.hpp"

This file has been completely removed.

The default Gui class bases are no longer inherited from, this makes it much easier to import this into existing missions that define their own GUI Base classes

and should not conflict with any existing Gui definitions

__________________________________________

 

 (Date: 22/3/2022) Updated link was http now https

 

 

 

 

Edited by terox
Update, see changelog
  • Like 4
  • Thanks 4

Share this post


Link to post
Share on other sites

Wow ... this is pretty cool terox.  Grats on first release !

Share this post


Link to post
Share on other sites

V.02 (Date: 24/5/2020)

Removed the requirement to #include "Txu_Info\CfgBaseDefines.hpp"

This file has been completely removed.

The default Gui class bases are no longer inherited from, this makes it much easier to import this into existing missions that define their own GUI Base classes

and should not conflict with any existing Gui definitions

__________________________________________

  • Like 1

Share this post


Link to post
Share on other sites

Another must-have from you. Great work as ever.

I assume this can be made to click a link that opens a youTube page? I'm thinking of a video briefing or similar.

Share this post


Link to post
Share on other sites

@Tankbuster

there is a comref specifically for youtube mate if that is all you want to do..

 

https://community.bistudio.com/wiki/openYoutubeVideo

 

You could add an "execute expression" line direct into your briefing

I haven't tried a youtube url link in this system but from what I am seeing, anything that can be opened via a url link will work with this.

 

Share this post


Link to post
Share on other sites

@terox

The download link at the top isn't working. Was looking to use and test this! Please fix if you can. Thank you :)

Share this post


Link to post
Share on other sites

Apologies for bad link, now updated ands working, see first post fore dl link

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×