{"name":"getObjectDLC","operator":null,"title":"getObjectDLC","type":"command","url":"https://community.bistudio.com/wiki/getObjectDLC","revid":369364,"updated":"2024-09-03T18:43:08Z","groups":["DLC"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.36"}],"since":{"game":"arma3","name":"Arma 3","version":"1.36"},"arma3_since":"1.36","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns appID of the DLC the object belongs to or nil if object is vanilla.","syntaxes":[{"syntax":"getObjectDLC obj","since":null,"effect":null,"exec":null,"params":[{"name":"obj","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"obj: Object"}],"returns":{"type":"Number (or Nothing if vanilla item)","types":["Number","Nothing"],"description":null,"text":"Number (or Nothing if vanilla item)"},"form":"unary","operator":null,"left":null,"right":{"text":"obj","types":["Object"]}}],"examples":[{"text":"```sqf\n_appID = getObjectDLC cursorTarget;\nif (!isNil \"_appID\") then {\n    hint format [\"This object belongs to DLC with id: %1\", _appID];\n} else {\n    hint \"This object is vanilla\";\n};\n```","code":["_appID = getObjectDLC cursorTarget;\nif (!isNil \"_appID\") then {\n\thint format [\"This object belongs to DLC with id: %1\", _appID];\n} else {\n\thint \"This object is vanilla\";\n};"]},{"text":"```sqf\n_akm = createSimpleObject [\"A3\\Weapons_F_Exp\\Rifles\\AKM\\AKM_F.p3d\",getPosASL player];\ngetObjectDLC _akm;    // 395180\n```","code":["_akm = createSimpleObject [\"A3\\Weapons_F_Exp\\Rifles\\AKM\\AKM_F.p3d\",getPosASL player];\ngetObjectDLC _akm;\t// 395180"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["getDLCs","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: DLC","Introduced with Arma 3 version 1.36","Scripting Commands"]}