Jump to content
  • 0

Why doesn't deploy bike action show?


kylemcqueen75

Question

Hey guys, I found this script for a deploy bike randomly on pastebin. I want to use it but the only thing that works for some reason is packing. A player with a toolbox should be able to spawn a bike with it....but it doesn't show on the action wheel. Although, if I spawn in a bike and look at it the action shows to pack it...(and works.) I am really confused on what is wrong here....

The Script:
http://pastebin.com/GbyRNwS4

My Custom Self Actions: (Starts at line 25 on PB)
http://pastebin.com/uAWgnwqk

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

looks like your not defining _hastoolbox

 

add 

_hasToolbox =   "ItemToolbox" in _itemsPlayer;

 

like this

_hasToolbox =   "ItemToolbox" in _itemsPlayer;

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

or like this....

 

// -------------------------------------- BIKE DEPLOY -------------------------------------- 
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1"];




if ("ItemToolbox" in _weapons) then {
        hasBikeItem = true;
    } else { hasBikeItem = false;};
    if((speed player <= 1) && hasBikeItem && _canDo) then {
        if (s_player_deploybike < 0) then {
            s_player_deploybike = player addaction[("<t color=""#FFFF00"">" + ("Deploy Bike") +"</t>"),"spawnbike\bike.sqf","",5,false,true,"", ""];
        };
      } else {            player removeAction s_player_deploybike;
            s_player_deploybike = -1;
    };
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...