Jump to content

[Release] Virtual Garage [Updated for 1.0.7]


salival

Recommended Posts

Virtual Garage is part of Epoch 1.0.7.1 now.

Hi guys,

Here's my version of Virtual Garage, it's not far off a full rewrite but includes some of the original code that the original author contributed.

Fixes a lot of problems and adds a lot of newer features:

  • Single UI for storing/retrieving vehicles
  • Dynamic pricing based on vehicle type/classname
  • Dynamic limits based on vehicle type/classname
  • Adds support for removing a helipad nearby
  • Able to see storage in stored vehicles
  • RPT logging for storing/retrieving vehicles
  • Fixes dupes for more than 2 people depositing the same vehicle
  • Supports briefcases and coins
  • Localization support (currently german and russian)

Please see my github repo for install instructions:

https://github.com/oiad/virtualGarage

Link to comment
Share on other sites

THIS IS FOR USERS WHO PREVIOUSLY USED THE REMOVE THERMAL AND UPDATE TO THE NEW VERSION

 

Remove thermal and remove ammo

open@DayZ_Epoch_Server\addons\dayz_server\compile\garage/server_spawnvehicle.sqf

 

find clearWeaponCargoGlobal  _object;

replace like so

 

 

working on my server

clearWeaponCargoGlobal  _object;
	clearMagazineCargoGlobal  _object;

		{
	if (_object isKindOf _x) then {
		_object disableTIEquipment true;
	};
	} forEach vehsRemoveThermal;
	// _object setVehicleAmmo DZE_vehicleAmmo;

	_object setFuel _fuel;
	_object setDamage _damage;
	_object setVehicleAmmo 0;

 

Link to comment
Share on other sites

That won't work for anyone else though, since they won't have the array 

vehsRemoveThermal

ill add support for it properly in the next few days, I just wanted to get it out for release (it's still on my GitHub issues post)

Link to comment
Share on other sites

Just put this on my test server and love it. Working great so far. I have been playing around with it and only thing I have found is when getting a vehicle out of the garage it allows you to get the vehicle even if you have no slots available for a key. It appears to just move the inventory to a blank slot so you don't loss anything, but i could see that being an issue possibly. I know if you try to buy a vehicle from a trader they will tell you that you do not have space on your toolbelt or something like that. Not sure if you could add something like that. I will keep lookout for any other things, but great script and I am glad you were able to get it released :)

Link to comment
Share on other sites

Hi guys,

I fixed the issues listed on gitHub / mentioned to me, thanks to @DieTanx @azzdayz and @BigEgg for the heads up.

Fix traders not working as a garage: https://github.com/oiad/virtualGarage/commit/3f074795fcd2f34d8e62c757cd4f96d3c2758ffc

Fix wrong price for storing vehicle with gear: https://github.com/oiad/virtualGarage/commit/61cbd87d1995a5dd43db957b00bd9f98c917aece

Fix getVehicle when toolbelt full: https://github.com/oiad/virtualGarage/commit/4075381933c7909de6fcf1556e8f54abd394119b

 

Link to comment
Share on other sites

Found this issue:

Error in expression <lect 0;
_magazineCount_raw = _inventory select 1;
_backPackCount_raw = _inventor>
  Error position: <select 1;
_backPackCount_raw = _inventor>
  Error Zero divisor
File mpmissions\__CUR_MP.Panthera2\scripts\virtualGarage\vehicleInfo.sqf, line 33

Link to comment
Share on other sites

2 minutes ago, Hooty said:

@@ -68,6 +68,7 @@ _vehicleUID    = _vehicle>
  Error position: <@@ -68,6 +68,7 @@ _vehicleUID    = _vehicle>
  Error Invalid number in expression
File mpmissions\__CUR_MP.Chernarus\scripts\virtualGarage\player_storeVehicle.sqf, line 8
Error in expression <nt","_woGear"];

disableSerialization;

Hey,

I'm not sure what's going on there, that error looks broken, can you send me your client RPT?

Line 8 in player_storeVehicle.sqf is a findDisplay line.. that stuff is like down line 67

What are you doing when you get that error?

Link to comment
Share on other sites

No complete uninstall of Dukes and replaced withe yours last night. Seen the traders were broke and someone already told you so I just waited for you to fix. Applied fixes when I got home from work and got that error. Still confused how  @@ -68,6 +68,7 @@ was in the file lol.

Link to comment
Share on other sites

2 minutes ago, Hooty said:

No complete uninstall of Dukes and replaced withe yours last night. Seen the traders were broke and someone already told you so I just waited for you to fix. Applied fixes when I got home from work and got that error. Still confused how  @@ -68,6 +68,7 @@ was in the file lol.

Looking at it now, I'm guessing you copied the diff fix from github:

@@ -68,6 +68,7 @@ _vehicleUID	= _vehicle getVariable ["ObjectUID","0"];
  _weaponsCount = ((getWeaponCargo _vehicle) select 1) call _gearCount;
  _magazineCount = ((getMagazineCargo _vehicle) select 1) call _gearCount;
  _backPackCount = ((getBackpackCargo _vehicle) select 1) call _gearCount;
 +_cargoAmount = (_weaponsCount + _magazineCount + _backPackCount);

Instead of the actual file

Link to comment
Share on other sites

Hi all, the script works fine, but I had to modify slightly the table in the database. The whole thing again in the russian language. When a variable _displayName enters the vehicle name in english(for example _displayName = GAZ (grey)), then it is processed normally and the transport is written to the database. If the variable _displayName will come the vehicle name with russian letters(for example _displayName = Внедорожник (белый)), then in the database it will not be recorded and will cause an error.

[13:25:38 +00:-1] [Thread 456002976] extDB: Found extdb-conf.ini
[13:25:38 +00:-1] [Thread 456002976] extDB: Detected 4 Cores, Setting up 4 Worker Threads
[13:25:38 +00:-1] [Thread 456002976] extDB: Database Type: MySQL
[13:25:38 +00:-1] [Thread 456002976] extDB: Database Session Pool Started
[13:25:38 +00:-1] [Thread 456002976] extDB: DB_RAW_V3: Initialized: ADD_QUOTES True
[13:34:31 +00:-1] [Thread 544609928] extDB: DB_RAW_V3: Error StatementException: MySQL: [MySQL]: [Comment]: mysql_stmt_execute error	[mysql_stmt_error]: Incorrect string value: '\xD0\x92\xD0\xBD\xD0\xB5...' for column 'DisplayName' at row 1	[mysql_stmt_errno]: 1366	[mysql_stmt_sqlstate]: HY000	[statemnt]: INSERT INTO garage (PlayerUID, Name, DisplayName, Classname, CharacterID, Inventory, Hitpoints, Fuel, Damage, Colour, Colour2) VALUES ('76561198225362352','Snow','Внедорожник (белый)','hilux1_civil_3_open_DZE','0','[[["G17_DZ"],[1]],[[],[]],[[],[]]]','[["motor",0.245],["sklo predni P",0.401]]','0.476596','0','0','0')
[13:34:31 +00:-1] [Thread 544609928] extDB: DB_RAW_V3: Error StatementException: SQL: INSERT INTO garage (PlayerUID, Name, DisplayName, Classname, CharacterID, Inventory, Hitpoints, Fuel, Damage, Colour, Colour2) VALUES ('76561198225362352','Snow','Внедорожник (белый)','hilux1_civil_3_open_DZE','0','[[["G17_DZ"],[1]],[[],[]],[[],[]]]','[["motor",0.245],["sklo predni P",0.401]]','0.476596','0','0','0')
[13:35:55 +00:-1] [Thread 456002976] extDB: Stopping ...

A solution to this problem is to change the encoding in the table from latin1_swedish_ci to utf8_general_ci. Here is an example SQL query to the database:

ALTER TABLE `garage` ADD `displayName` VARCHAR(50) CHARACTER SET utf8 NOT NULL DEFAULT '' AFTER `Name`;

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...