Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: de
Location:
Occupation:
Age: 22
In-game name:

 
#1 Posted at 2014-07-27 15:18        
     
I used the "pilot_restrict_blufor.sqf" from http://www.armaholic.com/forums.php?m=posts&q=20893
And edited so that the copilot and gunners must be pilot, too
and that the TFAR plugin in Teamspeak must be enabled. My problem is now I don´t find the command to check
if the player have TFAR enabled or not and now you can fly if TFAR is not installed or disabled.

_veh = _this select 0;
_pos = _this select 1;
_obj = _this select 2;

if (_pos == "driver" AND _obj == player) then {
if ((typeOf _obj) != "B_Helipilot_F") then {
_fuel = fuel _veh;
_veh setFuel 0;
unAssignVehicle _obj;
_obj action ["getOut", _veh];
waitUntil {sleep 1; (fuel _veh) == 0};
_veh setFuel _fuel;
hint "Only for Pilots with TS(TFAR)";
};
};



if (_pos == "gunner" AND _obj == player) then {
if ((typeOf _obj) != "B_Helipilot_F") then {
_fuel = fuel _veh;
_veh setFuel 0;
unAssignVehicle _obj;
_obj action ["getOut", _veh];
waitUntil {sleep 1; (fuel _veh) == 0};
_veh setFuel _fuel;
hint "Only for Pilots with TS";
};
};




if (_pos == "driver" AND _obj == player) then {
if !(call TFAR_fnc_isTeamSpeakPluginEnabled) then {
_fuel = fuel _veh;
_veh setFuel 0;
unAssignVehicle _obj;
_obj action ["getOut", _veh];
waitUntil {sleep 1; (fuel _veh) == 0};
_veh setFuel _fuel;
hint "Only for Pilots with TFAR";
};
};

Play for Fun

Author Message


Posts: 250
Rank:


Level: Member

Country: ca
Location:
Occupation:
Age:
In-game name: austinXmedic

 
#2 Posted at 2014-07-27 18:21        
     
each addon makes an entry for itself inside cfgPatches in the config file, you can check if it exists  by using commands like [code]getText(configfile >> "cfgPatches" >> "addon name" >> "task_force_radio" >> "a string that is inside it");
then check if its exists, if it doesn't then kick them out of the heli.

Some of my work:
http://steamcommunity.com/sharedfiles/filedetails/?id=287343671 -- Unit Play/ Unit Capture Functions Guide
http://steamcommunity.com/sharedfiles/filedetails/?id=265454265 -- Zeus Guide
add me on steam: austin_medic

Advertisement


Author Message


Posts: 2
Rank:


Level: Member

Country: de
Location:
Occupation:
Age: 22
In-game name:

 
#3 Posted at 2014-07-27 21:52        
     
Where can I find the config file?



Found it in the task_force_radio.pbo, right?

No, I can´t get it work

This post was edited by Christian1412 (2014-07-27 22:15, ago)

Play for Fun





Tags: Can, Fly, Only, Pilots, Tfar