Jump to content

[RELEASE] Vehicle Key Changer - For making Masterkey - V 1.4 (Updated 06/15/2014)


OtterNas3

Recommended Posts

[RELEASE] Vehicle Key Changer - For making Masterkey - V 1.5.2 (Updated 10/19/2014)

Hi Guys,

here the next update.

Changes: Improvements, bug fixes, code optimization (tidy), claim vehicle without a key completely revised, player action with Sound (sfx)

Particulars: Claim vehicle key has its own menu. You can now select which Key color is claimed.

You select for example a vehicle key red and a red car key with a new KeyID is now generated.

If the player is in action then they hear now a repair Sound :D

Demo Video

https://www.youtube.com/watch?v=rgRyxF6c5Hk

Have Fun!

Best regards

hellraver

Note: In the next and last update from my Vehicle Key Changer Version I will integrate the Epoch Return Change System and the Coin System ;-)

Hint: This is a unofficial version and is not from Otternas3!!!

All Credits goes to Otternas3

VehicleKeyChanger_v1.5.2.zip

Link to comment
Share on other sites

I have an older version working with Infistar on our GTX server, i'm looking at updating soon.

Is it possible to add a check for a certain object, and only allow this to be performed within a set radius of that object? I would like to make it to where I can have this only be used at a vehicle service point.

Link to comment
Share on other sites

@chaingun427

Yes is possible. You could for example add a new trader.

I have on my server a tool smith in Berezino and Zelenogorsk.

The player can there build a chainsaw, night vision, weapon

and more when he has certain items. I could also write a script

that you can change and claim the vehicle key in the tool smith

or other objects. I can insert the trader in the script so that it is

loaded. The possible is limitless ;-) All just a question of how to

apply the commands for something :-)

Sorry! When my english is not correctly. I speak german ;-)

Best Regards

hellraver

Link to comment
Share on other sites

Danke! I speak very little Deutsch so I'd better stick with English lol. All I'd like to do with this script is limit it's use to a configurable radius around a trader model like "Worker4" which I'll use for my service point as well. I've got no skill in scripting but I feel the ability set areas that this can be done in would be an awesome addition to the script.

Link to comment
Share on other sites

not really, I was just hoping someone could help me add a check for an object inside a certain radius before allowing the script to continue. I'm thinking it would go after

if ((vehicle player) == player) then {

and be something along the lines of

If (player is within 15m of "worker4") then {

But I have no idea how to write that so it will work, know what I mean?

 

I know at the bottom I'd have to add another

} else {

			[] call ON_fnc_vkcReset;

or it would break the loop.

 

Maybe if that wouldn't work I could setup coordinates instead, like I said i'm not great at coding

Link to comment
Share on other sites

[RELEASE] Vehicle Key Changer - For making Masterkey - V 1.5.3 (Updated 23/10/2014)

Changes: Fixed "something went wrong" problem that sometimes have some Players, improvements & code optimization (tidy)

Have Fun!

Best regards

hellraver

Hint: This is a unofficial version and is not from Otternas3!!!

Thanks for keeping this mod alive hellraver! I read through all 17 pages, then installed 1.5.3 after 1.4 didn't work. I'm having a few issues though:

 

- I can 'Claim Vehicle' and select a key color, but never get option to 'Unlock Vehicle'. Error on line #260 of VehicleKeyChanger.sqf.

- Same results and error with the 'Change Key'

 

Any ideas on where I'm going wrong? Here is an in game screenshot

 

Gd296zT.png

Link to comment
Share on other sites

@CRAFT

Thanks for your Statment. I know where the error is. I will fix it. Test please 1.5.2 Version.

 

Thanks for the reply, I installed 1.5.2. I am recieving 'something went wrong' - FAIL and I am refunded the cost. This happens for both 'Claim Key' and 'Change Vehicle Key'.

 

I am not getting the error on line #260 anymore, though. Any ideas on a solution?

 

Here are some screenshots:

http://i.imgur.com/ZThySmj.png

 

http://i.imgur.com/PQ6X5go.png

Link to comment
Share on other sites

ryq7zwfw.jpg

|#| <- That is the Problem. This is not written in the script. Ask me just whence this sign comes ^^

I will also install Epoch Panthera on my test server to see whether the error also appears for me.

Can i have their mission.pbo and server.pbo file for testing and bug searching?

Link to comment
Share on other sites

Newest version seems to be working fine for me. Thanks to Blite I think I've figured out how to make it so you can only change a key near a set object.

 

I'm going to pop this on my test server tomorrow, but can you check it out and tell me what you think?

// Increase distance only if AIR || SHIP
_playerPos = getPosATL player;
_nearSP = count nearestObjects [_playerPos, ["worker4"],15] > 0;
_allowedDistance = 4;
_isAir = cursorTarget isKindOf "Air";
_isShip = cursorTarget isKindOf "Ship";
if(_isAir || _isShip) then {
	_allowedDistance = 8;
};

/* Start the loop check */
while{true} do {
	if (!isNull cursorTarget && (cursorTarget isKindOf "AllVehicles") && (player distance cursorTarget < _allowedDistance) && (!isEngineOn cursorTarget) && (_nearSP)) then {
Link to comment
Share on other sites

Newest version seems to be working fine for me. Thanks to Blite I think I've figured out how to make it so you can only change a key near a set object.

 

I'm going to pop this on my test server tomorrow, but can you check it out and tell me what you think?

// Increase distance only if AIR || SHIP
_playerPos = getPosATL player;
_nearSP = count nearestObjects [_playerPos, ["worker4"],15] > 0;
_allowedDistance = 4;
_isAir = cursorTarget isKindOf "Air";
_isShip = cursorTarget isKindOf "Ship";
if(_isAir || _isShip) then {
	_allowedDistance = 8;
};

/* Start the loop check */
while{true} do {
	if (!isNull cursorTarget && (cursorTarget isKindOf "AllVehicles") && (player distance cursorTarget < _allowedDistance) && (!isEngineOn cursorTarget) && (_nearSP)) then {

Yes would be a possibility but do not forget to set a private variable ;-)

private ["_playerPOS","_nearSP"];

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
×
×
  • Create New...