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:
    123
    Likes Received:
    21
    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:
    111
    Likes Received:
    56
    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:
    123
    Likes Received:
    21
    I'll try. Thank you very much.
     
  4. zmitya

    zmitya Registered

    Joined:
    Jun 29, 2011
    Messages:
    84
    Likes Received:
    7
    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:
    84
    Likes Received:
    7
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,641
    Likes Received:
    3,223
    The Iron Wolf likes this.
  8. The Iron Wolf

    The Iron Wolf Member

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

Share This Page