auto move to company

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
flake
Engineer
Engineer
Posts: 66
Joined: 28 Apr 2004 10:07
Location: Salzburg
Contact:

auto move to company

Post by flake »

hello :)
me and my friends are playing all in one company on a dedicated server. its not a big hassle but everytime we join the server we need to rejoin the company.

one way i thought might work was, to let the script on_server_connect.scr move the connecting client to the corporation, but for that i need the connecting client id.
another way would be that all players who want to autojoin the company need to put a "join 1" into their on_client.scr, in theory... but that script is executed before you are actually in the game and results in a "Error: Not connected. This command is only available in multiplayer"
so my questions are: did i overlook something? is there a way ? and how are you all generally ? :)
*<(:-}
Varcanna
Engineer
Engineer
Posts: 1
Joined: 29 Nov 2021 12:00

Re: auto move to company

Post by Varcanna »

Hi,

using the following command line syntax:

openttd -n IP[:port][#CompanyID]

Example:

openttd -n 192.168.0.1:3979#1

would connect to 192.168.0.1 on port 3979 and joins company 1.

hoping it can help you.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests