Jump to content

Recommended Posts

Greatwork! none the less by far user friendly interface among all shop system and even probably most advanced.

Although, I wish there is persistency toggle or module so scenario editors can use it on many different types of scenarios.

 

like for me, lack of experience of sql or sqf skills makes me using "Simple Weapon shop" made by Hoverguy which contains function for save everyone's gear.

Share this post


Link to post
Share on other sites

Amazing work, took me a while to get it going but works flawlessly.

Was wondering though, would it be possible for somebody to add vehicles to this script?


I'm not great with scripts but i'd give it a shot if somebody could give me basic outlines. Would love to have everything in one place ( Money, gear and vehicles ).

 

Keep it going 🙂

Share this post


Link to post
Share on other sites

Hey.  @HallyG

Is it possible to create a vehicle trader as well?

And how about getting the items to the nearest box in the same way as to the nearest car?

When an item is created in a box or vehicle. Could it also be that he who bought the object sees only what he has bought. And not the friend who might take a friend’s gun.

Edited by Casio91Fin

Share this post


Link to post
Share on other sites

@HallyG

I want to make sure, because I was unable to do this by myself: is it possible to buy (and optionally sell) vehicles with your script? I'm trying to add the vanilla quad bike with same structure as a gun, but it doesn't even show up.

 

Anyway it is one of the most decent works I have ever seen within Arma 3 community, great work and I'm hoping you'll develop more things in your free (or paid) time. 🙂

Share this post


Link to post
Share on other sites

Hi! Your work is really great! But there's a problem. I've added uniforms, vests and backpacks in the store and even added boxes and ammoboxes in a list, in which I choose where to put items in. I can buy uniforms, vests and backpacks, then these items will appear in boxes, but the problem is I can't sell none of them, I get a message "Unable to sell item". It's like I have none. I'm no good at scripting, and I was trying to fix it by myself but nothing came out. How to fix it?

Share this post


Link to post
Share on other sites

How to make purchase to the ammobox?

  containerTypes[] = {"LandVehicle", "Air", "Ship", "Ammo", "ReammoBox_F"};

 

Share this post


Link to post
Share on other sites

Bumping up @Casio91Fin's question, in case someone figured it out - how do you add a crate to the container types? No config category works, I've gone through most files and couldn't understand where does it valid what type of container it is and why wouldn't it allow an ammo box if cars are allowed.

Share this post


Link to post
Share on other sites

Okay, I figured it out thanks to a hint by a fellow scripter from Discord.

 

1. Add "ReammoBox_F" or any other type of container to "containerTypes[]" in  \HALs\Addons\store\config.hpp.

2. Add "ReammoBox_F" or any other type of container in \HALs\Addons\store\functions\server\fn_initServer.sqf in line 23 and line 33, so it looks something like this

[
	["CfgHALsStore"],
	"HALs_store_",
	[
		["containerRadius", 10, {_this max 0}, true],
		["containerTypes", ["LandVehicle", "Air", "Ship", "ReammoBox_F"], {_this}, true],
		["currencySymbol", "¢", {_this}, true],
		["sellFactor", 1, {_this max 0 min 1}, true],
		["debug", 0, {_this isEqualTo 1}]
	]
] call HALs_fnc_getModuleSettings;

missionNamespace setVariable ["HALs_store_getNearbyVehicles", compileFinal '
	params [
		["_trader", objNull, [objNull]],
		["_types", ["LandVehicle", "Air", "Ship", "ReammoBox_F"], [[]]],
		["_radius", HALs_store_containerRadius, [0]]
	];

	private _vehicles = nearestObjects [_trader, _types, _radius, true];
	_vehicles select {local _x && {abs speed _x < 1 && {alive _x && isNil {_x getVariable "HALs_store_trader_type"}}}};
', true];

3. Save files, save your mission, place a crate with ReammoBox_F class near trader and preview it, now you should be able to drop stuff into that very crate.

 

To my SQF knowledge that function file should already take any custom values given in config.cpp but somehow it doesn't, perhaps due to the compiling, so I just slapped it everywhere I could and it works. 😄

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×