Forum Jump :

Author Message


Posts: 48
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2013-01-03 20:27        
     
Hey guys so having a little tough time with this script I am using for are members. I cant seem to find a way to shut the engine off after the player has been kicked out. It just sits there running and I have to run over and shut it off.
Anyway someone might be able to write the parts that I need in?

lock.sqf
_vehicle = _this select 0;  // i added this line.

_vehicle addEventHandler ["GetIn", 
{
private ["_veh", "_pos", "_unit", "_namesArray"];
_veh = _this select 0;
_pos = _this select 1;
_unit = _this select 2;
_namesArray = ["Diesel"];

if !(name _unit in _namesArray) then
{
_unit action ["Eject", vehicle _unit];
waituntil {vehicle player == player};
         hint "This A10 is for ExecuteGaming Members only.";
};
}];


Author Message


Posts: 1473
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2013-01-04 00:06        
     
You can't use waituntil {vehicle player == player}; it needs to be spawned along with the script your trying to delay.



_vehicle = _this select 0;  // i added this line.
_vehicle addEventHandler ["GetIn", 
{
private ["_veh", "_pos", "_unit", "_namesArray"];
_veh = _this select 0;
_pos = _this select 1;
_unit = _this select 2;
_namesArray = ["Diesel"];

if !(name _unit in _namesArray) then
{
_unit action ["Eject", vehicle _unit];
//waituntil {vehicle player == player};
       
       [_veh] spawn {waituntil {vehicle player == player};
         hint "This A10 is for ExecuteGaming Members only.";
      (_this select 0) engineon false};
 
};
}];


Advertisement


Author Message


Posts: 48
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2013-01-04 05:41        
     
Thank you so much.