Jump to content
KifKick

Remove from car action Engine On/Engine Off

Recommended Posts

Hi, my question is how to remove user action from car because i want to remove Engine On/Engine Off and add my custom engine on.

Here is screenshot.

pDEAN4S.png

Share this post


Link to post
Share on other sites

I'm not sure that you can remove that user action. It may be hard-coded in the game engine?

 

What you can do however is use an EventHandler to capture the engine-on event, then write code to alter behaviour as you wish.

  • Like 1

Share this post


Link to post
Share on other sites

@UK_Apollo Agreed. You probably can't disable the default actions of the player, except for using findDisplay for that action button, override it with your function that'll probably tell the player that this is action is not allowed or smth (up to your own implementatioin).

Share this post


Link to post
Share on other sites

Thanks guys for reply. For alternative i have used a EventHandler.

[_vehicle, ["engine",{if(isEngineOn (_this select 0) && !((_this select 0) getVariable ["haveKey", false]))then{(_this select 0) engineOn false}}]] remoteExec ["addEventHandler", 0, true];

It works as I wanted.

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

×