Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

149 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. The answer is yes as long as the same profile is used by the server
  2. 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...
  3. 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!
  4. 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.
  6. 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.
  7. Is it some kind of variable? If so open HG\Config\HG_Config.h and set cashVariable to "rvg_money", if it's an item you will have to modify some files...
  8. Hello @Gill93 The HUD is supposed to display your current cash amount everytime. Looks like the HUD is showing 50$ but in reality the cash variable is set to 0$, to me it's jut a display issue. Make sure the cash variable is well read or that the HUD is refreshed when it needs to be. Hello @sgtpipokinho Make sure classnames are correct (case sentitive, "arifle_MXC_F" & "arifle_MXC_f" are different strings) and that they have a sell price set. I've also just fixed an issue that was blocking the sell button in disabled mode. -> click here (github).
  9. hoverguy

    Config error with Altis Life

    Hello @FirstOrderKylo L.287-288 you forgot to close two arrays { "B_Messenger_Gray_F", "EMS Bag Grey", 2000, { "", "", -1 } , { "B_Messenger_IDAP_F", "EMS Bag IDAP", 2000, { "", "", -1 } , ---> { "B_Messenger_Gray_F", "EMS Bag Grey", 2000, { "", "", -1 } }, { "B_Messenger_IDAP_F", "EMS Bag IDAP", 2000, { "", "", -1 } },
  10. Hello @Harine Thank you it's always a pleasure to read things like this. clearInventory is only for vehicles, and yeah gear was not saving correctly especially on first time setup where it was completely skipped, now it's fixed https://github.com/Ppgtjmad/SimpleShops/commit/3a270e8096e67ed9ad8d0165b1f1677dea9166ea @bl2ck dog, Thanks for the credits & good luck with your project :)
  11. Hello @Fr3eMan As an example: private["_tree","_parentIndex","_childIndex","_grandChildIndex"]; disableSerialization; _tree = (findDisplay 1500) displayCtrl 456; // Clear tree tvClear _tree; // Create parent _parentIndex = _tree tvAdd [[],"PARENT"]; // Create child _childIndex = _tree tvAdd [[_parentIndex],"CHILD"]; // Create grand child _grandChildIndex = _tree tvAdd [[_parentIndex,_childIndex],"GRAND CHILD"]; Check the Notes part here https://community.bistudio.com/wiki/tvAdd
  12. 1) You have to enable clearInventory in HG_Config.h 2) Shops weren't made for Ravage mod specifically or survival game modes hence why they're missing fuel/damage saving, will think about it :) 3) Will add it as an option
  13. Hello @cupcake_actual I will add side whitelisting to shops, coming in the next update :)
  14. Hello @bl2ck dog Thank you! Make sure you have all the required stuff in initPlayerLocal.sqf, have you tried the provided mission in editor? Is it working? Hello @taro8 It will defeat the purpose of having different traders on map, exactly what it was designed for. For example you can have one trader that only buys handguns, another one for machine guns etc... If I add price per item types it means that you can sell everything to one trader. I know it's boring and time consuming to add classnames to configs but that's how it is right now. Thanks for your proposition though and hope you will still enjoy it :)
  15. Hello @katipo66 In scripts // First method private _hasEnough = [500] call HG_fnc_hasEnoughMoney; if(_hasEnough) then { // Do shit } else { // Am so broke... }; // Second method if([500] call HG_fnc_hasEnoughMoney) then { // Do shit } else { // Am so broke... }; In addAction condition you just use the function without assigning a variable to it. Yeah I can add something like this, nobody ever asked for it tho... maybe later :) Yes database extension (check HG_Config.h header): savingMethod = "extDB"; Don't know if it makes sense to use DB for singleplayer mission to you, it does to me (local database). Hello @nelo_riot It's pulled from the game configs automagically :) There's one function that retrieves right config based on passed classname (HG_fnc_getConfig) and then in the script I use the returned config to gather display name from the said config with the given classname. Hello @Azola21 Of course you can modify the script to sell vehicles in garage, but you must follow license terms and share your work. And yes it's possible to take ownership of editor placed vehicles with an addAction (https://github.com/Ppgtjmad/SimpleShops/wiki/Useful-Functions - Set vehicle ownership part) Simple example: this addAction ["I WANT this vehicle",{[(_this select 0)] call HG_fnc_setOwner},"",0,false,false,"",'(alive player) AND (alive _target) AND ((player distance _target) < 5.5)'];