{"name":"getObjectDLC","title":"getObjectDLC","type":"command","url":"https://community.bistudio.com/wiki/getObjectDLC","revid":369364,"updated":"2024-09-03T18:43:08Z","groups":["DLC"],"status":"ok","games":{"arma3":"1.36"},"since":"arma3 1.36","arma3_since":"1.36","locality":{"argument":"global"},"description":"Returns appID of the DLC the object belongs to or nil if object is vanilla.","syntaxes":[{"syntax":"getObjectDLC obj","params":[{"name":"obj","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number | Nothing","description":"(or Nothing if vanilla item)","text":"Number (or Nothing if vanilla item)"},"form":"unary","right":{"text":"obj"}}],"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"]}],"see_also":["getDLCs","getPersonUsedDLCs","getMissionDLCs","getDLCAssetsUsageByName","getDLCAssetsUsage","getAssetDLCInfo"]}