Jump to content
Sign in to follow this  
silentx3ro

Restricting access to vehicles

Recommended Posts

Shure did the editor returns a value in the OK box with nothing in it and it wont allow a save. Sorry!

Editor? Well that's why.

You need to put the above code in an .sqf file (let's call it getIn.sqf) in your mission folder, then for your eventhandler:

this addEventHandler ["getin",{_this call compile loadFile "getIn.sqf"}]

Also, make sure you change this:

_array = whatever your array of UIDs is

To some actual array (I guess you were using masterUIDArray):

_array = masterUIDArray;

Edited by Big Dawg KS

Share this post


Link to post
Share on other sites

Oh, silly me. Of course that doesn't work; it's applying the isPlayer check to no one. Use this instead:

this addEventHandler ["GetIn",{if (getPlayerUID (_this select 2) in masterUIDArray) then {hint "Clan member confirmed -- Good Hunting!"} else {if (!isPlayer (_this select 2)) exitWith {};(_this select 2) action ["getOut",(_this select 0)];hint "You are not authorized to use that vehicle!"}}]

Share this post


Link to post
Share on other sites

OK right chaps

@ST Dux

Brill a good fix and yes it works, WOW! thanks for that. It is a good simple fix for what I need.

@Big Dawg

Looks good need to play arround with it to get it perfect (will look into that script)!

I must say thaks allot for the help you have both been on the ball. Thanks for helping a noob out.

Share this post


Link to post
Share on other sites
For every player, either a killed EH or a script that goes waitUntil {!alive _unit}; store weapons and ammo into arrays local to each unit. Then waitUntil {alive _unit}; add back wepons and ammo from arrays local to each unit. For more advanced handling if items, check out Domination code, deals with plenty of stuff you should be aware of.

Ok so I've tried to set up a killed EH and a script, using what info i could find in Faq's and on these forums but have had no luck getting it to function. Could some one give me a simple step by step of what I should be doing (A script would be prefered but at this point ill take what I can get :D)

Your patience and assistance is appreciated. :)

Cheers

Silent

Edited by silentx3ro

Share this post


Link to post
Share on other sites

One other thing i hope you folks could help with,

I'm using the following so that my clan members can spawn in with their prefered weapon loadouts addapted from this thread;

In init.sqf

null=[] execVM "clankits.sqf";  //Runs Clan Gear Loader

clankits.sqf

// Spawns clan members in with prefered kits
WaitUntil{not isNull player};
waitUntil {(getPlayerUID player) != ""};

_uid 	= getPlayerUID player;
_title  = "";
_text   = "";
clan	="";

#include "kitlist.sqf";

sleep 1;
hint parseText (_title + _text);

and finally kitlist.sqf

//clan member kit list
sleep 35;
switch(_uid)do 
{ 
case "xxxxxxx": // silentx3ro
{                 
	removeAllWeapons player;
	{player addmagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5,6];
	player addWeapon "G36K"; 
	{player addmagazine "SMAW_HEAA";} forEach [1,2,3,4];
	player addWeapon "SMAW";
	{player addmagazine "pipebomb";} forEach [1,2];
               {player addmagazine "Laserbatteries";} forEach [1,2];
	player addweapon "Laserdesignator"; player addweapon "NVGoggles";
               hint "Gear Loaded"


};

};

Everything works as planned except when a player respawns they have the same gear they died with. I would like to make the above script run again after respawn so the player has full ammo on respawn.

What would I need to change so that it does?

Ok so i really am coming up at a complete loss with this i managed to get it to work, sort of, but with an EH on each playable character but this really isnt any use for my clans server as we tend to run alot of different missions so would need to add the EH to every playable character in ever mission and any new ones.

Could someone direct me to a post how to get the same result using a script? it would still need to be added to all the missions but it would make life a little easier!

I've tried doing a few searches but i cant seem to find anything that fits the bill.

Share this post


Link to post
Share on other sites

i was trying to get this to work to restrict certain types of aircraft on our squad server to only squad members.

Ive added:

masterUIDArray = ["7-digit UID here",];

masterClassArray = ["A10_US_EP1",];

into "init.sqf" but still doesnt show up any confirmation when i enter a vechile or even kick out an un-authorized entering player...

And of course the init row for the vehicle..

EDIT: I got this to work.. i tried it on a dedicated server instead of locally and its working.. just me that forgot to test properly.

Edited by Frosties

Share this post


Link to post
Share on other sites
If you need to run this check for dynamically-created vehicles (respawned vehicles fall into this category), then simply taking a different approach would probably be easier than attempting to reinvent the wheel and write a custom vehicle respawn script. Try this:

1. Accumulate a list of vehicle class names for which you want access to be restricted. Like your UID list, make this list into an array.

2. Declare this array alongside your UID array in init.sqf. Call it masterClassArray.

3. Nix the event handler method altogether; instead...

4. Create a repeatedly-activated trigger with the following fields:

Condition:

vehicle player != player

On Activation:

if (typeOf (vehicle player) in masterClassArray) then {if (getPlayerUID player in masterUIDArray) then {hint "Clan member confirmed -- Good Hunting!"} else {player action ["getOut",(vehicle player)];hint "You are not authorized to use that vehicle!"}}

As the reserved variable "player" returns something different on every client in a multiplayer game, this single trigger should be automatically customized for each person that joins the server.

Ok this works perfectly well and has been tested in domination2 and still works, but have come across a slight problem, only Clan members can get in the choppers as required, but should one of these choppers be used to evac, then its only clan members that can be picked up. Could it be altered so its only the pilots seat/drivers seat of the specific classes that allows clan members, all other potitions in the vehicle are free to use? Hopeing someone knows the answer.

Thanks,

Tay-uk

Share this post


Link to post
Share on other sites

I've modified the trigger activation code so that it stops restricting positions when the driver/pilot seat of a vehicle is occupied by a clan member.

if (typeOf (vehicle player) in masterClassArray) then {if ((vehicle player emptyPositions "driver" == 0) && (player != driver vehicle player)) exitWith {};if (getPlayerUID player in masterUIDArray) then {hint "Clan member confirmed -- Good Hunting!"} else {player action ["getOut",(vehicle player)];hint "You are not authorized to use that vehicle!"}}

Edited by ST_Dux

Share this post


Link to post
Share on other sites

I just want to say your a genius, absolutely brilliant, works like a dream in domination2. We can now have our rewards without numties destroying everything.

Thanks for the time and effort you put into this and I feel sure most clan servers will have this method in it within weeks.

Best regards,

Tay-uk

P.S.

I know i am asking alot, but is there a way of adding a player UID to the init.sqf while the game is running on a dedi server?

Edited by Tay-uk

Share this post


Link to post
Share on other sites
I know i am asking alot, but is there a way of adding a player UID to the init.sqf while the game is running on a dedi server?

If you can access the dev console for the dedicated server, this is very easy to do:

masterUIDArray = masterUIDArray + [<newID1>,<newID2>,...];
publicVariable "masterUIDArray"

Share this post


Link to post
Share on other sites

This is too much for one week, :bounce3:unbelievable!!!

So would the init look something like this below, or would one of the new lines replace one of the original ones?

masterUIDArray = ["7-digit UID here",];
masterClassArray = ["A10_US_EP1",];

masterUIDArray = masterUIDArray + [<newID1>,<newID2>,...];
publicVariable "masterUIDArray"

So in effect the masterUIDarray could be all registered clan members and the + UID's could be trusted public players added as the game is running, evenn though I would assume they would need to leave server and re-enter once UID has been entered?

Edited by Tay-uk

Share this post


Link to post
Share on other sites

Those last two lines are not meant to go in the init file; they would need to be executed during the mission by an admin. Someone will need to have access to a developer console (a place to input code on the fly) for the dedicated server in order for this to work. A player whose ID was added to the master UID array in this manner would not need to leave and rejoin the server for this to take effect.

Share this post


Link to post
Share on other sites

I have no idea about the dedi console, so will pass info to someone who might know.

Thanks for all the info and help with this, we have it working as it is on the dedi and its working great, everyone (except the public love it, lol).

Share this post


Link to post
Share on other sites

Best method is simply to lock the vehicles; for my group I run a UID array, and if they are not in that array, it just locks all the vehicles for them. Stops glitches and people getting in the back of vehicles then switching positions to get in etc.

Share this post


Link to post
Share on other sites

As much as I do locking (mostly per role, not if you're a squad member or not) myself, locking out all others from all vehicles from all positions? That sounds like the most public unfriendly server I have ever heard of. Why do you even allow people into your server if they have to suffer that?

Share this post


Link to post
Share on other sites
Now, copy and paste the following line into the initialization field of each vehicle for which you want access to be restricted:

this addEventHandler ["GetIn",{if (getPlayerUID (_this select 2) in masterUIDArray) then {hint "Clan member confirmed -- Good Hunting!"} else {(_this select 2) action ["getOut",(_this select 0)];hint "You are not authorized to use that vehicle!"}}]

And that should do it.

How could I use something like this with unit names? For example I have a pilot simply named pilot that I want to add this script to a helicopter I only want that playable character to use? I don't mind other units riding in the vehicle, just want the pilot unit to be the only one to fly.

Edited by doomanchu

Share this post


Link to post
Share on other sites
As much as I do locking (mostly per role, not if you're a squad member or not) myself, locking out all others from all vehicles from all positions? That sounds like the most public unfriendly server I have ever heard of. Why do you even allow people into your server if they have to suffer that?

I lock just the driver position most of the time. That way they cannot sabotage or abandon vehicles, but can still be supporting or cargo. ;)

Share this post


Link to post
Share on other sites
If you can access the dev console for the dedicated server, this is very easy to do:

masterUIDArray = masterUIDArray + [<newID1>,<newID2>,...];
publicVariable "masterUIDArray"

Sorry for my ignorance, but a developer console......what is it?

It it where you can see the dedi server config files? and it it one of those config files you add those 2 lines too?

Share this post


Link to post
Share on other sites

While others have had good luck getting this to work, I have not. I've added this to my init.sqf:

masterUIDArray = ["UID","UID","UID",];

masterClassArray = ["AH64D_EP1","C130J_US_EP1","UH60M_EP1","MH60S","C130J","UH60M_MEV_EP1","AH1Z"];

And have added to a repeatedly activated trigger:

Condition field: vehicle player != player (This is verbatim.)

Activation Field: if (typeOf (vehicle player) in masterClassArray) then {if ((vehicle player emptyPositions "driver" == 0) && (player != driver vehicle player)) exitWith {};if (getPlayerUID player in masterUIDArray) then {hint "TFKW member confirmed -- Good Hunting!"} else {player action ["getOut",(vehicle player)];hint "Only TFKW members are authorized to use this vehicle!"}}

I've tested it on my dedicated server with out my UID added to the Init.sqf and it still allows me to get in the chopper.

I know I've mucked something up, but no idea where.

Thanks for any help guys.

Share this post


Link to post
Share on other sites

Are you trying to enter a driver/pilot position? The code you are using will only limit those spots, not other ones.

Share this post


Link to post
Share on other sites

Yes. I am entering in to the pilot pos. and it allowes me to do so with out my uid number in the init.sqf

Share this post


Link to post
Share on other sites

Are the hints working properly? When you get into the chopper, does it give you the "clan member confirmed" message, or does it just let you in without any message? If it's giving you the message, then your ID actually is in the array because there is no way for it to deliver this message otherwise. If it's just letting you in without any message, then either the vehicle you're getting into isn't in the vehicle class array, or there is some error in your init.sqf file that is preventing the array from being established properly. Make sure you have -showScriptErrors on.

Share this post


Link to post
Share on other sites

Well here is the init. I'm not sure how to use the -showscripterrors

---------- Post added at 11:22 PM ---------- Previous post was at 11:22 PM ----------

diag_log format ["########################## %1 ################################", missionName];

//////////////////////////////////////////

//////////////////////////////////////////

// TFKW Unit Meber U.I.D's for coppers

//masterUIDArray = ["UID","UID","UID",];

//masterClassArray = ["AH64D_EP1","C130J_US_EP1","UH60M_EP1","MH60S","C130J","UH60M_MEV_EP1","AH1Z"];

////////////////////////////////////////

//Enemy accuracy

//{

// if (side _x == east) then {

// _x setskill ["aimingAccuracy",0.15];

// _x setskill ["spotDistance",0.85];

// _x setskill ["spotTime",0.85];

// _x setskill ["courage",0.85];

// _x setskill ["commanding",0.85];

// _x setskill ["aimingShake",0.15];

_x setskill ["aimingSpeed",0.65];

// };

///////////////////////////////////////

spawntype = param1;

EVOhour = paramsArray select 2;

grasslevel = paramsArray select 3;

if (grasslevel == 0) then {setTerrainGrid 50};

if (grasslevel == 1) then {setTerrainGrid 25};

if (grasslevel == 2) then {setTerrainGrid 12.5};

if (grasslevel == 3) then {setTerrainGrid 6.25};

if (grasslevel == 4) then {setTerrainGrid 3.125};

viewparam = paramsArray select 4;

ranklock = paramsArray select 8;

diffparam = paramsArray select 9;

loadoutparam = paramsArray select 10;

townparam = paramsArray select 11;

performanceparam = paramsArray select 12;

EVO_weathersystem = paramsArray select 13;

EVO_contermeassures = paramsArray select 14;

enemyairsupport = paramsArray select 16;

ranksystem = paramsArray select 17;

enableSaving [false, false];

enableEnvironment false;

// Respawn settings

publicVariable "spawntype";

if (spawntype == 0 or spawntype == 1) then {server execVM "revive_init.sqf"};

if (spawntype == 2) then {"Respawn_west" setMarkerPos [(getMarkerPos "base" select 0),(getMarkerPos "base" select 1)]};

//debug=true

if (performanceparam == 1) then {enableEnvironment true};

if (performanceparam == 2) then {enableEnvironment false};

[] execVM "Briefing.sqf";

// Score required to attain each rank.

BIS_EVO_rank1 = 1;

BIS_EVO_rank2 = 2;

BIS_EVO_rank3 = 3;

BIS_EVO_rank4 = 4;

BIS_EVO_rank5 = 5;

BIS_EVO_rank6 = 6;

BIS_EVO_GlobalSleep = 0.1; // Global sleep is used after spawning a unit.

if (townparam == 1) then { BIS_EVO_MissionProgress = 0;};

if (townparam == 2) then { BIS_EVO_MissionProgress = 1;};

if (townparam == 3) then { BIS_EVO_MissionProgress = 2;};

if (townparam == 4) then { BIS_EVO_MissionProgress = 3;};

if (townparam == 5) then { BIS_EVO_MissionProgress = 4;};

if (townparam == 6) then { BIS_EVO_MissionProgress = 5;};

if (townparam == 7) then { BIS_EVO_MissionProgress = 6;};

if (townparam == 8) then { BIS_EVO_MissionProgress = 7;};

if (townparam == 9) then { BIS_EVO_MissionProgress = 8;};

if (townparam == 10) then { BIS_EVO_MissionProgress = 9;};

BIS_EVO_MissionProgress = 0;

// Sub mission conditions

BIS_EVO_Onmission=false;

BIS_EVO_sobj1=false;

BIS_EVO_radios = [city1,city2,city3,city4,city5,city6,city7,city8,city9,city10]; // Each radio in each town

BIS_EVO_MissionTowns = ["mobj1","mobj2","mobj3","mobj4","mobj5","mobj6","mobj7","mobj8","mobj9","mobj10"];// Each mission objectives town marker.

// Set difficulty

// Easy

if (diffparam == 60) then

{

BIS_EVO_Infantry = [[4,8],[5,10],[6,12],[7,14],[7,14],[8,16],[8,16],[9,18],[10,20],[10,20]];//[Actual number of groups,Base number of groups]

BIS_EVO_Mechanized = [[4,5],[4,5],[6,7],[6,7],[6,7],[7,7],[7,8],[7,8],[8,9],[8,10]];//[Actual number of groups,Base number of groups]

};

// Normal

if (diffparam == 30) then

{

BIS_EVO_Infantry = [[6,12],[6,12],[8,16],[10,20],[12,24],[14,28],[16,32],[18,36],[20,40],[20,40]];//[Actual number of groups,Base number of groups]//Razor

BIS_EVO_Mechanized = [[4,5],[5,6],[5,6],[6,8],[6,8],[8,10],[10,12],[15,16],[16,18],[16,18]];//[Actual number of groups,Base number of groups]//Razor

};

// Hard

if (diffparam == 10) then

{

BIS_EVO_Infantry = [[15,30],[20,40],[25,50],[25,50],[30,60],[35,70],[40,80],[40,80],[45,90],[45,90]];//[Actual number of groups,Base number of groups];//[Actual number of groups,Base number of groups]

BIS_EVO_Mechanized = [[10,12],[12,14],[12,14],[14,16],[14,16],[18,20],[20,22],[20,22],[22,24],[22,24]];//[Actual number of groups,Base number of groups]

};

// Extreme

if (diffparam == 5) then

{

BIS_EVO_Infantry = [[20,40],[25,50],[25,50],[30,60],[35,70],[40,80],[45,90],[50,100],[55,110],[55,110]];//[Actual number of groups,Base number of groups];//[Actual number of groups,Base number of groups]

BIS_EVO_Mechanized = [[10,20],[12,24],[14,28],[16,32],[18,36],[20,40],[22,44],[22,44],[24,48],[24,48]];//[Actual number of groups,Base number of groups]

};

// The actual amount of infantry and mechanized enemy groups in a city.|When this number falls lower the the base amount, reinforcements are sent.

// The base amount of infantry and mechanized enemy groups in a city|If all of a group die the number is decremented.

BIS_EVO_CivCount = 0; // Number of civilians spawned

#include "R3F_ARTY_AND_LOG\init.sqf";

BIS_EVO_vdist=viewparam; // clients saved view distance

BIS_EVO_avdist=viewparam+1000; // clients saved air vehicle view distance

BIS_EVO_gdate = [2007,7,4,EVOhour,59]; // Current date and time

BIS_EVO_Playerlist = []; // List of player names.

BIS_EVO_Playercount = 0; // Amount of players in the game

BIS_EVO_lives=500; // Amount of deaths allowed in a game before it ends when paarm is active

BIS_EVO_PlayerSkill = 0.0;

BIS_EVO_allvar_packed = ""; // String transmitted to JIP clients containing all vars.

BIS_EVO_end=false; // Used to trigger the end of the game

BIS_EVO_sop=objNull; // Sub objective player

BIS_EVO_sot=objNull; // Sub objective target (radio or officer)

BIS_EVO_sor=0; // Sub objective reward

BIS_EVO_sup=objNull; // Player calling support

CB_sup=objNull; // by psycho

BIS_EVO_sut=""; // Type of support called

BIS_EVO_sur="";

BIS_EVO_fattack=false; // detects if the player was attacked by the enemy for medic rewards.

BIS_EVO_mpoint=objNull; // Player eligible for a medic reward.

BIS_EVO_epoint=objNull; // Player eligible for a repair reward.

BIS_EVO_dunit="none"; // Name of disconnection player.

BIS_EVO_runit=objNull; // Player who requires an AI recruit

BIS_EVO_rtype="none"; // Type of AI to be delivered

BIS_EVO_tunit=objNull; // Target player for a join group request

BIS_EVO_junit = objNull; // Player who wishes to join the group

BIS_EVO_jgroup=grpNull; // group junit wants to join

BIS_EVO_lunit = objNull; // Laser target near the bomb site for shared point laser designation

BIS_EVO_lpoint = 2; // Points the designator will receive.

BIS_EVO_punit=objNull; // Player requesting submission.

BIS_EVO_prew=0; // reward score for mission.

BIS_EVO_aunit=objNull; // Player who will be promoted

BIS_EVO_arank="NULL"; // New rank the player will get

BIS_EVO_EngZone = objNull; //Engineer zone

BIS_EVO_elock = 0; // Remembers if the engineer has his truck locked

BIS_EVO_ltrk = objNull; // The truck that is locked

BIS_EVO_mtar=objNull; // the target that the missile is attacking in AA warning

BIS_EVO_fmission=false; // Limits support to one request at a time.

BIS_EVO_latk=objNull; // Person attacking a radio tower

10 setRadioMsg "NULL";

BIS_EVO_Objective0 = taskNull; // Idle objective

BIS_EVO_Objective1 = taskNull; //City 1 to

BIS_EVO_Objective2 = taskNull;

BIS_EVO_Objective3 = taskNull;

BIS_EVO_Objective4 = taskNull;

BIS_EVO_Objective5 = taskNull;

BIS_EVO_Objective6 = taskNull;

BIS_EVO_Objective7 = taskNull;

BIS_EVO_Objective8 = taskNull;

BIS_EVO_Objective9 = taskNull;

BIS_EVO_Objective10 = taskNull; // City10

BIS_EVO_Objective11 = taskNull;

// Common function to lock vehicles.

//BIS_EVO_Lock =

//{

// _vec = _this select 0;

// if(Param1 == 7) then {_vec lock true} else {_vec lock false};

//};

// Detects empty enemy vehicles and deletes them.

BIS_EVO_IdelSVEC =

{

_svec = _this select 0;

for [{_loop=0}, {_loop<1}, {_loop=_loop}] do

{

if(not alive _svec or count units _svec == 0) then {_loop=1};

Sleep 4.0;

};

sleep 2.0;

if(not alive _svec) exitWith {};

sleep 300;

if(count units _svec == 0) then

{

{_x setpos position _svec} forEach crew _svec;

sleep 1.0;

deletevehicle _svec

};

};

BIS_EVO_aaweapons = ["M_Sidewinder_AA","M_R73_AA","M_Strela_AA","M_Stinger_AA"]; // All ammo that will set off a missile warning

BIS_EVO_pallammo = ["30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Laserbatteries","MAAWS_HEAT","MAAWS_HEAT","MAAWS_HEAT","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];// The players default load out

BIS_EVO_pweapons = ["SCAR_L_STD_HOLO","MAAWS","glock17_EP1","Binocular_Vector","Laserdesignator"]; // The players default load out

BIS_EVO_PlayerModel = "US_Soldier_EP1"; // The players default Model

"0" objstatus "Active";

"1" objstatus "Active";

"2" objstatus "Active";

"3" objstatus "Active";

"4" objstatus "Active";

"5" objstatus "Active";

"6" objstatus "Active";

"7" objstatus "Active";

"8" objstatus "Active";

"9" objstatus "Active";

"10" objstatus "Active";

"11" objstatus "Active";

setDate BIS_EVO_gdate;

_base = [] execVM "data\scripts\BIS_EVO_GetRelDir.sqf";

_spawnv = [] execVM "data\scripts\BIS_EVO_CreateVehicle.sqf";

if (isServer) then

{

{_x addEventHandler ["hit", {if((_this select 1) != BIS_EVO_latk) then {(_this select 0) setdamage 0}}]} forEach BIS_EVO_radios;

onplayerconnected "[server] exec ""data\scripts\update.sqf"";if(BIS_EVO_dunit == _name) then {BIS_EVO_dunit = ""none""}";

onPlayerDisconnected "

BIS_EVO_dunit = _name;

_mark = format[""%1mash"",BIS_EVO_dunit];

deleteMarker _mark;

_mark = format[""%1farp"",BIS_EVO_dunit];

deleteMarker _mark;

[] execVM ""data\scripts\noplayermove.sqf"";

";

};

XGreyText = {"<t color='#f0bfbfbf'>" + _this + "</t>"};

XRedText = {"<t color='#f0ff0000'>" + _this + "</t>"};

XYellowText = {"<t color='#fcf304'>" + _this + "</t"}; //added Razor

if (isServer and not (local player)) exitWith {};

// Large marker seen over occupied cites

BIS_EVO_MainObjective = createMarkerLocal ["MainObj", getMarkerPos "mobj1"];

BIS_EVO_MainObjective setMarkerColorLocal "ColorBlack";

BIS_EVO_MainObjective setMarkerShapeLocal "ELLIPSE";

BIS_EVO_MainObjective setMarkerSizeLocal [500, 500];

// For jip, client waits for server to run update.sqf

waitUntil {BIS_EVO_allvar_packed != ""};

_temp = compile BIS_EVO_allvar_packed;

_vars = call _temp;

BIS_EVO_end = _vars select 0;

BIS_EVO_MissionProgress = _vars select 1;

BIS_EVO_lives = _vars select 2;

// ----------below this line edit by psycho----------

setfire = true;

//CB_uav_ready = true;

conter_hint = false;

publicVariable "conter_hint";

titleCut ["","black faded", 0];

//code original from doolitle - matched by psycho

if (local player) then

{

_myIn =

{

private ["_return"];

_return = false;

{

if (_x == _this select 0) exitWith {_return = true};

}

forEach (_this select 1);

_return;

};

_cfg = configFile/"CfgPatches";

for [{_i = 0}, {_i < count _cfg}, {_i = _i + 1}] do

{

if (isClass (_cfg select _i) and [configName (_cfg select _i), ["ACE_Main"]] call _myIn) then

{

diag_log format ["Initialisation for %1 stoped! ---- Reason: ACE-Mod is not allowed in this Mission. Please disable this Mod for playing %1. --------------------------", missionName];

_trg = createTrigger ["EmptyDetector", [0,0]];

_trg setTriggerStatements ["true", "", ""];

_trg setTriggerType "END6";

};

};

Mod_Check_done = true;

};

waitUntil {not isNil "Mod_check_done"};

if (local player) then {[] spawn {sleep 10; hintSilent "Modcheck Succeeded --- all your Mods are allowed...";}};

---------- Post added at 11:24 PM ---------- Previous post was at 11:22 PM ----------

Now I did rem out the code, but that was after I tried it. I couldn't get evo the throw up it's first task with the AI Skill in the init.sqf so I remed out everything to fix it.

Edited by strike0277

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
Sign in to follow this  

×