{"name":"BIS_fnc_addRespawnInventory","operator":null,"title":"BIS fnc addRespawnInventory","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_addRespawnInventory","revid":369448,"updated":"2024-09-06T05:10:03Z","groups":["Respawn"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.60"}],"since":{"game":"arma3","name":"Arma 3","version":"1.60"},"arma3_since":"1.60","branch":null,"locality":{"argument":null,"effect":"global","server_exec":false},"exec":null,"description":"Add a respawn inventory for respawn menu.\n\nAvailable loadouts are defined in CfgRespawnInventory. Or you may use an existing CfgVehicles soldier class as reference.","syntaxes":[{"syntax":"[target, inventoryParams] call BIS_fnc_addRespawnInventory","since":null,"effect":null,"exec":null,"params":[{"name":"target","type":"Receiver of the respawn loadout","optional":false,"default":null,"description":"Receiver of the respawn loadout\n- Namespace - use missionNamespace to add the loadout to everyone\n- Side\n- Group\n- Object","types":[],"since":null,"text":"target: Receiver of the respawn loadout\n- Namespace - use missionNamespace to add the loadout to everyone\n- Side\n- Group\n- Object"},{"name":"inventoryParams","type":"Array or String","optional":false,"default":null,"description":"Array or String\n- String - CfgRespawnInventory class or CfgVehicles soldier class\n- Array - format [class, number, limit]\n  - class: String - CfgRespawnInventory class or CfgVehicles soldier class\n  - number: Number - Number of players who can use this inventory (-1 = no limit, default)\n  - limit: Number - Limit for role assigned to given loadout (-1 = no limit, default)\n    - Only role or only loadout can be limited at one moment, if there is limit for both, then only role uses limit.\n    - If the limit definition for role is called multiple times with different numbers, then the highest number is used.","types":["Array","String"],"since":null,"text":"inventoryParams: Array or String\n- String - CfgRespawnInventory class or CfgVehicles soldier class\n- Array - format [class, number, limit]\n  - class: String - CfgRespawnInventory class or CfgVehicles soldier class\n  - number: Number - Number of players who can use this inventory (-1 = no limit, default)\n  - limit: Number - Limit for role assigned to given loadout (-1 = no limit, default)\n    - Only role or only loadout can be limited at one moment, if there is limit for both, then only role uses limit.\n    - If the limit definition for role is called multiple times with different numbers, then the highest number is used."}],"returns":{"type":"Array","types":["Array"],"description":"format [target, id] used in BIS_fnc_removeRespawnInventory","text":"Array - format [target, id] used in BIS_fnc_removeRespawnInventory"}}],"examples":[{"text":"```sqf\n[west, \"WEST1\"] call BIS_fnc_addRespawnInventory;\n```","code":["[west, \"WEST1\"] call BIS_fnc_addRespawnInventory;"]},{"text":"```sqf\nprivate _myRespawnInventory = [missionNamespace, \"ATSniper\"] call BIS_fnc_addRespawnInventory;\n```","code":["private _myRespawnInventory = [missionNamespace, \"ATSniper\"] call BIS_fnc_addRespawnInventory;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["Arma 3: Respawn","BIS_fnc_removeRespawnInventory","BIS_fnc_getRespawnInventories","BIS_fnc_setRespawnInventory"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Respawn","Functions","Functions: Global Effect","Introduced with Arma 3 version 1.60"],"docblock":null,"filled_from_docblock":[]}