Jump to content
  • 0

Cannot pack bike


deltagi

Question

Hello, so I recently installed and got to successfully deploy 

 

However, whenever I scroll on my mouse I cannot pack the bike back up.

//--------------------------------------Deploy Bike----------------------------------
//-----------------------------------------Start--------------------------------------
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["MMT_Civ"];

//BIKE DEPLOY
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=""#4eff00"">" + ("Deploy Bike") +"</t>"),"deployables\mtbike\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike;
s_player_deploybike = -1;
};

//PACK BIKE
if((typeOf cursorTarget == "MMT_Civ" && (player distance cursorTarget < 10)) and _canDo) then {
if (s_player_deploybike2 < 0) then {
s_player_deploybike2 = player addaction[("<t color=""#4eff00"">" + ("Re-Pack Bike") +"</t>"),"deployables\mtbike\pack.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike2;
s_player_deploybike2 = -1;
};
//--------------------------------------Deploy Bike----------------------------------
//------------------------------------------End--------------------------------------

That is the code and it should be under pack bike and I switch it to say 

if((typeOf cursorTarget == "MMT_Civ" && (player distance cursorTarget < 10)) and _canDo) then {
typeof cursorTarget == "MMT_Civ'...

That is my attempt to fix it

Original Line looked like this

if((_isBike && "ItemToolbox" in _weapons && (player distance cursorTarget < 10)) and _canDo) then {

I honestly don't know what I did wrong but I double checked everything and its still not working :(

-Aurora

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
//PACK BIKE
if((_isBike) and _canDo) then {
if (s_player_deploybike2 < 0) then {
        s_player_deploybike2 = player addaction[("<t color=""#007ab7"">" + ("Re-Pack Bike") +"</t>"),"deployables\mtbike\pack.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_deploybike2;
    s_player_deploybike2 = -1;
};
Link to comment
Share on other sites

  • 0

I actually managed to fix it,after i decided to give up, I came back and started to redo some of my coding that I had done, and mods somewhat relating, IE. Right click mod, was holding up and wouldn't allow scrolling on bike to happen because of the mod was in a loop forever. Fix this by correctly redoing my compiles.sqf and correcting my init.sqf (ui_selfActions was the command I accidentally through into my init.sqf)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...