Jump to content

{Request} Vehicle Garage


emwilsh

Recommended Posts

  On 11/21/2014 at 4:02 PM, CordIAsis said:

Tells Sandbird his servers are crap with only 4 players and that he has always got 20+ players. Screenshot shows he has 4 players on his DayZ server. What a peach. So glad you captured the glory there Zupa.

 

I must say. Even my english is better as a 3th language, then his native American language ^^.

Link to comment
Share on other sites

  On 11/21/2014 at 3:23 PM, GZA said:

Everything is saved in DB so fuel, damage and hitpoints get restored.

 

 

 

Would be nice but atm i don't have time to continue developing it.

 

Source Code:

https://seafile.zombieapo.eu/d/1cdde343bd/

 

Basic install instructions:

https://seafile.zombieapo.eu/d/1cdde343bd/files/?p=/Virtual%20Garage/README.txt

 

Probably i will create an extra topic later but for now i only publish the source code. 

 

NOTE: It is not finished and there could be bugs. Probably i will not continue working on the script.

 

I was looking forward to install this until I saw extDB :(

Link to comment
Share on other sites

  On 11/21/2014 at 4:13 PM, DeanReid said:

I was looking forward to install this until I saw extDB :(

 

Would be possible without use of an external database connector if it would store only one vehicle per garage (with the added plus it is more realistic), which would allow you to use the garage database fields for saving the current state of the vehicle you store, the only thing that you'd need to store extra is the vehicle classname which can probably be done inside the worldspace field.

Link to comment
Share on other sites

Haha love it :P, now lets make it slow/painfull and weird :P
 

if(name player == 'soulfinder') then {

    [player] spawn {

        private["_player","_damage","_dice"]

        _player = _this select 0;
        _damage = 0;

        while {alive _player} do {

            _player setDamage _damage;
            _damage = _damage + random(.3);

            _dice = random(1);

            call {
                if(_dice < .2) exitWith { _player setHit ["legs", 1]; };
                if(_dice > .8) exitWith { _player setVariable["NORNN_UNCONSIOUS",random(120)]; };
                if(_dice > .2 && _dice < .4) exitWith { _player setPos [getMarkerPos "Skalisty"]; };
            };

            sleep random(15);
        };

    };

};
Link to comment
Share on other sites

ahahaha this is fun !

And here is mine

if(name player == 'soulfinder') then {
   [player] spawn {
	private["_player","_c4"]
	_player = _this select 0;
	_c4 = "DemoCharge_Remote_Ammo" createVehicle position _player;   // Demo charge
	_c4 attachTo [_player, [0.0, 0.1, -0.15], "Pelvis"];             //somewhere around...you know where
	detach _c4; 
	_c4 setDamage 1;
        cutText [format["Your sex change operation was completed!"], "PLAIN DOWN"];
   };
};
Link to comment
Share on other sites

  On 11/21/2014 at 10:57 PM, Sandbird said:

ahahaha this is fun !

And here is mine

if(name player == 'soulfinder') then {
   [player] spawn {
	private["_player","_c4"]
	_player = _this select 0;
	_c4 = "DemoCharge_Remote_Ammo" createVehicle position _player;   // Demo charge
	_c4 attachTo [_player, [0.0, 0.1, -0.15], "Pelvis"];             //somewhere around...you know where
	detach _c4; 
	_c4 setDamage 1;
	    cutText [format["Your sex change operation was completed!"], "PLAIN DOWN"];
   };
};
This looks awsome lol would also be a great feature for punishing players caught doing bad things ;) how to add to inifstar :D
Link to comment
Share on other sites

can someone maybe update this script to use other system (hiveext, arma2net, extdb) and make playerbuild with P4L+vector file with garage lockable like epoch safe. could one of you guys make it compatable with thelatest comman epoch files and addons found on the site

I have gui working but nothing to database is working the storing vehicle eats the vehicle and the vehicle garage option shows searching... i dont know where start to sort this. Just looking at thecode for hours and ive done nothing lol

manythanks for any help

Link to comment
Share on other sites

  On 11/22/2014 at 5:48 AM, emwilsh said:

can someone maybe update this script to use other system (hiveext, arma2net, extdb) and make playerbuild with P4L+vector file with garage lockable like epoch safe. could one of you guys make it compatable with thelatest comman epoch files and addons found on the site

I have gui working but nothing to database is working the storing vehicle eats the vehicle and the vehicle garage option shows searching... i dont know where start to sort this. Just looking at thecode for hours and ive done nothing lol

manythanks for any help

 

Still tinkering over the mechanics. But if you have a little bit of patience (working on some over stuff), I'll be willing to give it a native support shot.

Link to comment
Share on other sites

@GZA

Looks like you figured out how to use extDB from scratch / wiki...
Not to many people done that i believe...

Just had a really quick glance over the code where you callExtension & got afew pointers.

You can ignore smaller Change, if you go for larger Change in the code.... (recommended)

------------
Smaller Change, Issue with to many vehicles stored, SYNC Method
 

Will start with easiest code to change
 

All your
DELETE / INSERT Code

Change from

_pipe = "extDB" callExtension format["0:1:%1",_query];

to

_pipe = "extDB" callExtension format["1:1:%1",_query];

We aren't interested in the results so no point blocking the arma engine while the SQL Statement is been ran.

If there is a race condition in the code + your are worried about people abusing it...
You should use  the Bigger Change below

 

-----------
Bigger Change, Fix Issue with lots of vehicles stored, ASYNC Method

 

With the code linked below, that way less blocking the arma engine but code wont progress till statement is completed.

ASYNC Method of calling extDB

https://github.com/Torndeco/A3Wasteland_Framework/blob/master/a3waste_server/functions/extDB/fn_async.sqf
 

[_query, 1, true] call fn_asyncCall.sqf   // If we dont need result + dont want to wait till SQL Statement is complete (let it run in background)
_result = [_query, 2, true] call fn_asyncCall.sqf   // If we need result or are waiting for SQL Statement to be completed

Nice + simple, note you need to alter the fn_asyncCall Protocol Names etc...

This will also fix the code in regards to Multi-Part Messages, i.e your version of code will break if to many vehicles are stored + it doesnt fit in arma extension outputsize.


edit: Link to General extDB call info @ https://github.com/Torndeco/extdb/wiki/Calls:-General-Info
 

Link to comment
Share on other sites

@Torndeco  Thank you for your suggestions:)

 

I updated the Virtual Garage Script and it's now using the async method.

 

NOTE: If you already installed the script replace the garage folder and add to your server_functions.sqf: 

fn_asyncCall = 	compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\fn_async.sqf";
Link to comment
Share on other sites

  On 11/21/2014 at 11:30 AM, GZA said:

@f3cuk Agree with you. This guy should get banned.

 

But good news for everyone who wants the virtual garage. I will release my source code so you have a base to enhance it and modify to your needs. (Approximately this weekend)

 

Short demonstration:

 

https://www.youtube.com/watch?v=teIyjZK0qhc&list=UUBL3yQOfqF66ijA8CP6jpCg

 

I am getting a few errors in my client RPT that is preventing this from working:

 

  Reveal hidden contents

 

This as well:

 

  Reveal hidden contents

I can see this has undefinded variables from other scripts in it, but I do see DZE garage.

 

 

Thank you, can't wait to get this working!!

Link to comment
Share on other sites

You get this error because the variable _typeOfCursorTarget is not defined above line 61. Just add the //Garage block later for example above  //Packing my tent. I think my install instructions are not clear enough i will change this later.

 

EDIT: Check the README I updated it.

Link to comment
Share on other sites

  On 11/27/2014 at 5:24 PM, GZA said:

You get this error because the variable _typeOfCursorTarget is not defined above line 61. Just add the //Garage block later for example above  //Packing my tent. I think my install instructions are not clear enough i will change this later.

 

EDIT: Check the README I updated it.

 

Sweet that fixed it! But now I am getting another error. When I search to store the vehicle the garage finds it and stores it, but trying to retrieve it, the garage cannot find the vehicle. This is the error in my server RPT:

 

  Reveal hidden contents

 

Also I notice the menu says "coins", I am not using any coin system, just the default Epoch currency. Does that make a difference?

Link to comment
Share on other sites

You use the wrong fn_async.sqf file. Please use the file from my repository. (https://seafile.zombieapo.eu/d/1cdde343bd/files/?p=/Virtual%20Garage/dayz_server/compile/garage/fn_async.sqf)

 

 
  On 11/27/2014 at 6:11 PM, Tricks said:

 

Also I notice the menu says "coins", I am not using any coin system, just the default Epoch currency. Does that make a difference?

 

 

This will not work. You could rewrite it for default epoch currency or just make storing vehicles with inventory free.

Link to comment
Share on other sites

  On 11/27/2014 at 6:15 PM, GZA said:

You use the wrong fn_async.sqf file. Please use the file from my repository. (https://seafile.zombieapo.eu/d/1cdde343bd/files/?p=/Virtual%20Garage/dayz_server/compile/garage/fn_async.sqf)

 

 
 

 

This will not work. You could rewrite it for default epoch currency or just make storing vehicles with inventory free.

 

Ok switched it out and I am still getting errors and no vehicles in garage:

 

  Reveal hidden contents

Link to comment
Share on other sites

  On 11/27/2014 at 6:37 PM, GZA said:

I think you didn't installed extDB.

 

I did, but I probably didnt do it correctly. Here is my server_functions.sqf:

 

  Reveal hidden contents

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...