Set when we join or leave a server

Discussion in 'Plugins' started by Jeferson Richart, Apr 5, 2022.

  1. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    Is there any way to set by plugin when we joining and leaving a server?

    I thought the example plugin's Shutdown option would run when we exit the server, but it actually only runs when the game is closed.

    I saw that there is another option in the command list (ScreenInfoV01) that could help me:

    unsigned char mOptionsLocation; // 0=main UI, 1=track loading, 2=monitor, 3=on track

    But I couldn't get it to work.
    All other options that I tested, such as UpdateScoring only run while we are on the server, but there is no trigger executed for example before leaving the server, which would also help me.

    If anyone knows how to make this option above work or has some other solution, I would appreciate it.
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    @Jeferson Richart have you tried Unload() ?

    upload_2022-4-6_6-32-23.png

    (I don't know, as I've not tried to have anything running when exiting a server. But I'd be checking that one)
     
  3. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    Wow, this works.
    I have not seen it.

    Thanks
     
  4. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    @Lazza ,
    I'm going to take advantage and ask you for one more help. Do you know how to use

    struct PhysicsOptionsV01

    I can't get information about the activated helps.

    Thanks
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    I've never put any code in that one so I have no idea when it's called, sorry.
     
    Jeferson Richart likes this.

Share This Page