• 0
BaroN

Rearm/Repair not deducting cost

Question

I use Dodo's exile rework of an old rearm/repair script which originated in DayZ Epoch. Part of that is a script that deducts poptabs. I have pasted it below.

/*
	Original HALV_takegive_crypto.sqf by Halv
	Copyright (C) 2015  Halvhjearne > README.md
	Edit to takegive_poptab.sqf for Exile by Dodo
*/

_player = _this select 0;
_costs = _this select 1;

_money = player getVariable ["ExileMoney", 0];
_money = _money - _costs;
_player setVariable ["ExileMoney", _money];
format["setAccountMoney:%1:%2", _money, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
[_player, "purchaseVehicleSkinResponse", [0, str _money]] call ExileServer_system_network_send_to;

I have had a number of attempts to get it to work again in 098 but end up with it either not deducting any poptabs or setting the players poptabs to the cost of the rearm/repair.

Can anyone tell me how to edit this to make it work in 098?

Thanks

Share this post


Link to post
Share on other sites

11 answers to this question

  • 0
42 minutes ago, BaroN said:

I use Dodo's exile rework of an old rearm/repair script which originated in DayZ Epoch. Part of that is a script that deducts poptabs. I have pasted it below.


/*
	Original HALV_takegive_crypto.sqf by Halv
	Copyright (C) 2015  Halvhjearne > README.md
	Edit to takegive_poptab.sqf for Exile by Dodo
*/

_player = _this select 0;
_costs = _this select 1;

_money = player getVariable ["ExileMoney", 0];
_money = _money - _costs;
_player setVariable ["ExileMoney", _money];
format["setAccountMoney:%1:%2", _money, (getPlayerUID _player)] call ExileServer_system_database_query_fireAndForget;
[_player, "purchaseVehicleSkinResponse", [0, str _money]] call ExileServer_system_network_send_to;

I have had a number of attempts to get it to work again in 098 but end up with it either not deducting any poptabs or setting the players poptabs to the cost of the rearm/repair.

Can anyone tell me how to edit this to make it work in 098?

Thanks

Looking on another post where there were money issues I believe this is what needs changing  - credit to @Raven-DMW it was on something he posted

Change _playerObj setVariable ["ExileMoney", _money]; 

TO

_playerObj setVariable ["ExileMoney", _money, true];

Have not tried it myself yet but worth a shot 

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted (edited)

hey, thanks for the answer and based on that exchange about the credit for killing zeds in exilez, that's exactly what I did but, then it sets the players poptabs to the cost of the repair or rearm. So, in my test, I had 1000 poptabs on me, spent 150 in repairing a quad and my poptabs then showed -150 when I was expecting it to say 850.

But, thanks again for your effort looking into it. :)

Edited by BaroN

Share this post


Link to post
Share on other sites
Advertisement
  • 0

anyone else suffering the same problem with repair/rearm and managed to fix the takegive_poptab.sqf file?

any help would be greatly appreciated :)

Share this post


Link to post
Share on other sites
  • 0

What we have noticed is if you have no money it still lets you repair / rearm but then when you go take money from your locker it takes the money off you for the repair lol

1 person likes this

Share this post


Link to post
Share on other sites
  • 0

oh, that's interesting. so you've got it pointing to the locker somehow.... have you managed to get it to work yet on your held poptabs?

Share this post


Link to post
Share on other sites
  • 0
19 hours ago, Honest Jon said:

What we have noticed is if you have no money it still lets you repair / rearm but then when you go take money from your locker it takes the money off you for the repair lol

can you share your takegive_poptab.sqf. I would rather go with this than as I currently have it which makes it free....

Thanks

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, BaroN said:

can you share your takegive_poptab.sqf. I would rather go with this than as I currently have it which makes it free....

Thanks

I can share if you like but it's literally the default one - haven't changed anything in it

Share this post


Link to post
Share on other sites
  • 0

oh ok man. no worries then.

But, what is it doing? You're saying that it still deducts the amount properly but, from your locker?

Share this post


Link to post
Share on other sites
  • 0

No - let's say I have 50 tabs on my character - I go to repair but that's not enough - it lets me repair.

i then go to my locker and withdraw 1000 tabs - it will deduct the amount owed from the money I withdrew - hope that make sense

Share this post


Link to post
Share on other sites
  • 0

On another note, this is making sense to me. On the current server i'm playing on, it also lets you repair/rearm for free, if you have no pops on you. But it seems the mod keeps that amount owed in memory somewhere, and as soon as you do any other kind of transaction, it deducts the amount owed.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.