[PLUS EMU] Update db without delay (credits,....)
Hey,
is it possible to update the database without delay?
For example:
I have 10.000 credits in client & homepage and I buy an item for 3 credits. Then I have 9.997 credits
in client but 10.000 at homepage because the emulator is updating the database with a delay. Is it possible to make that without delay?
Re: [PLUS EMU] Update db without delay (credits,....)
There is no actual delay, on Plus the credits spent whilst on the client don't get updated in the database until the user is disconnected. In order for credit spending functionality on the website to be synced up to the client, you'll need to utilize the MUS implementation and use sockets on your site to send corresponding data to the emulator when the credits are updated on the site. There's a MUS command within Plus already called "reload_credits" which takes a user id as a parameter, so you can just call that.
If you don't know how to do that, try adding this code snippet by leenster into your codebase and call the following when the user's credits are being updated:
PHP Code:
MUS("reload_credits","user_id_here");