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"
api command about balance reset
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: api command about balance reset
AccountsEdit in the API.dastgarmi wrote:is there any command for reseting the balance?
Re: api command about balance reset
thanks mr briggs
which one is?
should i use player and balance parameters and type 'reset' instead of amount?
which one is?
should i use player and balance parameters and type 'reset' instead of amount?
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: api command about balance reset
Amount has to be a number, whatever value you want to set it to.dastgarmi wrote:should i use player and balance parameters and type 'reset' instead of amount?
Re: api command about balance reset
So what is different with changing balance amount and resetting balance to the started balance?!
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: api command about balance reset
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.dastgarmi wrote:So what is different with changing balance amount and resetting balance to the started balance?!
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: api command about balance reset
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.
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: api command about balance reset
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.