Jump to content
  • 0

Scrollwheel options very delayed


lima

Question

Hi

 

I'm currently using a "right click to deploy bike"-script which works just fine - but I want the "deploy bike"-option to be available in the scroll menu as well.

 

For that I use something like this:

if((speed player <= 1) && _hasToolbox && _canDo) then {
    if (s_player_deploybike < 0) then {
        s_player_deploybike = player addaction[("<t color=""#007ab7"">" + ("Deploy Bike") +"</t>"),"custom\bike\deploy.sqf","",0,false,true,"", ""];
    };
} else {
    player removeAction s_player_deploybike;
    s_player_deploybike = -1;
};

...but that doesn't work until scrolling while looking at a car or something else. It's like it have to be "activated" first by something else.

 

How can I add the scrollwheel option so that it shows up instantly?

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Place it somehwere further down in the fn_selfactions.sqf.. maybe at the end of the file ;)

It is at the bottom. But as I understand it, the selfactions file gets compiled into memory on startup? 

 

needs to be placed below where the variable "_hasToolbox =" and "_canDo =" is defined in your fn_selfAction.sqf

It already is, else the script wouldn't work at all as it wouldn't be able to recognize the variables.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...