Search the Community
Showing results for tags 'remvove'.
Found 1 result
-
Respawn on Squad Leader Help Needed !
doomnet posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
HI, I have put together with the help of many here and internet a team leader mobile respawn script. but there is still a problem when team leader is dead and other player of his group also, the player can respawn on his own dead body, also team leader can respawn on his dead body. so what to add in the code below or elsewhere, to prevent players from respawning on their own dead bodies ? respawnOnLeader.sqf if(isDedicated) exitWith {}; _side = side player; waituntil { "respawn_guerrila" setMarkerPosLocal (getPos leader player); "respawn_west" setMarkerPosLocal (getPos leader player); sleep 0.5; 0 > 1 }; initPlayerLocal.sqf player addEventHandler ["Respawn", //I believe this would be a better event handler for this situation { if (leader player != player) && {alive (leader player)}) then //make sure player is not the group leader and that the group leader is alive { _groupLead = leader player; player setPos ([_groupLead, 2, -(direction _groupLead)] call BIS_fnc_relPos); //not sure if this will work as I expect it to, if it doesn't, delete this line and remove the forward-slashes from the line below // player setPos ([_groupLead, 2, (direction _groupLead) * -1] call BIS_fnc_relPos); } else { systemChat "Group leader was not alive, you have respawned at base."; //If either condition is met, respawn the player at base //this will show the same message even if the player is the group leader, it will still work but look a little unrefined. "Of course the group leader was not alive, I WAS the group leader" }; }]; Thanks for helping me out its been 3 days now i'm searching, trying, learning that's not bad but server is down because of this problem.