Sinatrad Posted March 24, 2017 Report Share Posted March 24, 2017 I figured it out. I was a lazy scrub and wasn't packing the files into PBO's. I was just letting the server pack stuff. As soon as I PBO'ed everything it works fine. Serves me right for being scrubly. Many thanks to @salival for checking out my files and giving me a hand. salival 1 Link to comment Share on other sites More sharing options...
salival Posted March 24, 2017 Author Report Share Posted March 24, 2017 Glad we got the result we were looking for! Link to comment Share on other sites More sharing options...
WLF Posted March 25, 2017 Report Share Posted March 25, 2017 Will this script be implemented in the next release of Epoch? Link to comment Share on other sites More sharing options...
lwbuk Posted March 25, 2017 Report Share Posted March 25, 2017 Doubtful. Epoch devs have always said they didn't want single currency as a part of the game. However they realised many people like it, so added support for it. its so easy to add thanks to the guys who posted here that there is no need to add it to the vanillin files. salival 1 Link to comment Share on other sites More sharing options...
salival Posted March 25, 2017 Author Report Share Posted March 25, 2017 As @lwbukmentioned it won't be getting pushed to Epoch anytime soon. It's so easy to install if you follow the directions Link to comment Share on other sites More sharing options...
nzjocko Posted March 25, 2017 Report Share Posted March 25, 2017 Im wanting to add a rob banker option but I am pretty fresh with arma scripting, has anyone got a script similar or can assist me in writing one. Basically want it so that every banker also has an option to rob banker, how i picture this working is when rob banker action is done there will be a script that reads all players money in the bank It will then pick a random percentage say between 5% and 20% and use that to remove that percent of money from each players bank value and pay the robber the combined value in coins. Would like it so that once it has been done it cant be done again for the next 3 hours or set time it would also disable robbed banker for this same time so that the robber cant deposit using same banker and no one will be able to use robbed banker again until timer is up. would need to be some timer or action when activated so that the player robbing is stuck there taking time to rob but player can die before robbing action is completed which would stop the robbery. It would also publicly announce that banker {location description} is being robbed allowing players time to try stop the robber or rob him before he makes it to next banker to deposit. Link to comment Share on other sites More sharing options...
salival Posted March 26, 2017 Author Report Share Posted March 26, 2017 1 hour ago, nzjocko said: Im wanting to add a rob banker option but I am pretty fresh with arma scripting, has anyone got a script similar or can assist me in writing one. Basically want it so that every banker also has an option to rob banker, how i picture this working is when rob banker action is done there will be a script that reads all players money in the bank It will then pick a random percentage say between 5% and 20% and use that to remove that percent of money from each players bank value and pay the robber the combined value in coins. Would like it so that once it has been done it cant be done again for the next 3 hours or set time it would also disable robbed banker for this same time so that the robber cant deposit using same banker and no one will be able to use robbed banker again until timer is up. would need to be some timer or action when activated so that the player robbing is stuck there taking time to rob but player can die before robbing action is completed which would stop the robbery. It would also publicly announce that banker {location description} is being robbed allowing players time to try stop the robber or rob him before he makes it to next banker to deposit. While I think it's a pretty cool idea, I think that's terrible for an economy and will upset players Link to comment Share on other sites More sharing options...
juandayz Posted March 26, 2017 Report Share Posted March 26, 2017 @salival i have a question.. i not install yet but i need to know how add an remove coins. for example in 1.5 i was using it To remove coins for example: _cost = 500; if !([ player,_cost] call SC_fnc_removeCoins) then { titleText [format["Needs %1 %2 ",_cost,CurrencyName] , "PLAIN DOWN", 1]; } else { }; to add coins [player, 1000] call SC_fnc_addCoins; its the same in your new update or something has change? thats functions is still there? Link to comment Share on other sites More sharing options...
salival Posted March 26, 2017 Author Report Share Posted March 26, 2017 I'm not using those 2 functions at all, I do everything manually since where ever possible I design the scripts to be coins or briefcases. juandayz 1 Link to comment Share on other sites More sharing options...
juandayz Posted March 26, 2017 Report Share Posted March 26, 2017 Just now, salival said: I'm not using those 2 functions at all, I do everything manually since where ever possible I design the scripts to be coins or briefcases. ok, so if i want to do it.. i need replace that functions by a bunch of code about it.. right? tnks!! Link to comment Share on other sites More sharing options...
salival Posted March 26, 2017 Author Report Share Posted March 26, 2017 if you want to add coins to a player: _amount = 5000; _wealth = player getVariable[Z_MoneyVariable,0]; player setVariable[Z_MoneyVariable,(_wealth + _amount),true]; If you want to remove coins from a player: _amount = 5000; _wealth = player getVariable[Z_MoneyVariable,0]; player setVariable[Z_MoneyVariable,(_wealth - _amount),true]; That is providing they have the right amount to remove from them. You would do a check similar to this: if ((_amount < 1) or {_amount > _bank}) exitWith {format ["You can not withdraw more %1 than is in the %2.",CurrencyName,_displayName] call dayz_rollingMessages;}; where _bank would be the amount the bank has. juandayz 1 Link to comment Share on other sites More sharing options...
nzjocko Posted March 26, 2017 Report Share Posted March 26, 2017 36 minutes ago, salival said: While I think it's a pretty cool idea, I think that's terrible for an economy and will upset players yeah it would require a fine balance ie might need to be a max cap amount say if percent taken greater than cap then only take cap. or another way to balance it could be adding a banking interest system of some sort say the opposite of robbing ie every so many hours u earn interest of say 2~5 percent of what u have in the bank. Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 I've got a strange thing happening. Most of my players money save after restart but a select few get reset back. I have installed and reinstalled countless times now while banging my head into my desk. Any ideas would be helpful thanks. Link to comment Share on other sites More sharing options...
salival Posted March 28, 2017 Author Report Share Posted March 28, 2017 I have not seen any issues with saving for a while. Global banking? Vehicle banking? Have you applied all the updates as per github? Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 Global banking. Yes I reinstalled the most recent again today from github https://github.com/oiad/ZSC I was surprised myself to find this as it dont happen to me and some others, but as more new people join I get more and more reports of this happening. Link to comment Share on other sites More sharing options...
salival Posted March 28, 2017 Author Report Share Posted March 28, 2017 There should be no reason now that coins are not saving based on how i'm doing the saving, it's the same function that updates safe inventory etc Any RPT errors or hiveext.log errors? Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 Yes there is in hiveext.log never thought to look there still im still a noob. here is the error 2017-03-08 03:19:00 HiveExt: [Information] SQF Failed to pass both player coins and player bank values skipping update Link to comment Share on other sites More sharing options...
salival Posted March 28, 2017 Author Report Share Posted March 28, 2017 Well, I've never seen that and I don't have much experience with the hive, @icomrade any advice here? Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 @salival that's just my luck lol. Link to comment Share on other sites More sharing options...
lwbuk Posted March 28, 2017 Report Share Posted March 28, 2017 I have had that text, it idoesn't show an error, it's green and still says pass. I have had no reports from any players of missing coins at all either. Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 Ok so i rolled my server back 10 mins just to see what would happen. The error is gone but once the player dies/relogs/server restart there bank still gets reset back to the previous amount of coins. So they can now withdraw all there money from the bank, die loot coins from there body and would still have money they took out from the bank back in the bank. So I got one heck of a dupe going on lol wtf. Link to comment Share on other sites More sharing options...
salival Posted March 28, 2017 Author Report Share Posted March 28, 2017 I find it interesting that this is the first time it's come up, I would probably disable global banking till a resolution is found Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 4 minutes ago, lwbuk said: I have had that text, it idoesn't show an error, it's green and still says pass. I have had no reports from any players of missing coins at all either. say a player fills there bank if they have to relog the bank coins goes back to what it was previous before they filled it or however much the put in. Same thing with taking coin out it goes back to what it was before they removed the coin after a relog Link to comment Share on other sites More sharing options...
Hooty Posted March 28, 2017 Report Share Posted March 28, 2017 It does the same thing with safes is why i disabled them 2 minutes ago, salival said: I find it interesting that this is the first time it's come up, I would probably disable global banking till a resolution is found Link to comment Share on other sites More sharing options...
salival Posted March 28, 2017 Author Report Share Posted March 28, 2017 4 minutes ago, Hooty said: It does the same thing with safes is why i disabled them Well, I can't explain that. As I said it has to be something specific to your server, i.e a database issue or an install problem. Link to comment Share on other sites More sharing options...
Recommended Posts