Jump to content
Sign in to follow this  

Recommended Posts

Hey guys so i made this addon but it got deleted now im trying to remake it i pack everything in the PBO but when i try to use action it says "To_Gunner.sqf Not Found" heres what the files look like.

Swap_Actions.sqf:

_veh = _this select 0;

//Swap Actions
//------------

_veh addAction ["Move To Gunner" , "To_Gunner.sqf",[],0,false,false,"","(isplayer (driver _target)) and !(isplayer (gunner _target))"];
_veh addAction ["Move To Driver" , "To_Driver.sqf",[],0,false,false,"","!(isplayer (driver _target)) and (isplayer (gunner _target))"];

To_Gunner.sqf:

private ["_veh","_driver","_gunner"];

_veh = _this select 0;
_driver = driver _veh;
_gunner = gunner _veh;

_gunner setpos [0,0,1];
_gunner setVelocity [0, 0, 0];
waituntil {((_veh emptypositions "Gunner") == 1)};
_driver action ["moveTogunner", _veh];
_gunner moveindriver _veh;
_gunner assignasdriver _veh;

To_Driver.sqf:

private ["_veh","_driver","_gunner"];

_veh = _this select 0;
_driver = driver _veh;
_gunner = gunner _veh;

_driver setpos [0,0,1];
_driver setVelocity [0, 0, 0];
waituntil {((_veh emptypositions "Driver") == 1)};
_gunner action ["moveToDriver", _veh];
_driver moveinGunner _veh;
_driver assignasGunner _veh;

config.cpp:

class CfgPatches
{
   class gunner_switch
   {
       units[] = {};
       weapons[] = {};
       requiredVersion = 1.0;
       requiredAddons[] = {"Extended_EventHandlers"};

   };
};

class Extended_Init_EventHandlers
{
// Define the classes to add inits to.
   class Air
   {
       // Add init lines to be run on all units that inherit from this class.
       gunner_switch_Init_Air="_this execVM ""\gunner_switch\Swap_Actions.sqf"";";
   };
};

$PBOPREFIX$: gunner_switch

Now when i pack all of those into a PBO then try to use it in game i scroll to action switch to gunner and it gives me this error: "To_Gunner.sqf Not Found" Any ideas? Thanks

---------- Post added at 23:09 ---------- Previous post was at 22:55 ----------

Oh yeah used BINPBO to pack

Edited by [FRL]Myke

Share this post


Link to post
Share on other sites

First, please use code tags for scripts and configs, it makes it way easier to read.

Second, if you find the difference between this:


\gunner_switch\Swap_Actions.sqf

and this:


To_Gunner.sqf

then you will probably have the solution.

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  

×