Jump to content
Sign in to follow this  
Norbak

Problem with IF

Recommended Posts

Condition under a trigger:

Condition:

local player && alive player && vehicle player == Sub1 OR vehicle player == Sub2

On AcT:

nul = [] execVM "scriptSub.sqf";

Note:

ScriptSub has an addaction for the units but it's not shown for Sub1 or Sub2, or any soldier else...

Something is wrong.

Share this post


Link to post
Share on other sites

Try this code:

(local player) && {alive player} && {((vehicle player) == Sub1) OR {(vehicle player) == Sub2}}

or

(local player) && {alive player} && {(vehicle player) in [sub1, Sub2]}

Share this post


Link to post
Share on other sites

and...

if (typeof player != "FR_Commander" OR typeof player != "FR_Assault_GL") then {....

it's not working neither. I don't understand very well...

Share this post


Link to post
Share on other sites

if (((typeOf player) != "FR_Commander") [color="#FF0000"]AND[/color] {(typeOf player) != "FR_Assault_GL"}) then {...};

or

if (!((typeOf player) in ["FR_Commander", "FR_Assault_GL"])) then {...};

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  

×