EchoTwoZero 2 Posted February 28, 2018 Hopefully someone can help me, and I think this is probably quite simple, I just can't seem to figure it out tonight! I was hoping that there was a way to tie the number of a team's respawn tickets to the number of items in a crate. e.g. there are 4 medkits in a crate so they have 4 respawn tickets. If they add 2, they have 6 respawn tickets and if they remove 3 they only have 3 respawn tickets remaining. Any help with this would be much appreciated! Cheers! Share this post Link to post Share on other sites
Larrow 2822 Posted March 1, 2018 In crates init field... //On sever if ( isServer ) then { //Add respawn tickets at mission start of how many FAKs in the crate [ west, count ( itemCargo this select { _x == "FirstAidKit" } ) ] call BIS_fnc_respawnTickets; }; //On client if ( hasInterface ) then { //Add event for when the client closes this crate this addEventHandler [ "containerClosed" , { //Get current ticket count _tickets = [ west ] call BIS_fnc_respawnTickets; //Update respawn tickets based on number of FAKs in the crate [ west, count ( itemCargo this select { _x == "FirstAidKit" } ) - _tickets ] call BIS_fnc_respawnTickets; }]; }; Just need to change the side that this particular crate will effect(west) OR use missionNamespace if it effects everyone. Untested, not on my main PC atm. 3 Share this post Link to post Share on other sites
EchoTwoZero 2 Posted March 1, 2018 Thank you so much! That works perfectly! Amazing! Share this post Link to post Share on other sites