[PLUS EMU] Update db without delay (credits,....)

Results 1 to 2 of 2
  1. #1
    Apprentice spirit22 is offline
    MemberRank
    Jun 2016 Join Date
    9Posts

    [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?


  2. #2
    Member Mink is offline
    MemberRank
    Jun 2011 Join Date
    55Posts

    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"); 



Advertisement