Forum Jump :

Author Message


Posts: 48
Rank:


Level: Member

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

 
#1 Posted at 2012-10-05 23:12        
     
I am trying to set the Stryker MEV [US] to where only a units name can enter it. For example: ["Soldier_1","Soldier_2"] and so on. I tried using 3 different scripts and I think this one is easiest to use.

http://forums.bistudio.com/showthread.php?116872-Only-quot-name-quot-can-enter-this-vehicle&p=1887896&viewfull=1#post1887896

I don't want it to where clan mates or a persons name can use it.
Can anyone figure this out for me I think its this line that needs to be changed but idk to what.
if !(name _unit in _namesArray) then
{


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

 
#2 Posted at 2012-10-05 23:20        
     
So instead of limited by name you want it limited by unit?

_namesArray = [unit1, uni3];

if !(_unit in _namesArray) then


Advertisement


Author Message


Posts: 48
Rank:


Level: Member

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

 
#3 Posted at 2012-10-05 23:57        
     
Awesome man thanks that worked.

Added 32 minutes later:

Also is there a way to set it if you get in the driver seat you get ejected. But when you ride in back you don't get ejected?

This post was edited by Diesol (2012-10-06 00:43, ago)


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 46
In-game name: kylania

 
#4 Posted at 2012-10-06 01:19        
     
Actually, just before the unit in namesarray thing put this:

if !(driver _veh == _unit) exitWith {};

That way if you're not the driver it'll just exit. Otherwise it'll check against the names and eject if not.


Author Message


Posts: 48
Rank:


Level: Member

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

 
#5 Posted at 2012-10-06 01:45        
     
Thanks for the help really appreciate it.