Jump to content

[Release] Remote key for locking/unlocking vehicles (0.3)


Recommended Posts

lol im in the credits, thank you but not needed = :). Possible suggestion i don't know if this is possible.

 

Instead of shiftclick could something not be done like in the heli-lift where remote lock is deactivated where the vehicle is not empty.

 

i think its something to do with 

 

 

(count (crew _unit)) == 0

 

 

but im not a coder, just a noob loving all you resourceful guys

Link to comment
Share on other sites

I've activated the gear menu, if you sit in a locked car :P

 

1. I edited my custom compiles.sqf:

 

Search fn_gearMenuChecks and change the line

fn_gearMenuChecks = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";

to

fn_gearMenuChecks = compile preprocessFileLineNumbers "custom\fn_gearMenuChecks.sqf";

2. Opened the dayz_code.pbo, extracted fn_gearMenuChecks.sqf at compile in my custom foldier and edited

if((locked _cTarget) and _isOk and (((vehicle player) distance _cTarget) < 12)) then {

to

if((locked _cTarget) and _isOk and !_inVehicle and(((vehicle player) distance _cTarget) < 12)) then {

Thats all B)

Link to comment
Share on other sites

Works good!, Anyone notice the cars don't stay running? Or could this be infistar shutting them off after 20ish seconds?

I think it's one of the known issues. If you use the remote engine start, the engine turns on - but dies after a short while. But if you enter the car, then exit it, then use the remote engine start, it stays on. (can you confirm that this is the case for you?)

I'm not sure what causes it though, will hopefully have it fixed further down the road.

Link to comment
Share on other sites

  • 2 weeks later...

just wondering if you could help me understand what to put in either my init.sqf or my compiles, ive installed multiple times and the key beep works as it sits in the init but everything else i install isnt called anywhere so it isnt running and im wondering what im misreading

sorry im noob

thx in advance

Link to comment
Share on other sites

just wondering if you could help me understand what to put in either my init.sqf or my compiles, ive installed multiple times and the key beep works as it sits in the init but everything else i install isnt called anywhere so it isnt running and im wondering what im misreading

sorry im noob

thx in advance

It sounds like you have missed the step 1 of the original post.

The functions you need to replace are ui_selectSlot and fn_gearMenuChecks. Normally, these point to sqf files in the dayz_code pbo.

player_selectSlot =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
fn_gearMenuChecks =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";
These functions need to point to the files in the mission file:

player_selectSlot =			compile preprocessFileLineNumbers "custom\player_selectSlot.sqf";
fn_gearMenuChecks =			compile preprocessFileLineNumbers "custom\fn_gearMenuChecks.sqf";
I hope this will point you in the right direction.

I am working on a complete re-write of this that will be a lot simpler to install, if you cant get this to work you may try the experimental new version.

Link to comment
Share on other sites

It sounds like you have missed the step 1 of the original post.

The functions you need to replace are ui_selectSlot and fn_gearMenuChecks. Normally, these point to sqf files in the dayz_code pbo.

 

player_selectSlot =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\ui_selectSlot.sqf";
fn_gearMenuChecks =			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_gearMenuChecks.sqf";
These functions need to point to the files in the mission file:

player_selectSlot =			compile preprocessFileLineNumbers "custom\player_selectSlot.sqf";
fn_gearMenuChecks =			compile preprocessFileLineNumbers "custom\fn_gearMenuChecks.sqf";
I hope this will point you in the right direction.

I am working on a complete re-write of this that will be a lot simpler to install, if you cant get this to work you may try the experimental new version.

 

Got it, thx!

Ended up having my init pointing to two seperate compiles was really messing it up.  Thanks for getting back to me so quick!

Link to comment
Share on other sites

Need a little advice did all getting beep but not right click option on key and i only have 1 complie called in my init any help would be appreciated thanks

It sounds like player_selectSlot.sqf is not running the one in the mission file.

You need to take another look at step 1 and check out the link provided, which describes how to replace references to sqf files in the days_code pbo to local mission ones.

Link to comment
Share on other sites

Urgg i dont know what i did wrong i followed your instructions exactly ,
 

i couldnt find player_selectslot so i used my ui_selectslot as it had the line you said to use but i get stuck at wait for host

 

I checked the rpt and this is the only error in there.. 

ErrorMessage: Config : some input after EndOfFile.
Link to comment
Share on other sites

Urgg i dont know what i did wrong i followed your instructions exactly ,

 

i couldnt find player_selectslot so i used my ui_selectslot as it had the line you said to use but i get stuck at wait for host

 

I checked the rpt and this is the only error in there.. 

ErrorMessage: Config : some input after EndOfFile.

ui_selectSlot should be correct, the variable ui_selectslot should point to the file player_selectslot, but I don't think the problem is there otherwise the logs should say that the file is missing or something I think.

Have you done anything else at the same time as when you implemented this? Call it a hunch, but could you double check so that everything looks alright with the description.ext file?

Link to comment
Share on other sites

add ,"_tvih"  in:
private ["_tvih","_ownerID","_objects","_i","_ownerID2","_vehicle","_tvih"];
 
 
+ remote_lock.sqf
 
change this:
titleText ["Vehicle has been locked","PLAIN DOWN"];

to this:

_tvih = typeOf _vehicle;
cutText [format["%1 has been locked",_tvih], "PLAIN DOWN"];

-----

+ remote_unlock.sqf

 

change this:

titleText ["Vehicle has been unlocked","PLAIN DOWN"];

to this:

_tvih = typeOf _vehicle;
cutText [format["%1 has been unlocked",_tvih], "PLAIN DOWN"];
Link to comment
Share on other sites

we can use ONLY cool cars: _objects = nearestObjects [getPos player, ["SUV_Blue_DZE4","SUV_Green_DZE4".........], 50];

 

sorry, wrong say, write this:

local_lockUnlock.sqf very buttom:

[_vehicle,500,true,(getPosATL _vehicle)] spawn player_alertZombies;

I have long heard about the supplement did not have time to find, but there were plenty of ideas

thx to you!

Link to comment
Share on other sites

thx for u script! i find other scripts, recharge, learning. and try do something my.

hold, ADMIN TOOL, make the resolution of only admins

 

how write do:

 

_uid = getPlayerUID player;
_adminlist = ["111111","2222222"]; 
if (_uid in _adminlist) then {

_menu =  _parent displayCtrl (1600 + _numActions);
_menu ctrlShow true;
_text =  "TP к машине";
_script =  "[""" + _ownerKeyId + """] execVM ""scripts\tp_to_veh_bykey.sqf""";
_height = _height + (0.025 * safezoneH);
uiNamespace setVariable ['uiControl', _control];
_menu ctrlSetText _text;
_menu ctrlSetTextColor [1,0.25,0.25,1];
_menu ctrlSetEventHandler ["ButtonClick",_script];
};

tp_to_veh_bykey.sqf

//F507DMT
//http://goldkey-dz.ru
//GoldKey https://vk.com/goldkey_dz


private ["_ownerID","_objects","_i","_ownerID2","_vehicle","_veh_pos"];
_ownerID = _this select 0;
_objects = nearestObjects [getPos player, ["LandVehicle","Helicopter","Air","Ship","Tank","Wheeled_APC","Tracked_APC"], 14000];

_i = 0;
{
	_vehicle = _x;
	if (alive _vehicle) then {
		_ownerID2 = _vehicle getVariable ["CharacterID", "0"];

		if(_ownerID == _ownerID2) then {
				_veh_pos = getPosATL _vehicle;
				player setPosATL _veh_pos;
				_tvih = typeOf _vehicle;
				cutText [format["You teleported to %1",_tvih], "PLAIN DOWN"];
		};
		
		_i = _i + 1;
	};
} forEach _objects;
closeDialog 0;
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
  • Advertisement
×
×
  • Create New...