Jump to content
Sign in to follow this  
Guest

Need help with a tiny bit of code.

Recommended Posts

Guest

So I have this:

if(player == [b]p1,p2,p3,p4[/b] then {
   bon_recruit_recruitableunits = [
"US_Soldier_AA_EP1"
   ];
};

if(player == [b]p5,p6,p7,p8[/b] then {
   bon_recruit_recruitableunits = [
       "BAF_Soldier_AA_MTP"
   ];
};

but I keep getting errors stating the syntax is wrong for the bold parts.

I have tried ((p1) OR (p2) OR (p3) OR (p4)) and a few other things but I get errors.

Could someone show me the right syntax? Cheers

Edited by Guest

Share this post


Link to post
Share on other sites

another way can also be like this if you have many names:

if (player in [p1,p2,p3,p4])  then {

Share this post


Link to post
Share on other sites
Guest

Thanks guys:)

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  

×