OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Luke on 19 Aug 2008, 18:14:41

Title: Addon check
Post by: Luke on 19 Aug 2008, 18:14:41
Is there any way in a script to have like

Code: [Select]
if (HasAddon _X) do {stuff}
to see so whether or not to spawn a required addon vehicle or not?

Luke
Title: Re: Addon check
Post by: Wolfrug on 19 Aug 2008, 18:38:33
Code: [Select]
if (isClass (configFile >> "YourCfg" >> "YOUR_addon")) then {do stuff};
"YourCfg" = the config you're checking in. In your case, it'd be "CfgVehicles".

"YOUR_addon" = the class name of the vehicle (same you'd use in createVehicle).

Good luck.  :)

Wolfrug out.