Server Name in plugin

Discussion in 'Plugins' started by Jeferson Richart, Jul 19, 2018.

  1. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    Hello

    Does anyone know if I can get the server name variable in the internal plugin?

    Thanks
     
  2. Tygernoot

    Tygernoot Registered

    Joined:
    Feb 26, 2012
    Messages:
    114
    Likes Received:
    64
    The only way I know how to do this, is by extracting it from the actual server window.

    You have to do an EnumWindows() to get a handle to the window matching the rFactor processId, and then retrieve the game name from the static text element.

    Have a look at the source of my welcome plugin, I do something similar there to programmatically use chat feature: https://forum.studio-397.com/index.php?threads/welcome-message-plugin.30954/
     
  3. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    I'll try. Thank you very much.
     
  4. zmitya

    zmitya Registered

    Joined:
    Jun 29, 2011
    Messages:
    104
    Likes Received:
    16
    Hi Tygernoot!

    Your plugin works on the Dedicated server.
    Do you have a way how to get this info in the clients as well ?

    I need to know where is it connected...

    Regards,
    Mitya
     
  5. Josh.H

    Josh.H Registered

    Joined:
    Dec 19, 2013
    Messages:
    45
    Likes Received:
    9
  6. zmitya

    zmitya Registered

    Joined:
    Jun 29, 2011
    Messages:
    104
    Likes Received:
    16
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,345
    Likes Received:
    6,572
    The Iron Wolf likes this.
  8. The Iron Wolf

    The Iron Wolf Registered

    Joined:
    Feb 20, 2016
    Messages:
    984
    Likes Received:
    984
    Huge thanks for sharing this Lazza!
     

Share This Page