Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

156 Excellent

About hoverguy

  • Rank
    Staff Sergeant

Profile Information

  • Gender
  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. @ZappsZ conditionToAccess = "playerSide in [west,civilian,resistance]"; whitelistSides[] = {"west","civilian","resistance"};
  2. Hi @ZappsZ Just put it right under class RscTitles { Don't forget to add #include "HG\UI\HG_DialogsMaster.h" Somewhere before RscTitles class. Check this out -> https://github.com/Ppgtjmad/SimpleShops/wiki/Implementation
  3. Hi @VitalyTurboVaz 1) There's one step that you're missing, when making more garage classes you have to modify the addAction call (https://github.com/Ppgtjmad/SimpleShops/wiki/Usage#virtual-garage) this addAction["<img image='HG\UI\Icons\garage.paa' size='1.5'/><t color='#FF0000'>"+(localize "STR_HG_GARAGE")+"</t>",{_this call HG_fnc_dialogOnLoadGarage},"HG_DefaultGarage",0,false,false,"",'(alive player) && !dialog && player distance _target < 3']; this addAction["<img image='HG\UI\Icons\garage.paa' size='1.5'/><t color='#FF0000'>"+(localize "STR_HG_GARAGE_PARK")+"</t>",{_this call HG_fnc_storeVehicleClient},"HG_DefaultGarage",0,false,false,"",'(alive player) && !dialog && player distance _target < 3']; Notice the "HG_DefaultGarage" passed as a parameter to the function. Let's use your new class -> HG_BLUFOR_Garage this addAction["<img image='HG\UI\Icons\garage.paa' size='1.5'/><t color='#FF0000'>"+(localize "STR_HG_GARAGE")+"</t>",{_this call HG_fnc_dialogOnLoadGarage},"HG_BLUFOR_Garage",0,false,false,"",'(alive player) && !dialog && player distance _target < 3']; this addAction["<img image='HG\UI\Icons\garage.paa' size='1.5'/><t color='#FF0000'>"+(localize "STR_HG_GARAGE_PARK")+"</t>",{_this call HG_fnc_storeVehicleClient},"HG_BLUFOR_Garage",0,false,false,"",'(alive player) && !dialog && player distance _target < 3']; 2) A crate is spawned at your feet when you open the gear shop dialog. Whenever you buy something, let's say a uniform, and you already have a uniform equipped, your old one will be stored into the crate (along with its content). Note that only you can see the box, it's local. The main purpose is if that if you buy a uniform that's of less capacity than you previous one that was full then you have a way to get your stuff back. 3) I can't reproduce this issue, do you have a screenshot or even better a video?
  4. @LSValmont I came up with this for now, check it out -> https://github.com/Ppgtjmad/SimpleShops/commit/8313ff8c425d99ae19fef13913753fb678255177
  5. @bong oh Hi, try this -> https://github.com/Ppgtjmad/SimpleShops/commit/e3dd1219ef8bd249e6895aeface30cc3515e343e and let me know if it worked. @LSValmont No, thank you for using it. I'll have a look into this OLD MAN stuff tomorrow afternoon.
  6. Hi everyone, I released an update that includes a units shop. https://github.com/Ppgtjmad/SimpleShops/commit/1af64c6870a4e555d9a1bb1071edcdf4c629bed7 I'll work on a "garage system" to store/retrieve units as well for persistency (database saving only). Also spawning a thread that monitors the state of a vehicle and updates the database accordingly.
  7. Hi @LSValmont Could you share a link to this?
  8. Hi @Kelsey Allen I added support for weapons in uniforms/vests/backpacks. Note that attached accessories and magazines won't show up in the list. I pushed the update on github, here is the modified file https://github.com/Ppgtjmad/SimpleShops/blob/master/HG/Functions/Client/Trader/fn_refreshTrader.sqf copy/paste it. Thanks for using SimpleShops!
  9. Hi @basba66 Yes it will, note that if you were using profile saving before switching to extDB3 all you vehicles will be "lost" (not really lost, still saved in profile just not in database). Hi @VitalyTurboVaz 1. That's actually a good idea, adding it to my todo list. 2. Could you be more specific?
  10. The answer is yes as long as the same profile is used by the server
  11. Hello @NikoWZRD The progress is saved in server's profile (if savingMethod is set to "Profile" in HG_Config.h), the only way to reset it is to either use that code above or delete the <name>.vars.Arma3Profile file To avoid the hassle you could just setup a database, this way you can reset everything in one go... or nil out variables on server start like so (only works with "Profile" as savingMethod): if(!isNil {parsingNamespace getVariable "HG_Profile"}) then { private["_vars","_strs","_str"]; _vars = parsingNamespace getVariable "HG_Profile"; _strs = ["hg_cash","hg_bank","hg_xp","hg_kills","hg_gear","hg_garage"]; { _str = _x; { if([_str,_x,false] call BIS_fnc_inString) then { profileNamespace setVariable [_x,nil]; saveProfileNamespace; }; } forEach _vars; } forEach _strs; }; Put that code at the end of HG\Setup\fn_serverInitialization.sqf On large scale missions I recommend using a database though...
  12. Hi @Robert Tyburne A little bit of explanation: Player buys a vehicle - Vehicle is spawned - A variable is set on that vehicle and is then broadcasted, that variable contains the owner steam64 ID and a random number that serves as a "plate" number (unique identification) - Vehicle is inserted into database or saved in server's profile and active variable is set to 1 Player opens garage - Server searches for vehicles owned by that player (in profile or in db according to savingMethod), finds them and returns those with active var = 0 - Dialog displays available vehicles Player stores a vehicle - Vehicle is deleted from world - The active variable is set to 0 (in profile or in db) Player disconnects (only works if storeVehiclesOnDisconnect is set to true in HG_Config.h) - Server scans all vehicles and filter out those that belong to the player (with the help of the variable set on it) - Destroyed vehicles are removed from the result - Vehicles are deleted - The active variable is set to 0 (in profile or in db) for every vehicle There is also this parameter resetGaragesOnServerStart that - When set to false, will switch the active status on vehicles to 0, meaning that they're available in the garage again - When set to true, will DELETE every vehicles (from profile or from db), meaning that garage will be empty for everyone So to answer your concern, storeVehiclesOnDisconnect is set to true by default meaning that you don't have to worry about vehicles not being saved because they're removed from the world as explained above. If you set both storeVehiclesOnDisconnect and resetGaragesOnServerStart to false, all the vehicles will stay available in the world when the owner disconnects and available in your garage once server restarts. The downside with the second method is: Let's say you disconnect, one of your vehicle is destroyed by another player, that vehicle will be available again when server restarts... simply because there is no thread that monitors what happens to the vehicle when you're not in game. Thanks for using SimpleShops!
  13. Hello @C.Hall I presume that you're using profile namespace as saving method and that the mission is not hosted in that case this code will reset saved stats for you: uid = getPlayerUID player; ["HG_Cash","HG_Bank","HG_XP","HG_Kills","HG_Gear","HG_Garage"] apply {profileNamespace setVariable [format["%1_%2",_x,uid],nil]; saveProfileNamespace;}; Load up the editor, open the debug console and copy/paste this code then exec local.
  15. Hello @Drifter The place where you put the functions provided in the wiki varies a lot... I cannot cover all the possibilities... sorry for that. You need the basic coding knowledge to figure out, you can open the file and see how it works so you get a better understanding. Thanks for using my shops.