Jump to content

[Release] Remote vehicle locking/engine/eject [Updated for 1.0.7]


salival

Recommended Posts

Remote Vehicle is part of Epoch 1.0.7.1 now.

 

Hi,

Here's a script I wrote that does the following from right clicking your key in your toolbelt:

  • Unlock/lock vehicle.
  • Turn engine on/off.
  • Eject players not in your group.

Thanks to @Pattohfor the idea for this script.

For downloading and install instructions, see my github: https://github.com/oiad/remoteVehicle

Link to comment
Share on other sites

hey sal, what is that final variable in the config entry?

["ItemKey","Lock vehicle","spawn remoteVehicle;","true",4]
_classname,_text,_execute,_condition,_option

what exactly does _option mean? Like the numerical order it is displayed when right clicked? Thanks for your time mate!

EDIT: I think I understand after reading the remoteVehicle.sqf script. Very elegant!

Link to comment
Share on other sites

  On 6/11/2017 at 8:06 AM, ViktorReznov said:

hey sal, what is that final variable in the config entry?

["ItemKey","Lock vehicle","spawn remoteVehicle;","true",4]
_classname,_text,_execute,_condition,_option

what exactly does _option mean? Like the numerical order it is displayed when right clicked? Thanks for your time mate!

EDIT: I think I understand after reading the remoteVehicle.sqf script. Very elegant!

Expand  

Yeah, it's pretty simple, just _option tells the script what to do for each entry

Link to comment
Share on other sites

So a couple more expanded options to this, I find it to be a pain in the A$$ to find my vehicles at, esp if no nvgs or flashlights. So how nice would it be if you could turn your lights on with your remote! Sweet deal, tested and working!

 

  Reveal hidden contents

I spent WAAAAY to long on this so please, insert a better version of this! (i thought of doing a panic button with the caralarm.ogg and have lights go on and off rapidly, just for fun but..... naaaaaa)

Link to comment
Share on other sites

Very nicely done. Clean as always. I actually wasn't aware that I could just use the base class ItemKey to detect a key in the gear to make it have right click options, this entire time in my ui_selectSlot I have been sorting classes etc.. Much more efficient. Again, well done!

Link to comment
Share on other sites

  On 6/11/2017 at 10:48 PM, BigEgg said:

Very nicely done. Clean as always. I actually wasn't aware that I could just use the base class ItemKey to detect a key in the gear to make it have right click options, this entire time in my ui_selectSlot I have been sorting classes etc.. Much more efficient. Again, well done!

Expand  

You can't use the base class which is why I'm doing this check: https://github.com/oiad/remoteVehicle/blob/master/dayz_code/compile/ui_selectSlot.sqf#L69

That could be broken by other items with "itemkey" in the name but the only one I know of is itemkeykit (but I check this on that same line)

But yeah, I try and focus my work on clean and tidy so that anyone can read it, almost to the point of unreasonable OCD tidy

Link to comment
Share on other sites

  On 6/11/2017 at 11:01 PM, salival said:

You can't use the base class which is why I'm doing this check: https://github.com/oiad/remoteVehicle/blob/master/dayz_code/compile/ui_selectSlot.sqf#L69

That could be broken by other items with "itemkey" in the name but the only one I know of is itemkey (but I check this on that same line)

But yeah, I try and focus my work on clean and tidy so that anyone can read it, almost to the point of unreasonable OCD tidy

Expand  

Ahhhhhh that is still much more efficient than what I am doing now. I like clean though, smaller the file size and the simpler the code the better it runs. Eitherway, nice job :)

Link to comment
Share on other sites

  On 6/11/2017 at 12:32 PM, ViktorReznov said:

So a couple more expanded options to this, I find it to be a pain in the A$$ to find my vehicles at, esp if no nvgs or flashlights. So how nice would it be if you could turn your lights on with your remote! Sweet deal, tested and working!

 

  Reveal hidden contents

I spent WAAAAY to long on this so please, insert a better version of this! (i thought of doing a panic button with the caralarm.ogg and have lights go on and off rapidly, just for fun but..... naaaaaa)

Expand  

I like your idea, I had completely forgotten about lights (I play on 24/7 day servers)

I'll add that in the next few days but i'll make it a toggle instead of 2 seperate ones.

Cheers for the input

Link to comment
Share on other sites

  On 6/12/2017 at 12:04 PM, salival said:

I like your idea, I had completely forgotten about lights (I play on 24/7 day servers)

I'll add that in the next few days but i'll make it a toggle instead of 2 seperate ones.

Cheers for the input

Expand  

I am seriously just beginning to learn the logic to coding and really did butcher getting that script to even work! but im learning a lot and I thank you for all the help and support you have already been m8! looking forward to seeing how you do it!

Alright! Got it finally, a simple toggle for lights, makes it a hell of a lot easier to find at night!

add this to the bottom of remoteVehicle.sqf

if (_option == 5) then {
	if (_vehicle getVariable["lightOff",true]) then {
		player action ["lightOn", _vehicle];
		systemChat format ["Lights on %1", _vehicleType];
		_vehicle setVariable ["lightOn",true];
		_vehicle setVariable ["lightOff",false];
	} else {
		player action ["lightOff", _vehicle];
		systemChat format ["Lights off %1", _vehicleType];
		_vehicle setVariable ["lightOn",false];
		_vehicle setVariable ["lightOff",true];
	};
};

and add this to the bottom of your click_actions\config.sqf

DZE_CLICK_ACTIONS = DZE_CLICK_ACTIONS + [["ItemKey","Toggle Lights","spawn remoteVehicle;","true",5]];

id submit a pull request @salival but i leave it to you m8!

Link to comment
Share on other sites

  • 1 month later...
  On 8/7/2017 at 1:55 PM, Runewulv said:

any chance of getting this to work with master key? As of now it seems to lock onto the last vehicle keyed.

Expand  

That is unfortunately going to be a side effect of master key. I tried thinking of a way to do this when I wrote this.

The only way I could have seen to do it was to pop up a menu asking which vehicle you wanted to access, but that was a lot more work than I intended

Link to comment
Share on other sites

  On 8/7/2017 at 6:59 PM, salival said:

That is unfortunately going to be a side effect of master key. I tried thinking of a way to do this when I wrote this.

The only way I could have seen to do it was to pop up a menu asking which vehicle you wanted to access, but that was a lot more work than I intended

Expand  

Would so be worth it tho... Maybe hook it into your vehicle key changer dialog anyways? Can't wait to have my comp back, month and a half later....

Link to comment
Share on other sites

It will be random since all i'm doing is a check of "vehicles" which is an array of the vehicles on the server and checking the key against that.

I have a week off work from tomorrow (unless my boss is going to be a dick) so I'll try and dedicate some time to this and see if I can get a resolution, because I agree, it is annoying.

Link to comment
Share on other sites

  On 8/9/2017 at 2:28 AM, Runewulv said:

this is good news though salival, thanks for your hardwork. I love the ability to fire up my heli rotors while still at the trader remotely. And the lock/unlock/player kick is so great too.

Expand  

The great thing I like about this script is this is the only version where vehicles will stay turned on when you turn the engine on remotely. Other versions require you to have been in it before it will stay on permanently

Link to comment
Share on other sites

  • 2 months later...

I added vehicle selection menu for masterkey, in the same way as Call car script.

  Reveal hidden contents

Working, (option 6 is lock&unlock depending on vehicle status.)
if you newly install or already updated to the newest one in the reply below, don't use this.  this is for old version

Link to comment
Share on other sites

Hi guys,

Just an update, I have been working on getting a menu working with this, I had it working completely just needing tidying but life/work got busy and I forgot about it

@Schalldampfer's post reminded me about it, I should hopefully have my version out in a few days/the weekend.

It's completely working, just needs tidying and localization, I basically just used the virtualgarage/vkc format dialogs, they seem to work well for vehicles.

Link to comment
Share on other sites

Hi guys,

Here's the updated version with the dialog menu which works with multiple vehicles per key, works quite well, I also added @ViktorReznov's suggestion with a toggle for the lights on/off.

I will work on getting the script working with localizations this weekend.

I tested this quite a bit, but please give it a test and see how it works and report any bugs.

Dialog update: https://github.com/oiad/remoteVehicle/commit/364582917489b51694e431c2014c52e4a789fe4d

forgotten battleye filter: https://github.com/oiad/remoteVehicle/commit/9cb398237dbeba59a654fb23965aa2c35f777b7e

Link to comment
Share on other sites

  • 1 month later...
Guest
This topic is now closed to further replies.
  • Discord

×
×
  • Create New...