Page 1 of 1

api command about balance reset

Posted: Sun May 17, 2015 2:18 pm
by dastgarmi
hi every reader
is there any command for reseting the balance? i cant fint it in the cammand list in help file.
also not the "Account/sResetBalance"

Re: api command about balance reset

Posted: Sun May 17, 2015 3:13 pm
by Kent Briggs
dastgarmi wrote:is there any command for reseting the balance?
AccountsEdit in the API.

Re: api command about balance reset

Posted: Mon May 18, 2015 8:39 am
by dastgarmi
thanks mr briggs
which one is?
should i use player and balance parameters and type 'reset' instead of amount?

Re: api command about balance reset

Posted: Mon May 18, 2015 9:19 am
by Kent Briggs
dastgarmi wrote:should i use player and balance parameters and type 'reset' instead of amount?
Amount has to be a number, whatever value you want to set it to.

Re: api command about balance reset

Posted: Mon May 18, 2015 9:50 am
by dastgarmi
So what is different with changing balance amount and resetting balance to the started balance?!

Re: api command about balance reset

Posted: Mon May 18, 2015 10:04 am
by Kent Briggs
dastgarmi wrote:So what is different with changing balance amount and resetting balance to the started balance?!
There is no difference. But there is already a function for doing that built into the client lobby menu if you have "Allow balance resets" enabled in the Account Settings group.

Re: api command about balance reset

Posted: Mon May 18, 2015 10:11 am
by Kent Briggs
I should add, the built-in reset function will first read the "Starting balance" value and make sure the player's balance is under that amount. If you want to replicate that part in your own script you would use the SystemGet command in the API to read the "BalanceStarting" property.

Re: api command about balance reset

Posted: Mon May 18, 2015 11:20 am
by Kent Briggs
One other difference I forgot: the LastReset field in the player's account settings gets reset to the current date and time when the internal feature is used. So you would also need to set that with AccountsEdit to duplicate the built-in reset function. That field is used when the "Balance reset minutes" greater than 0 to restrict how often a player can request a reset. You would have to perform your own check when making your own function.