Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // add to init.sqf
- // keep player gear on respawn
- [] spawn {
- waitUntil {
- !isNil{player} &&
- {player == player}
- };
- lastPlayerLoadout = [];
- player addEventHandler ["respawn", {
- private _loadout = lastPlayerLoadout;
- if(count _loadout > 0) then {
- _loadout spawn {
- waitUntil {
- !isNull findDisplay 46 &&
- !isNull player &&
- player == player &&
- alive player
- };
- sleep 1;
- player setUnitLoadout[_this, true];
- };
- };
- }];
- while{true} do {
- sleep 10;
- if(!isNil{player} && {player == player} && {alive player}) then {
- lastPlayerLoadout = getUnitLoadout player;
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment