From 2daada7110524aa34bf22855b17e3c357ebed45c Mon Sep 17 00:00:00 2001 From: Eero af Heurlin Date: Sun, 24 Jul 2016 14:27:00 +0300 Subject: [PATCH] not helping... --- helotraining.Altis/initPlayer.sqf | 11 +++++++++-- helotraining.Altis/playerspawn.sqf | 4 ---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/helotraining.Altis/initPlayer.sqf b/helotraining.Altis/initPlayer.sqf index f6f8d81..121d980 100644 --- a/helotraining.Altis/initPlayer.sqf +++ b/helotraining.Altis/initPlayer.sqf @@ -4,8 +4,15 @@ diag_log format["initPlayer called, _this: %1", _this]; _target = _this select 0; _playerno = _this select 1; -_target addMPEventHandler ["mpkilled", {Null = _this, _playerno execVM "playerkilled.sqf";}]; -_target addMPEventHandler ["respawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; +player addEventHandler ["Killed", {Null = _this, _playerno execVM "playerkilled.sqf";}]; +player addMPEventHandler ["MPKilled", {Null = _this, _playerno execVM "playerkilled.sqf";}]; +player addEventHandler ["Respawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; +player addMPEventHandler ["MPRespawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; +_target addEventHandler ["Killed", {Null = _this, _playerno execVM "playerkilled.sqf";}]; +_target addMPEventHandler ["MPKilled", {Null = _this, _playerno execVM "playerkilled.sqf";}]; +_target addEventHandler ["Respawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; +_target addMPEventHandler ["MPRespawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; + [_target, _playerno] execVM "playerspawn.sqf"; diff --git a/helotraining.Altis/playerspawn.sqf b/helotraining.Altis/playerspawn.sqf index 9e179ee..dafab5f 100644 --- a/helotraining.Altis/playerspawn.sqf +++ b/helotraining.Altis/playerspawn.sqf @@ -2,10 +2,6 @@ diag_log format["playerspawn called, _this: %1", _this]; _target = _this select 0; _playerno = _this select 1; playersArray set [_playerno, _target]; -(playersArray select _playerno) addEventHandler ["killed", {Null = _this, _playerno execVM "playerkilled.sqf";}]; -(playersArray select _playerno) addMPEventHandler ["mpkilled", {Null = _this, _playerno execVM "playerkilled.sqf";}]; -(playersArray select _playerno) addEventHandler ["respawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; -(playersArray select _playerno) addMPEventHandler ["mprespawn", {Null = unit, _playerno execVM "playerspawn.sqf";}]; ferryingArray set [_playerno, false]; landingCompleteArray set [_playerno, false];