Jump to content

Zombeast250

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Everything posted by Zombeast250

  1. Previev for store system/safezone
  2. ARMA 3 my issue is i have a custom script for store items my store works great so far but i have a issue where when i buy a item it will take my money even without giving me the object i am trying to buy because of no space in inventory i have a working store script & a working (check inventory script) i was wondering if i am able to merge the two scripts ??? any help would be great TY ALSO: the items i am calling are for Ravage Mod (if that matters) *MY: init.sqf: money = 0; * Player addaction/unit/custom store TRIGGER: this addAction ["(Tent Folded) $500","scripts\store_systems\gear\gear(TentFolded).sqf"]; *Item/store/ script NAME: gear(TentFolded).sqf *Item/store/ SCRIPT(please help merge the 2 scripts below this line)####### _cost=500; if(money >= _cost) then { money=money-_cost; hint "-$500", player additem "rvg_foldedTent"; }else{ hint "You Need More $$$"; }; *Script i have for checking carry weight (works alone off same trigger when added to My gear(TentFolded).sqf) if (player canAdd "rvg_foldedTent") then { player addItem "rvg_foldedTent"; } else { hint "Not enough space"; };
  3. so i changed player addAction ["Open Wallet", {................... to this addAction ["Open Wallet", {.............. and the wallet system is now WORKING!!! ,keeping track of purchases and prompt to check wallet for balance (ALL WORKING) the script for the store system seems to do all CHECKS proper (check carry weight &&& money/balance before allowing purchase) i am soo happy THANK YOU DUDE!!! you are the man!!! now to get to work making the store come to life with items @Grumpy Old Man YOU ARE A TRUE LEGEND glad to have met you friend :) Cheers!
  4. not sure if you seen this so i will repost :) i am using this in the players init: and get no errors but it does nothing in game
  5. @Grumpy Old Man friend i just wanted to say "You Are A LEGEND" thank you for all the help and writing a new store/system for my mod finding good help in any modding community can be difficult Thank You SOOO much for your patience with my Noobness :) with help like you in the community i think we will be fine :) ALSO the script works great TY
  6. i placed that into the init on my unit/player and no errors BUT it does nothing in game no hint
  7. thank you soo much that was the FIX i only need to know now (with the new money system) how do i call a wallet to check money balance? i was using in my player/unit init : player addAction ["Open Wallet", {hint format ["Money: %1",money];},[],6];
  8. i now see it was calling _exchange i have fixed it to _purchase now i get no errors but THIS:::(takes my money and says hint but no item)
  9. im using that last script/ TAG_fnc_moneySystem.sqf that you posted with ::: gear(TentFolded).sqf and in that i have:: _purchase = [player,"rvg_foldedTent",500] call TAG_fnc_buyItem; if (_purchase) then {systemchat "Purchase successful!"} else {systemchat "Purchase failed!"}; and when i try to buy the tent i get this ERROR (i am using Ravage Mod & CBA_A3)
  10. i keep thanking you grumpy for the help i do much appreciate the help sry friend to keep you waiting while you are helping me i was up till 6am with this problem till i finally crashed :) so i changed the TAG_fnc_moneySystem.sqf THIS CODE: : : (and made sure it is using _purchase) TAG_fnc_buyItem = { params ["_unit","_item","_cost"]; if !(_unit canAdd _item) exitWith {systemchat "Not enough space!";false}; _purchase = [_unit,- _cost] call TAG_fnc_changeMoney;//notice the negative sign of the cost, will be handled in here instead of having to keep track of it everywhere else if !(_purchase) exitWith {systemchat "Not enough money!";false}; systemchat ["Congratulations on your new %1",_item]; true }; TAG_fnc_changeMoney = { params ["_unit","_amount"]; _currentMoney = _unit getVariable ["TAG_fnc_money",0];//returns 0 money if the unit has non, current amount otherwise _newMoney = _amount + _currentMoney; if (_newMoney < 0) exitWith {systemchat "The transaction would set your balance below 0!";false}; _unit setVariable ["TAG_fnc_money",_newMoney,true]; systemchat "Money balance changed:"; systemchat format ["You now have %1$",_newMoney]; true }; moneycase.sqf (works great as i said and seen in pic +5000) but when i try to purchase the Tent Folded it takes my money & I get this ERROR:
  11. moneycase.sqf so this works for my add money pile: TY _object = _this select 0; deletevehicle _object; playsound "scoreAdded"; [player,5000] call TAG_fnc_changeMoney; hint "+$5000"; just need to figure out the wallet: i just got this::: ERROR:::: when i try to buy the Tent Folded in gear(TentFolded).sqf INSIDE :::::: gear(TentFolded).sqf _purchase = [player,"rvg_foldedTent",500] call TAG_fnc_buyItem; if (_purchase) then {systemchat "Purchase successful!"} else {systemchat "Purchase failed!"}; and that calls::::::::: TAG_fnc_moneySystem.sqf code inside that .sqf saays " TAG_fnc_buyItem = { params ["_unit","_item","_cost"]; if !(_unit canAdd _item) exitWith {systemchat "Not enough space!";false}; _purchase = [_unit,- _cost] call TAG_fnc_changeMoney;//notice the negative sign of the cost, will be handled in here instead of having to keep track of it everywhere else if !(_exchange) exitWith {systemchat "Not enough money!";false}; systemchat ["Congratulations on your new %1",_item]; true }; TAG_fnc_changeMoney = { params ["_unit","_amount"]; _currentMoney = _unit getVariable ["TAG_fnc_money",0];//returns 0 money if the unit has non, current amount otherwise _newMoney = _amount + _currentMoney; if (_newMoney < 0) exitWith {systemchat "The transaction would set your balance below 0!";false}; _unit setVariable ["TAG_fnc_money",_newMoney,true]; systemchat "Money balance changed:"; systemchat format ["You now have %1$",_newMoney]; true }; as you can see (from the pic) the money case is adding $5000 then when i got to hit the trigger at the trader/unit/trigger/store it gives the error & still charged me $500 for the Tent Folded trigger init:::::: this addAction ["(Tent Folded) $500","scripts\store_systems\gear\gear(TentFolded).sqf"];
  12. Thank you sooo much for your help/re-write of the scripts (if i ever get to publish a mod :) i will credit you for your scripts so with my last script i was using money as the( money NAME) so in the init.sqf i was calling ::: money = 0; to keep track of WALLET on the player/unit init i was using ::: this addAction ["Wallet", {hint format ["$%1",money];},[],6] and on custom money piles/case (to pick up money) model/init: this addaction ["Take Case Of Money","scripts\money\add_moneycase.sqf"]; & finally in the add_moneycase.sqf :::: _object = _this select 0; deletevehicle _object; playsound "scoreAdded"; money = money + 5000; hint "+$5000"; (((i would love to keep a similar system to be able to have money added???)))(((but whatever works)))
  13. thank you for your time :) i can see you have put some work into this i was just wondering how do i implement these lines of code / where do i add this as this is a complete change to my system ?
  14. also going from a check to exit is definitely not a good way to start??? if !(player canAdd "rvg_foldedTent") exitWith { hint "Not enough space";
  15. so i just took the weapons and ammo away from the player and it only does the........ hint "Not enough space"; so i killed npc and took his vest (to make space) and same problem ???
  16. so i have tested that code and it seems to do a check (IF) the player has no items in inventory and display message "hint "Not enough space";" works once player has items in inventory (they spawn with a pistol & ammo) it does not do a check for space and goes to taking players money & still nothing in inventory
  17. LOL because when i look through my folder the names pop more (no reason) i think it is because the folder names kept changing lol please help
×