Stephen Tewell
Member
I am trying to set a variable as true when a player gets close to a vehicle
I can't use wait till because I am checking 2
what do i change the "if" statements to?
I can't use wait till because I am checking 2
what do i change the "if" statements to?
Code:
if ((isPlayer _x) && ((_x distance _jet1) < 30)) then {
_heroCleared = true;
diag_log format["MISSION SYSTEM: Hero jet taken."];
Ccoords = _heroCoords;
publicVariable "Ccoords";
[] execVM "debug\remmarkersHero.sqf";
if (!_banditCleared) then {
[nil,nil,rTitleText,"Hero jet secured, hope that runway is cleared!", "PLAIN",6] call RE;
[nil,nil,rGlobalRadio,"Hero jet secured, hope that runway is cleared!"] call RE;
[nil,nil,rHINT,"Hero jet secured, hope that runway is cleared!"] call RE;
};
};
if ((isPlayer _x) && (_x distance _jet2) < 30) then {
_banditCleared = true;
diag_log format["MISSION SYSTEM: Bandit jet taken."];
Ccoords = _banditCoords;
publicVariable "Ccoords";
[] execVM "debug\remmarkersBandit.sqf";
if (!_heroCleared) then {
[nil,nil,rTitleText,"Bandit jet secured, hope that runway is cleared!", "PLAIN",6] call RE;
[nil,nil,rGlobalRadio,"Bandit jet secured, hope that runway is cleared!"] call RE;
[nil,nil,rHINT,"Bandit jet secured, hope that runway is cleared!"] call RE;
};
};