Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies and more


How to/ Mod Install "Advertise Script"


Bilco

Recommended Posts

Very simple advertisement script that I found some time ago. A block pops up in the top right corner like it would if there was a side mission or Epoch event. I take no credit for this script, I'm only sharing due to recent posts for server messages.

 

Step 1. In the init.sqf at the very bottom paste this:

   

    //Advertise
    [] execVM "custom\advertise\advertise.sqf";

 

Step 2. Now create a folder called custom if you don't already have one and place that in the root of you mission.

Step 3. Now create a file and name it advertise.sqf and place the following code:

//Create an innitial sleep time of 5 min to pass the starting hint messages.
sleep 150;

_AddvertiseArray = [
    ["Title Code Here", "Type the mesage you want to display here"],
    ["Title Code Here", "Type the mesage you want to display here"],
    ["Title Code Here", "Type the mesage you want to display here"],
    ["Title Code Here", "Type the mesage you want to display here"],
    ["Title Code Here", "Type the mesage you want to display here"],
    ["Title Code Here", "Type the mesage you want to display here"]
];

while {true} do
{
    sleep 600; //Every 5 Min
    
    // Get random Advertise message from the array
    _message = _AddvertiseArray select (random (count _AddvertiseArray - 1));
    
    
    hint parseText format ["
        <t align='center' color='#0066FF' shadow='2' size='1.75'>%1</t>
        <t align='center' color='#0066FF'>_____________________</t>
        <br/>
        <t align='center' color='#FFFFCC' size='1.25'>%2</t>
    ", (_message select 0), (_message select 1)];
};

 

Where you see  ["Title Code Here", "Type the mesage you want to display here"] you can edit to you liking like so:

 ["Website", "Visit www.yourwebsite.com for information about whatever you want to advertise."]

 

Note: If you are using the infiSTAR antihack and have the Debug monitor set to true, you will only see this message flash for a second and then go back to the Debug monitor. Simply disable the Debug monitor in the AHconfig.sqf. If you are just running a debug monitor not associated with the antihack, it will still have the same effect.

Share this post


Link to post
Share on other sites

  • 3 months later...
-<Scheduler>

 

<!-- Insert your BEC jobs below this comment ** make sure each job is incremented (starting with 0) -->

 

//Create an innitial sleep time of 5 min to pass the starting hint messages. sleep 150; _AddvertiseArray = [ ["Endays", "Welcome to Enddays"], ["Teamspeak", "Come into teamspeak if you need help"], ["Teamspeak", "Teamspeak info apollo.typefrag.com:6420"], ["Website, "Website http://end-dayzserver.enjin.com/"], ["Free Building Box", "Free Building Box just ask admin"], ["Help The Server", "Like the server? go to website and donate today!"] ]; while {true} do { sleep 600; //Every 5 Min // Get random Advertise message from the array _message = _AddvertiseArray select (random (count _AddvertiseArray - 1)); hint parseText format [" 

<t size="1.75" shadow="2" color="#0066FF" align="center">%1</t>

 

<t color="#0066FF" align="center">_____________________</t>

 

<br/>

 

<t size="1.25" color="#FFFFCC" align="center">%2</t>

", (_message select 0), (_message select 1)]; }; 

</Scheduler>

 

 

Not right?

Share this post


Link to post
Share on other sites

Nope. I guess the instructions for this script are not very clear in the original post. It has nothing to do with BEC. This script goes in your mission PBO.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...