Hey Plugin Devs,
I run the example plugin in multiplayer. Dedicated server + rfactor2.exe as client on the same PC.
I subscribed for
Remember: 0=no 1=player-only 2=all vehicles
I can see that my plugin is running twice (dedicated server + game client).
I am writing a TGPluginTelemetryOutput_xxx.txt file where x is a random number generated on Startup().
So I end up with a file written by the dedicated server and one file written by the game client.
My question is how can I distinguishing between the dedicated server and the game client in my code.
My goal is to define if the plugin runs for dedicated server only, game client only or both.
I cant find anything in the plugin api. I think i would need to find out the process name (if "rfactor2.exe" then its the game, if not its the dedicated server). Is there a better solution?
Hope my question is clear.
Thank you and merry x-mas!
Frey
I run the example plugin in multiplayer. Dedicated server + rfactor2.exe as client on the same PC.
I subscribed for
Code:
WantsTelemetryUpdates() { return(2); }
I can see that my plugin is running twice (dedicated server + game client).
I am writing a TGPluginTelemetryOutput_xxx.txt file where x is a random number generated on Startup().
So I end up with a file written by the dedicated server and one file written by the game client.
My question is how can I distinguishing between the dedicated server and the game client in my code.
My goal is to define if the plugin runs for dedicated server only, game client only or both.
I cant find anything in the plugin api. I think i would need to find out the process name (if "rfactor2.exe" then its the game, if not its the dedicated server). Is there a better solution?
Hope my question is clear.
Thank you and merry x-mas!
Frey