Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Quengis

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Everything posted by Quengis

  1. Hello, I recently started mission scripting in arma 3 and wanted to create a money system and a vehicle shop for multiplayer. but my friends balance is 650 and mine is 100 even though i set my variable: cash = 100. i need some help with this here's my script in init.sqf: cash=100; shop1 addAction ["Count Cash Balance", {hint format ["Your Balance is: $%1", cash];},[],6]; shop1 addAction ["Buy Prowler (Unarmed) for $75", {if (cash >= 75) then { cash=cash-75; shop1 sideChat "Thank you for your purchase!"; dude1 = "B_LSV_01_unarmed_F" createVehicle getMarkerPos "garage_1";} else{ shop1 sideChat "Not enough money";}}]; shop1 addAction ["Buy Hunter (GMG) for $300", {if (cash >= 300) then { cash=cash-300; shop1 sideChat "Thank you for your purchase!"; dude1 = "B_MRAP_01_gmg_F" createVehicle getMarkerPos "garage_1";} else{ shop1 sideChat "Not enough money";}}]; shop1 addAction ["Buy IFV-6c Panther for $550", {if (cash >= 550) then { cash=cash-550; shop1 sideChat "Thank you for your purchase!"; dude1 = "B_APC_Tracked_01_rcws_F" createVehicle getMarkerPos "garage_1";} else{ shop1 sideChat "Not enough money";}}]; shop1 addAction ["Buy AMV-7 Marshall for $1000", {if (cash >= 1000) then { cash=cash-1000; shop1 sideChat "Thank you for your purchase!"; dude1 = "B_APC_Wheeled_01_cannon_F" createVehicle getMarkerPos "garage_1";} else{ shop1 sideChat "Not enough money";}}];
  2. turns out that i'm back here again. here's the thing: I was testing with the same friend in my test server, and it was absolutely fine meaning that i got the same amount of money. (note that i hosted the server using server browser) then comes my real mission, which i implemented the new script. (also hosting it using server browser) init.sqf: _pricelist = [["B_LSV_01_unarmed_F",75],["B_MRAP_01_gmg_F",200],["B_APC_Tracked_01_rcws_F",550],["B_APC_Wheeled_01_cannon_F",1000],["B_MBT_01_cannon_F",3500],["B_APC_Tracked_01_AA_F",4000]]; TAG_fnc_changeMoney = { params ["_unit","_amount"]; _currentMoney = _unit getVariable ["TAG_fnc_money",0]; if (_currentMoney + _amount < 0) exitWith { hint "Not enough money";false }; _newAmount = _currentMoney + _amount; _unit setVariable ["TAG_fnc_money",_newAmount]; hint format ["You %1 $%2. You now have $%3.",["spent","received"] select (_amount > 0),abs _amount,_newAmount]; true }; TAG_fnc_addVendorItem = { params ["_vendor","_item","_price"]; _itemName = getText (configFile >> "CfgVehicles" >> _item >> "displayName"); _vendor addAction [format ["Buy %1 - $%2",_itemName,_price],{ params ["_vendor","_buyer","_ID","_arguments"]; _arguments params ["_item","_price","_itemName"]; _canBuy = [_buyer,-_price] call TAG_fnc_changeMoney; _message = "I'm afraid you can't quite afford that."; if (_canBuy) then { _message = format ["Enjoy your new %1, %2!",_itemName, name _buyer]; _item createVehicle getMarkerPos "garage_1" }; _vendor sideChat _message; },[_item,_price,_itemName],1.5,true,true,"","_target distance2D _this < 3"]; }; //add items and radio to vendor _vendor = shop1; if !("ItemRadio" in assigneditems _vendor) then {_vendor linkItem "ItemRadio"}; { [_vendor,_x#0,_x#1] call TAG_fnc_addVendorItem } forEach _pricelist; i made my mission so that we receive 200 dollars at a certain point in the mission, having a notification. the only thing was my friend got money from the start, getting his notification saying that he had 550 dollars. He also did not have the debug console. i need help again 😕
  3. thanks, i tested it with my friend and it works now, we have different balances and everything is good. thanks for your help Quengis
  4. whats the file name i should put this in? nevermind, im stupid
  5. no like seriously, im making a mission using cash, and i set the cash for 100 for all of us, testing it he somehow gets more. im super confused. even when i set cash to 0 he gets 550
  6. Hello, I am making this scenario that you escape the hostage base. There is a problem. If the person jumps on the truck that is next to the base, he is cheating. How do I disable the person from getting into the truck?
  7. Hello, So I am working on this multiplayer mission. I use the revive and test. But if I get shot the force respawn button pops up and dissapears right away. I scroll down if it says force respawn but there is no force respawn on the action tab. I also took off this addon and it still down't work. What should I do?
×