Jump to content
Sign in to follow this  
rbnpts_de

Disable UserAction outside my Mod

Recommended Posts

Hello you all!

I just started modding and i have a background in mission making so i'm not really new to this but now i came up on a weird problem.

 

So I added this code to my config.cpp:

class UserActions
		{
			class GetInformation
			{
				displayName = "Get Information";
				displayNameDefault = "<img image='\a3\missions_f_oldman\data\img\holdactions\holdAction_talk_ca.paa'/>";
				priority = 10;
				radius = 10;
				position = "camera";
				showWindow = 0;
				hideOnUse = 1;
				onlyForPlayer = 1;
				shortcut = "";
				condition = "(driver (vehicle player)) isEqualTo player"; // Check if player is Driver
				statement = "if (selectRandom [true, false]) then { hint 'I do not have information for you!' } else { hint 'I tell you everything I know!' };";
			};
		};

So my problem is now that I have the UserAction inside and outside the vehicle 😞

How do i show the UserAction only when the person is driver?

Share this post


Link to post
Share on other sites

Well, I'm no scripting guru but the fact you're getting the action inside AND outside the vehicle means something is messed up with your condition and its always returning "true" or its being ignored altogether.

 

Whilst your syntax is correct per the driver command, I am unsure how script command such as that translate to a config environment - my guess is for a config your syntax is incorrect.

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  

×