Jump to content
Sign in to follow this  
Norbak

Typeof player OR getplayerUId player... then...

Recommended Posts

members = ["00000", "0000001"];

if (!((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"])) OR ((getPlayerUID player) in members) then {

hint "Welcome aboard, Member or Authorized Pilot."};

Toons "Pierce" and "CZ_Special_Forces_TL_DES_EP1" OR UID players inside MEMBERS array will can pilot the jet.

Is this correct?. I think i'm missing something.

Edited by kyopower

Share this post


Link to post
Share on other sites

You are missing a ( at the begining of the if and another at the end. Also if you really want that those classnames can enter you should remove the !, if not you are allowing all but those.

Something like this it's what you want i suppose

if (((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) OR ((getPlayerUID player) in members)) then {
hint "Welcome aboard, Member or Authorized Pilot."};

Share this post


Link to post
Share on other sites

I don't know but i think i tried before:

if (((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) OR ((getPlayerUID player) in members)) then {

and didn't work.

Ok i'll test again. Maybe it was my clumsiness.

So the contrast would be:

if ((!(typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) OR (!(getPlayerUID player) in members)) then {

hint "You're not authorized."};

Am i right?

Still not working.

Edited by kyopower

Share this post


Link to post
Share on other sites

if (((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) OR ((getPlayerUID player) in members)) then {hint "You're authorized."};

should work.

Also should work

if (!((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) or {!((getPlayerUID player) in members)}) then {hint "You're not authorized."};

If doesn't, are any errors in RPT-files?

Share this post


Link to post
Share on other sites

Good, good Schatten. Nice master in IF conditions!.

I'll test. Thank you guys.

Share this post


Link to post
Share on other sites

Well i found another path to success.

_members = ["0000","0001"];

if ((getPlayerUID player) in _members) exitWith {};

if !((typeOf player) in ["Pierce", "CZ_Special_Forces_TL_DES_EP1"]) then { ....EJECT! };

Then, (only players inside _MEMBERS array) OR (players in toons "Pierce" and "CZ_Special....") won't get EJECT. I think it can work well.

Edited by kyopower

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  

×