IPB


Welcome Guest ( Log In | Register )

 Forum Rules ArmedAssault.info Forum Rules
 
Reply to this topicStart new topic
> Script for allowing only a pilot to unlock a plane/chopper
Daz_kiwi
post Aug 7 2009, 10:37
Post #1


New Member
*

Group: Members
Posts: 5
Joined: 18-May 09
From: NZ
Member No.: 5,757



I have a plane called Herc1 in its init i have;

herc1 setVariable ["_Unlock",(player) addaction ["Unlock","hercUnlock.sqf"] ];


My script;

Hint "Script is running" // Testing if its running
if ("usmc_soldier_pilot" == typeOf player) then {
Herc1 setvehiclelock "unlocked";
hint "Plane Unlocked"
herc1 removeAction _unlock;
};

} else {
hint "You aren't a pilot";
};


This doesnt work, Unlock keeps showing and plane doesnt unlock...any ideas what is wrong?

Thanks

Daz


 
Quote Post
roguetrooper
post Aug 7 2009, 14:38
Post #2


Junior Member
**

Group: Members
Posts: 22
Joined: 15-July 09
Member No.: 6,191



Try this script we use it on our maps:


n i_client.sqf search for

d_only_pilots_can_fly = [];

and add the classnames of who you wish to be able to fly. example

d_only_pilots_can_fly = ["RU_Commander"];

This will only allow that unit to fly.
 
Quote Post
Daz_kiwi
post Aug 7 2009, 22:02
Post #3


New Member
*

Group: Members
Posts: 5
Joined: 18-May 09
From: NZ
Member No.: 5,757



QUOTE(roguetrooper @ Aug 8 2009, 01:38) *
Try this script we use it on our maps:
n i_client.sqf search for

d_only_pilots_can_fly = [];

and add the classnames of who you wish to be able to fly. example

d_only_pilots_can_fly = ["RU_Commander"];

This will only allow that unit to fly.


Thanks for your reply Roguetrooper.

n i_client.sqf search for...? am i suppose to search for this script?

Im still a learner on trainer wheels lol.

Are you able to post more of your script you use?

Thanks
 
Quote Post

Reply to this topicStart new topic
6 User(s) are reading this topic (6 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 16th April 2024 - 12:41