Jump to content
Sign in to follow this  
MattUK

clan/pilot only to fly script

Recommended Posts

hi guys, having problems getting a script to work - would appreciate it if somebody a little more capable than myself could look over it for me.

what i'm trying to accomplish is for only pilots AND clan members (that correspond to UID list) to be able to fly the aircraft.

this is the script i'm currently working on:-

while {true} do

{

waitUntil {sleep 0.5; alive player};

if ((getPlayerUID player) in _UIDArray) then

{

_UIDArray = [uIDS IN HERE];

if (typeOf player != "B_Helipilot_F") then

{

private "_v";

while {alive player} do

{

waitUntil {sleep 0.5; vehicle player != player};

_v = vehicle player;

if (_v isKindOf "Helicopter" && !(_v isKindOf "ParachuteBase")) then

{

if (driver _v == player) then

{

player action ["eject", _v];

waitUntil {sleep 0.5; vehicle player == player};

player action ["engineOff", _v];

hint "Pilots/Clan members only";

};

};

};

} else {

waitUntil {sleep 0.5; !alive player};

};

};

thanks in advance for any help

---------- Post added at 02:09 ---------- Previous post was at 00:56 ----------

hi guys, having problems getting a script to work - would appreciate it if somebody a little more capable than myself could look over it for me.

what i'm trying to accomplish is for only pilots AND clan members (that correspond to UID list) to be able to fly the aircraft.

this is the script i'm currently working on:-

while {true} do

{

waitUntil {sleep 0.5; alive player};

if ((getPlayerUID player) in _UIDArray) then

{

_UIDArray = [uIDS IN HERE];

if (typeOf player != "B_Helipilot_F") then

{

i changed the first part to this:

while {true} do

{

waitUntil {sleep 0.5; alive player};

if ((getPlayerUID player) in _UIDArray)) then

hint ''Welcome!'';

_UIDArray = [''23456543''];

};

};

};

} else {

if (typeOf player != "B_Helipilot_F") then

{

but now there is apparently a ';' missing on line 23?

Share this post


Link to post
Share on other sites
  1. Welcome to the forums!
  2. Search before posting!
  3. Use php or code tags!
  4. Just use this!

thanks :)

but i want to learn what's wrong with the code i've added? can you see any massive errors?

Share this post


Link to post
Share on other sites

See bullet point 3. :) Having just woke up I can't even begin to try to read that code without proper indentation and code tags.

Share this post


Link to post
Share on other sites

while {true} do
{
waitUntil {sleep 0.5; alive player};
if ((getPlayerUID player) in _UIDArray) then
{

_UIDArray = [uIDS IN HERE];


if (typeOf player != "B_Helipilot_F") then
{
private "_v";

while {alive player} do
{
waitUntil {sleep 0.5; vehicle player != player};

_v = vehicle player;
if (_v isKindOf "Helicopter" && !(_v isKindOf "ParachuteBase")) then
{
if (driver _v == player) then
{
player action ["eject", _v];
waitUntil {sleep 0.5; vehicle player == player};
player action ["engineOff", _v];
hint "Pilots/Clan members only";
};
};
};
} else {
waitUntil {sleep 0.5; !alive player};
};
};

there you go, wrapped in code tags

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×