Ok you're going to want to first create a Game Logic inside the editor which reads:
Code:
man1life = 3;
man2life = 3;
man3life = 3;
man4life = 3;
man5life = 3;
Next, you'll want to put this into your init.sqf:
Code:
if (!alive man2) AND (!alive man3) AND (!alive man4) AND (!alive man5) then {
if (man1 getDammage > 0.99) then {
endMission "END1";
} else {
null = execVM [] "getlife.sqf"};
Finally, create an sqf called getlife.sqf with the following in:
Code:
//Understanding if 'man1' has been killed, and takes away a life if he has
if (man1 getDammage > 0.99) then {
man1life = man1life - 1};
hideBody man1;
//Doing the same for 'man2' and so on
if (man2 getDammage > 0.99) then {
man2life = man2life - 1};
hideBody man1;
if (man3 getDammage > 0.99) then {
man3life = man3life - 1};
hideBody man1;
if (man4 getDammage > 0.99) then {
man4life = man4life - 1};
hideBody man1;
if (man5 getDammage > 0.99) then {
man5life = man5life - 1};
hideBody man1;
//If anybody's life count reaches 0, end the mission and go to "END1" (like in a trigger)
if (man1life == 0) then {
endMission "END1"};
if (man2life == 0) then {
endMission "END1"};
if (man3life == 0) then {
endMission "END1"};
if (man4life == 0) then {
endMission "END1"};
if (man5life == 0) then {
endMission "END1"};
Run it all and that should all work, assuming that if you're playing singleplayer you'll be playing using 'man1'.
The stuff in init.sqf asks whether there's more than one player and, if there are, activates the respawn script. If there's only one player, it gives him one life before the mission ends.
To be perfectly honest, the whole system is pretty ham-handed and clunky, and I'm not even sure in the slightest that it will work, as I can't test anything at the moment.
Regardless, give it a whirl and tell me what happens! xD
Hope I helped a bit at least! I'm still learning as well!