iCEtIMed

iCEtIMed's "Mod missing" - warning at spawn screen

121 posts in this topic

ICEtIMed's Warning Messages

This gives a warning to players joining if they dont have the mod on the server.

On Spawn it brings up a HUD and offers a hyperlink for the downloads needed.

The smaller box will stay on screen for 1 minute then disappears.

 

"straight from the hip" @ExileMod.com

bXxV7a.jpg

Spoiler

OVaVCG.jpg

This disappears after 1 minute

Basic Instructions;

1 - Un PBO your mission file.

2 - Create a .sqf file and call it "ModCheck"

3 - Paste this;

Spoiler

waitUntil {!isNull (findDisplay 46)};
waitUntil {!dialog};

sleep 6;

if(getText(configFile >> "cfgWeapons" >> "LMG_mas_Mk200_F_a" >> "displayname") isEqualTo "")then{
    _att = format["[WARNING %1!]",name player];
    _att hintC [
        parseText "<t shadow='2' size='3'align='center'color='#cf2e4e'>You are Missing: </t><br/><t shadow='2' size='1.75'align='center'color='#b0eb00'>@MAS @NATO_Rus_Vehicle </t><br/><br/><t shadow='2'align='center' size='1.25'>These mods add a lot to the game!</t><br/><t shadow='2'align='center'>You can continue to play on this server without them, but for a much better experience it's recommended you download:</t>",
        parseText "<t shadow='2'size='1.1' >Mas Nato and Russian Weapon Pack.</t><br/><a shadow='2'size='0.8'align='center' href='http://www.armaholic.com/page.php?id=21912'>http://www.armaholic.com/page.php?id=21912</a>",
        parseText "<t shadow='2'size='1.1' >Mas Nato and Russian Vehicles Pack.</t><br/><a shadow='2'size='0.8'align='center' href='http://www.armaholic.com/page.php?id=27652'>http://www.armaholic.com/page.php?id=27652</a>
        <br/><br/><t shadow='2'size='1.1'>Those addresses can be clicked for a direct link, or get them from the Steam Workshop or the Arma3 launcher</t><br/><br/><t shadow='2'align='center'size='1.75'color='#3d94af'>See you in game!</t>"
    ];
};

4 - For this to work you need to add a class item from the mod. In this example I used' "LMG_mas_Mk200_F_a", because I wanted to check they had @mas weapons. You can change that to another classname in the mod you have. (Be aware that you may need to change the cfg...... part. As long as  it is a classname specific to the mod you are using you should be good.

5 - If you dont have one already. Create a init.sqf in you rmission file (Dont worry, it will run).

6 - In your init.sqf, paste this at the very top;

Spoiler

if(hasInterface) then{
    [] execVM "custom\ModCheck.sqf";
};

7 - Thats the install.

 

Config of the install;

You need to edit two things.

1st - Make sure you have edited the classname, "LMG_mas_Mk200_F_a", to something in your mod.

2nd - Make sure you edit the addresses twice. (These are direct hyperlinks to the mods needed for the server.)

eg.

'http://www.armaholic.com/page.php?id=21912'>http://www.armaholic.com/page.php?id=21912</a>"

3rd - Make sure;

if(hasInterface) then{
    [] execVM "custom\ModCheck.sqf"
};

is at the top of your init.sqf

4th - Verify that you have put the modcheck.sqf in the same place as the address you specified on the init.sqf

PS.

Test this before using on your server.

 

The issue you may find is with this bit of script;

if(getText(configFile >> "cfgWeapons" >> "LMG_mas_Mk200_F_a" >> "displayname") isEqualTo "")then{

The text here means;

(Look for an in game, used script>> cfgWeapons>> the classname in that file.)

We are now looking for a weapon with the classname - "LMG_mas_Mk200_F_a" .

If it returns with a negative then it displays the message.

Depending on your mod, it will depend on the "cfg" file you search will change, as will the classname you search for.

 

If you have issues, I will try and help.

Enjoy people!

~iCE

 

** Update 1.1 arriving shortly **

(When I get time to finish....° PM if you want the new version now. the new box needs testing, resolution etc.)

Here

or here.

I see you . Nice ~~ iCE

Edited by iCEtIMed
8 people like this

Share this post


Link to post
Share on other sites

+1

 

you have a fix for the image links

 

Edited by Digital Purge

Share this post


Link to post
Share on other sites
Advertisement

Yea images arent working.. Sounds great though.

Uhm, one sec

 

Edited by iCEtIMed

Share this post


Link to post
Share on other sites

Still nothing..

 

Capture.PNG

Changed Image host. Should be there now.

Edited by iCEtIMed

Share this post


Link to post
Share on other sites

Yes! Thanks I can see the pics now! Looks great. How does this work if I already have the mods listed in the mission.sqm?

Share this post


Link to post
Share on other sites

Its designed for people to be able to join the server. Feal there way about, and then download the mods etc.

If you have the mods listed then that will cut the player much faster than any mission script jumps in! You will be kicked for not having the mod.

This is a try befor you buy for some mods - others I'd say go for the direct kick.

Edited by iCEtIMed

Share this post


Link to post
Share on other sites
class Mission {
	addOns[] = {"exile_client", "a3_map_altis", "mas_weapons_pack", "mas_weapons", "mas_weapons_ak", "mas_weapons_nw", "mas_weapons_m4"};
	addOnsAuto[] = {"exile_client", "a3_map_altis"};

this gives warning if you update mission.sqm and saves adding in more scripts, But it's nice to see a custom script for the kick message GJ :)

Edited by DeathBinder

Share this post


Link to post
Share on other sites
class Mission {
	addOns[] = {"exile_client", "a3_map_altis", "mas_weapons_pack", "mas_weapons", "mas_weapons_ak", "mas_weapons_nw", "mas_weapons_m4"};
	addOnsAuto[] = {"exile_client", "a3_map_altis"};

this gives warning if you update mission.sqm and saves adding in more scripts, But it's nice to see a custom script for the kick message GJ :)

 

lol, it doesnt kick.

Its a script to tell the player they are joining a server with mods.

Look befor you speak buddy, your just kicking people if they dont have the mod.

 

 

Edited by iCEtIMed

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.