Git Product home page Git Product logo

beammp-server's Introduction

BeamMP

A Lua mod bringing online multiplayer to BeamNG.drive!

Important Links

Contents

Installation

Click here for a step-by-step guide on how to install the mod on Windows.

The BeamMP mod has been made as simple as it gets. Just head over to our website (BeamMP.com) and click download. This will download a zip file which contains the installer exe. Just run that exe and follow the instructions. Once this completes all you need to do is double click the shortcut on your desktop.

Now you can play by clicking "Play" and then "Multiplayer", logging in with either a guest account or a BeamMP Forum account. Then just select a server to play on! That's it! :)

If you need help at any point, see the troubleshooting section. There are instructions there on how to get support from our dedicated support team.

Servers

Click here for a step-by-step guide on how to set up and run a server for you & your friends.

The server is usable free of charge for non-commercial use, and the source code is available on GitHub.

Please check out docs.beammp.com for a guide on how to setup your own server. If you run into issues, join the official Discord or join us via IRC in #beammp on irc.libera.chat (webchat link).

How does it work?

This section is a technical explanation of the inner workings of the project and is not relevant for most players.

The Launcher is a separate program which starts the game and connects to the Lua mod right away. The launcher then connects to a remote server of your choice, and these two communicate. The launcher then forwards some packets to the game, like car positions, rotations, chat messages, etc.

For more information on how the launcher and server operate, you can read the source code (C++) in their respective repositories:

Roadmap

You can see and keep track of development, planned features, etc. Here or on the GitHub Issues section of each repository.

Additionally, you can join the Discord, where regular updates are posted! Also there is our community Forum, where we post additional details.

Troubleshooting

If none of these fix your issue, we have a dedicated support team on our Discord, and our Forum

Support

The BeamMP project is supported by community donations via our Patreon This brings perks such as Patreon-only channels on our Discord, Early access to new updates, and more server keys.

Translations

BeamMP makes an effort to be maintained for multiple languages. The current progress of this sits at: gitlocalized We use GitLocalize for managing this. You can contribute if you wish here: https://gitlocalize.com/repo/9181.

The individual language progress is as follows:

Language Badge
German gitlocalized
Spanish gitlocalized
French gitlocalized
Japanese gitlocalized
Korean (South Korea) gitlocalized
Polish gitlocalized
Portuguese (Brazil) gitlocalized
Portuguese (Portugal) gitlocalized
Russian gitlocalized
Chinese gitlocalized

beammp-server's People

Contributors

20dka avatar aeroc7 avatar alexita1100 avatar anonymous-275 avatar jimkoen avatar jojos38 avatar lionkor avatar lucky4luuk avatar mack29446 avatar max5800 avatar mio-19 avatar neptnium avatar officiallambdax avatar qest333 avatar redracerturbo avatar rgnter avatar saltysnail avatar scisdev avatar sla-ppy avatar starystars67 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

beammp-server's Issues

Can't build the server on Raspbian, is there any solution?

Fill out general information
OS (windows, linux, ...): Raspbian Buster
BeamMP-Server Version: v2.2.0

Describe the bug
I believe this is an issue with the dependency libboost1.70-all-dev. The latest version available to install is libboost1.67-all-dev. I have this installed. However, after running make the build terminates with the following error:

/home/pi/Documents/BeamMP Server/BeamMP-Server/src/Http.cpp:9:10: fatal error: boost/beast/ssl.hpp: No such file or directory
 #include <boost/beast/ssl.hpp>

To Reproduce
Steps to reproduce the behavior:

  1. Start up a Raspberry Pi with Raspbian Buster installed and everything updated.
  2. Try to install the dependencies for building. Note that libboost1.70-all-dev is not available.
  3. Clone the git repo and checkout tags/v2.2.0
  4. Run cmake . and then make

I realise that this isn't really an issue with BeamMP-Server and more a lack of compatibility. However, one official page said that the server had been run on a Raspberry Pi. If it is possible, then how can I do it? Do I need to build from source on a different OS, or run a different OS on my Pi altogether? Or something else?

If it isn't possible, please let me know. I can try and find another way to host the server.

Thanks!

Update docs for debian boost library

Debian is listed as the supported OS, not ubuntu. In ubuntu it’s really easy to add a ppa but in Debian 10 I could not get it to work. Also ubuntu PPAs are not supposed to be supported or used in Debian. I ended up downloading boost 1.70 from source forge and compiling it. Maybe want to add a note about that.

Install Script

Hello I have written an installer script which might be interesting because I noticed that some have to set up the server.
This script contains

  • A test if all important things are installed
  • The option to download only the server
  • The option to run another script to run the server
  • The option to install both

to find the whole thing:
Kiznaiver system´s GitHub
I just want to support the whole project

[Feature Request] Show TID/PID in Debug mode

The server should show TIDs of threads in order to aid in production-debugging of high cpu usage.

It should look something like

Thread "MyThreadName" is TID 123456

This is easily done by adding it to the thread name registration stuff.

Issue loading liblua5.3.so

./BeamMP-Server-linux
./BeamMP-Server-linux: error while loading shared libraries: liblua5.3.so.0: cannot open shared object file: No such file or directory
ls /usr/lib64/liblua*
/usr/lib64/liblua-5.1.so /usr/lib64/liblua-5.2.so /usr/lib64/liblua-5.3.so /usr/lib64/libluajit-5.1.so.2 /usr/lib64/libluajit-5.1.so.2.0.4

Please could you advise further on how I can fix this?

Thanks

[Feature Request] Lua state reload

Is your feature request related to a problem? Please describe.
Hotreload based on file changes is a nice feature, but it's not something that should be relied on, I would like a more direct "reload x state" feature

Describe the solution you'd like
It could make use of the new console command system with a reload [stateName] syntax for example

[Feature Request] 2.4.0: Show Quotes around strings in `print(table, ...)`

When printing a table, strings and numbers are indiscernible.

Example:

local mytable = {
    a = "123",
    b = 123
}

print(mytable) gives:

[[table: 0x7f6948001d90]]: {
	b: 123,
	a: 123,
}

As can be seen, the string and number look the same.

We can either:

  1. Show the type
  2. Just print quotes around strings
  3. both

`rapidjson` needs to go

Tencent's rapidjson is a crashy buggy json parser, and by modern standards its not even fast ("rapid" my ***).

Every usage of rapidjson needs to be replaced with nlohmann/json where possible, and simdjson where raw speed is necessary (many times faster than rapidjson).

Segmentation Fault on connecting

When I try to join with BeamMP Client I get:

> Segmentation fault

image

Originally posted by @mnebeker in #7 (comment)

EDIT: Here's a temporary workaround:
Either:

  1. Download a binary for Debian 10: https://github.com/BeamMP/BeamMP-Server/releases/tag/v1.20-linux
    or:
  2. Build like this:
git reset --hard
git checkout tags/v1.20
cmake -S . -B bin -DCMAKE_BUILD_TYPE=Release
make -j 4 -C bin

It might complain about cmake version, in which case you have to remove the first like of CMakeLists.txt.
It might complain about lua, in which case you have to change "lua" to "lua5.3" in the non-Win32 target_link_libraries command in CMakeLists.txt.

This seems quite difficult to fix, and we're working on it. The issue will be closed as soon as that fix is out. You can Subscribe to this issue on the right to be notified of any changes or updates. Sorry for the inconvenience.

[Bug] Server hangs when input is received in the console window

Fill out general information
OS (windows, linux, ...): Windows 10
BeamMP-Server Version: 2.2.0

Describe the bug
Server hangs when input is received in the console window

To Reproduce
Steps to reproduce the behavior:

  1. Start BeamMP-Server
  2. Type into console window
  3. Try to connect to server

Expected behavior
Server should not hang when input is received in the console window

Logs
BUG-Server.log

Additional context
N/A

Minimum Requirements

I've looked around the documentation and couldn't find it - what are the recommended specs for hosting a server as far as CPU/RAM? Sorry if I missed it somewhere.

`make` fatal error: any: No such file or directory

Hi, when I run make command in BeamMP-Server directory after running cmake . and with all dependencies installed I get this error in the console :

In file included from /root/BeamMP-Server/src/Console.cpp:9:0:
/root/BeamMP-Server/include/Lua/LuaSystem.hpp:10:15: fatal error: any: No such file or directory
 #include <any>
               ^
compilation terminated.
CMakeFiles/BeamMP-Server.dir/build.make:94: recipe for target 'CMakeFiles/BeamMP-Server.dir/src/Console.cpp.o' failed
make[2]: *** [CMakeFiles/BeamMP-Server.dir/src/Console.cpp.o] Error 1
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/BeamMP-Server.dir/all' failed
make[1]: *** [CMakeFiles/BeamMP-Server.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2

I'd be thankful for any help or advice !

[Bug] Segmentation Fault in Docker

Hi all, I'm trying to build a docker image for this binary, both for my convenience and to learn a little more about Docker. Here is the current version of my Dockerfile.

RUN \ if [ -z ${BEAMMP_RELEASE+x} ]; then \ BEAMMP_RELEASE=$(curl -sX GET "https://api.github.com/repos/BeamMP/BeamMP-Server/releases/latest" \ | awk '/tag_name/{print $2;exit}' | sed 's/\x22//g' | sed 's/,*$//g'); fi \ && \ mkdir -p /app && \ curl --location --progress-bar \ -o /app/BeamMP-Server https://github.com/BeamMP/BeamMP-Server/releases/download/${BEAMMP_RELEASE}/BeamMP-Server-linux

This works, the binary downloads, running file on it returns as a Linux binary. Running it however, pops a segmentation fault error. Could this be an architecture/OS issue? The image is using Ubuntu.

[Bug] Test Issue for Discord webhook

Fill out general information
OS (windows, linux, ...):
BeamMP-Server Version:

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Do x ...
  2. Do y ...

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Please attach the Server.log from the run in which the issue appeared, preferably with Debug turned on in the ServerConfig.toml.

Additional context
Add any other context about the problem here.

UDP Improvements

The way UDP messages are currently handled is less than optimal.

Two major improvements are to be considered & implemented:

  • Binary serialization between Launcher & Server, deserializing properly into json for the clientside to handle in Lua.
  • UDP packet numbering/timestamping to avoid out-of-order packets being processed. When a new packet arrives and it was sent later than the last packet we processed, the new packet should be discarded ("stale").

Whitespace prepending message for the onChatMessage event.

I have found in the latest update of the server that there is prepended whitespace on the message parameter of the onChatMessage event in the Lua scripting interface.

Can we get this removed so that we do not need to trim the string before use?

Reverse Proxy server w/ Traefik

Hey all, trying to use a reverse proxy (traefik) to be able to connect to the beammp server. Here are my traefik labels.

 - --entryPoints.tcpbeammp.address=:30814                                                                                
 - --entryPoints.udpbeammp.address=:30814/udp                                                                            
 - "traefik.enable=true"                                                                                                 
 - "traefik.docker.network=proxy"                                                                                        
 - "traefik.tcp.services.beammp.loadbalancer.server.port=30814"                                                          
 - "traefik.tcp.routers.beammp.rule=HostSNI(`beammp.domain.us`)"

I can connect fine locally, but my friends get a "connection refused" error. I know this could be a plethora of things beyond beamMP, but I was hoping someone has done this before here and could just guide me to a working example. Cheers.

[Feature Request] Enable macOS Toolchain Compatibility

Is your feature request related to a problem? Please describe.
Currently the 'BeamMP-Server' project will not compile on macOS Monterey with Apple Clang 12.0.
I assume this is a systemic issue and won't work across all macOS versions, since macOS is rarely a compile target
in C++ application development.

Describe the solution you'd like
Either a project that works with the macOS toolchain (Clang/Cmake) and compiles on Mac or a docker based build and test environment that includes all dependencies needed to build BeamMP-Server, as well as run and test it in the container.
(Keywords are automated testing and platform independence)

[Feature Request] Add "Server ready" and "Server terminated" status messages to console output

Using BeamMP pre-compiled Linux dynamic 2.0.3 on Debian 10 with AMP.

I'm working on integrating the BeamMP server into CubeCoders' AMP platform and am running into problems with BeamMP's console output being inconsistent. AMP has a feature that parses console output and displays it in its web interface, and it uses Javascript-style regexes for parsing the console. It requires the regexes to match an entire line of output (so starts with ^ and ends with $. While I've been able to develop regex patterns to match what the BeamMP server is outputting, there are a few potential changes to the output that would make it easier to parse, so this is a feature request to clean up the console output.

First, the beginning of the output line seems to be variable - sometimes it's prefixed by "> ", sometimes not. I haven't figured out what determines whether it outputs the > or not, but can it be made more consistent? This is followed by a consistent pattern of "{ESC}[2K{ESC}[1000D" where {ESC} is the single Unicode escape character U+001B. What is the purpose of the escape codes? Can they be removed or suppressed?

Also, would it be possible to add more consistent "Server is started/ready" and "Server terminated/exited" messages? When starting up, I have to check for two different versions of the final "authenticated" messsage depending on how long the server was down - it either shows "Authenticated!" or "Resumed authenticated session!" - which makes for a rather long regex expression. Similarly, when stopping the server via SIGTERM, the last message the server outputs is "please wait while all subsystems are shutting down..." but never signifies that that has happened - how long does that process normally take to complete? Can I assume that the server is terminated when I see the "please wait" message, or do I have to wait for it to finish?

Lua can segfault the server

I just discovered that Lua is able to segfault the server. It would be nice if we could at least prevent common failures.
Typing print(nil) in the console kills it, for example.
I wonder if you can do this from client-side code that interacts with the server's Lua API?

Can we fix this?

[Feature Request] ServerConfig hot-reload

The server config should hot reload on change, maybe optionally.

Servers running as services (e.g. systemd) run without stdin and thus its impossible to turn on debug without a custom plugin doing it for you.

Allow Custom IP to bind to

Currently you can specify a custom IP via the first argument to the server. It's then subsequently ignored by the backend.

The entire thing needs to be an optional config setting, and then be bound to with bind() so that we can ensure the IP is actually owned by the server.

[Bug] 2.4.0: BeamMP ID not available at the time of onPlayerAuth

This makes banning a player based on their forum account not "properly" possible. The options are to ban based on username, or to kick them after they pass onPlayerAuth. The issue with the latter is the kick message doesn't get passed through to the joining client, they just get stuck loading

[Documentation] Documentation for the MP Lua methods

Is your feature request related to a problem? Please describe.
When developing a Server side resource using Lua with a "smart" IDE that has autocompletion, the MP table is not documented which leads to the IDE not knowing about the methods existance.

Possible implementations
We could use some kind of Lua doc extension that can also document C++ code. When researching I found LDoc, a rich documentation tool that also supports documenting C-like code.

Lua on Linux: std output file is closed

  local tableFile = readJson(rootPath .. fileID .. "/" .. jsonFile .. ".json")
  if tableFile == nil then
    local file, err = io.open(rootPath .. fileID .. "/" .. jsonFile .. ".json", "w")
    io.output(file)
    io.write('{"' .. tableKey .. '": null' .. "}")
  end

Fails on io.write.

image

[Feature Request] Player Join Queue

Problem and first solution consideration

When joining a full server, the player gets rejected and has to refresh the server list constantly, if they want to get in.
The alternative I propose is a queue, which a player joins as soon as they try to enter a full server.

Implementation Summary

When joining a full server, the server puts the player with all their data (sockets, name, id, etc.) into a queue. On onPlayerDisconnect, the queue is checked and, if not empty, the first player in the queue gets joined into the server like usual.

When the queue gets smaller (thus advancing everyone still in queue), each player gets notified via a reliable message that their position in the queue changed from X to Y.

While the player is waiting in queue, the client-side shows a dialog, allowing the player to see which place in the queue they are. An option exists for the player to cancel the queuing. Queuing is the default behavior.

When the server closes, the people in the queue automatically get kicked back to the server list. They get a normal disconnect packet, or something else, depending on what is specified.

Supported Activities

A1: Player joins a full server, gets put into a queue, gets an ID
A2: Player advances in a queue
A3: Player cancels the queuing
A4: Server closes during queuing, disconnecting all players
A5: Server API triggers moving a player in the queue (to the start, position X etc.)

API Events

  • onPlayerEnqueue triggered on A1
  • onPlayerQueueCancel triggered on A3
  • onPlayerMoved triggered on A2, A5

API Functions

Lots of TODO here

  • MP.MovePlayerInQueue(player, newIndex)
  • MP.GetQueueSize()
  • MP.GetQueue()
  • ...

[Feature Request] Provide health endpoint

Is your feature request related to a problem? Please describe.
No it is not related to a bug, it is a suggestion for improvement.

Describe the solution you'd like
Some kind of endpoint through which I can check the health of a running server (without evaluating the log).

Describe alternatives you've considered
Evaluating the log.
Query something to the query port?

Additional context
I am working on improving the docker container for beammp and what I am missing is a health status of running server. In case of a misconfiguration or similar it can happen that the server is running but in a faulty error state.

Open questions
Is there even an "error state" that the server can reach where the server process continues to run without aborting with an error code.

[Feature Request] Time trial Ghost cars could be possible with BeamMP's already available code

Is your feature request related to a problem? Please describe.
Not with a BeamMP problem. But with the lack of a feature within BeamNG thats requested for many years now by the community
e.g.
https://beamng.com/threads/race-yourself-ghost-replay-option-soon.81588/
https://www.reddit.com/r/BeamNG/comments/leld0z/having_time_trial_ghost_cars_in_beamng_would_be/

Describe the solution you'd like
BeamMP already has the code to recreate the driving of another player. Which is the multiplayer. In my mind it should be possible, with the already given code, to have the player able to record his own driving and then play it back. So the server would spawn the same car and apply the recorded behaviour on it, so that the player would then be able to race himself. Technically the server, client or something in between the client and server would save the packets and then reexecute them on command.

If the simplistic physics would also be enabled by the player then he wouldnt even crash into himself. Therefore we would get that ghost cars feature, which got requested by the community over the years.

Describe alternatives you've considered
An Alternative would be that the BeamNG devs implement that into the base game

Additional context
There could be a UI app, with a few buttons. Record, Stop recording, Start replay, Stop replay.

Its just an idea, where i think that is possible within BeamMP and that would satisfy the racing community. It definitly would satisfy me.

Hard crash on `TServer::Apply`

  • OS: Ubuntu 20.04.2 LTS
  • Server Version: v2.1.3 (master branch)

Attached is the 130 MB (!) server log. The server was running west_coast_usa.

The error itself is

terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 0)

The gdb backtrace of the crash is

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7895859 in __GI_abort () at abort.c:79
#2  0x000055555577f43a in __gnu_cxx::__verbose_terminate_handler() [clone .cold] ()
#3  0x000055555589d94c in __cxxabiv1::__terminate(void (*)()) ()
#4  0x000055555589d9b7 in std::terminate() ()
#5  0x000055555589db19 in __cxa_throw ()
#6  0x0000555555780da0 in std::__throw_out_of_range_fmt(char const*, ...) [clone .cold] ()
#7  0x0000555555920d73 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const ()
#8  0x0000555555796668 in TServer::Apply (c=..., VID=0, pckt=...) at /root/BeamMP-Server/src/TServer.cpp:318
#9  0x000055555579361e in TServer::ParseVehicle (c=..., Pckt=..., Network=...) at /root/BeamMP-Server/src/TServer.cpp:245
#10 0x000055555578f625 in TServer::GlobalParser (Client=..., Packet=..., PPSMonitor=..., Network=...) at /root/BeamMP-Server/src/TServer.cpp:114
#11 0x000055555588c219 in TNetwork::TCPClient (this=0x7fffffffdcc0, c=...) at /root/BeamMP-Server/src/TNetwork.cpp:556
#12 0x00005555558870ec in TNetwork::Authentication (this=0x7fffffffdcc0, TCPSock=14) at /root/BeamMP-Server/src/TNetwork.cpp:341
#13 0x0000555555884210 in TNetwork::Identify (this=0x7fffffffdcc0, TCPSock=14) at /root/BeamMP-Server/src/TNetwork.cpp:218
#14 0x0000555555898d45 in std::__invoke_impl<void, void (TNetwork::*)(int), TNetwork*, int> (__f=@0x7fffe0002298: (void (TNetwork::*)(class TNetwork * const, int)) 0x55555588415e <TNetwork::Identify(int)>,__t=@0x7fffe0002290: 0x7fffffffdcc0) at /usr/include/c++/9/bits/invoke.h:73
#15 0x0000555555898a91 in std::__invoke<void (TNetwork::*)(int), TNetwork*, int> (__fn=@0x7fffe0002298: (void (TNetwork::*)(class TNetwork * const, int)) 0x55555588415e <TNetwork::Identify(int)>) at /usr/include/c++/9/bits/invoke.h:95
#16 0x000055555589887f in std::thread::_Invoker<std::tuple<void (TNetwork::*)(int), TNetwork*, int> >::_M_invoke<0ul, 1ul, 2ul> (this=0x7fffe0002288) at /usr/include/c++/9/thread:244 
#17 0x000055555589878e in std::thread::_Invoker<std::tuple<void (TNetwork::*)(int), TNetwork*, int> >::operator( (this=0x7fffe0002288) at /usr/include/c++/9/thread:251
#18 0x000055555589872c in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (TNetwork::*)(int), TNetwork*, int> > >::_M_run (this=0x7fffe0002280) at /usr/include/c++/9/thread:195
#19 0x0000555555921104 in execute_native_thread_routine ()
#20 0x00007ffff7f7b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x00007ffff7992293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

The crash happens in TServer.cpp:318 in a std::string::substr, that's this line:

VD = VD.substr(VD.find('{'));

From what I can see, this happens right after the user "Bruh2556" creates 4 cars in a row, then deletes one, to which the server says

Bruh2556" Client.cpp:16 [DEBUG] tried to erase a vehicle that doesn't exist (not an error)

make: rapidjson::Document’ has no member named ‘GetObjectA’

on a new, fresh, ubuntu 20 LTS installation:

apt update

apt upgrade

add-apt-repository ppa:mhier/libboost-latest

apt-get install -y libboost1.70-dev libboost1.70

The following NEW packages will be installed:
  libboost1.70 libboost1.70-dev

apt-get install -y git make cmake g++

The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cmake-data cpp cpp-9 g++-9 gcc gcc-9 gcc-9-base libasan5 libatomic1 libbinutils libc-dev-bin libc6-dev libcc1-0 libcrypt-dev
  libctf-nobfd0 libctf0 libgcc-9-dev libgomp1 libisl22 libitm1 libjsoncpp1 liblsan0 libmpc3 libquadmath0 librhash0 libstdc++-9-dev libtsan0 libubsan1 linux-libc-dev manpages-dev

apt-get install -y liblua5.3 libz-dev rapidjson-dev libboost1.70-dev

The following additional packages will be installed:
  autoconf automake autotools-dev libdpkg-perl libfile-fcntllock-perl libltdl-dev libncurses-dev libreadline-dev libtool libtool-bin m4 pkg-config
The following NEW packages will be installed:
  autoconf automake autotools-dev libdpkg-perl libfile-fcntllock-perl libltdl-dev liblua5.3-0 liblua5.3-0-dbg liblua5.3-dev libncurses-dev libreadline-dev libtool libtool-bin m4
  pkg-config rapidjson-dev zlib1g-dev

apt-get install -y libssl-dev

The following NEW packages will be installed:
  libssl-dev

cd /srv/

git clone --recursive https://github.com/BeamMP/BeamMP-Server

cd BeamMP-Server/

git checkout tags/v1.20

cmake .

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.3.so;/usr/lib/x86_64-linux-gnu/libm.so (found suitable version "5.3.3", minimum required is "5.3")
-- Configuring done
-- Generating done
-- Build files have been written to: /srv/BeamMP-Server

this is where the fun starts

make

Scanning dependencies of target BeamMP-Server
[  4%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Compressor.cpp.o
[  8%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Console.cpp.o
[ 13%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Enc.cpp.o
[ 17%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Init/Config.cpp.o
[ 21%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Init/Heartbeat.cpp.o
[ 26%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Init/Resources.cpp.o
[ 30%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Init/Startup.cpp.o
[ 34%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Lua/LuaMain.cpp.o
[ 39%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Lua/LuaSystem.cpp.o
In file included from /srv/BeamMP-Server/src/Lua/LuaSystem.cpp:15:
/srv/BeamMP-Server/include/UnixCompat.h: In function ‘void ZeroMemory(void*, size_t)’:
/srv/BeamMP-Server/include/UnixCompat.h:15:30: warning: unused parameter ‘dst’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                        ~~~~~~^~~
/srv/BeamMP-Server/include/UnixCompat.h:15:42: warning: unused parameter ‘len’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                                   ~~~~~~~^~~
[ 43%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Network/Auth.cpp.o
In file included from /srv/BeamMP-Server/src/Network/Auth.cpp:11:
/srv/BeamMP-Server/include/UnixCompat.h: In function ‘void ZeroMemory(void*, size_t)’:
/srv/BeamMP-Server/include/UnixCompat.h:15:30: warning: unused parameter ‘dst’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                        ~~~~~~^~~
/srv/BeamMP-Server/include/UnixCompat.h:15:42: warning: unused parameter ‘len’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                                   ~~~~~~~^~~
[ 47%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Network/Client.cpp.o
[ 52%] Building CXX object CMakeFiles/BeamMP-Server.dir/src/Network/GParser.cpp.o
In file included from /srv/BeamMP-Server/src/Network/GParser.cpp:14:
/srv/BeamMP-Server/include/UnixCompat.h: In function ‘void ZeroMemory(void*, size_t)’:
/srv/BeamMP-Server/include/UnixCompat.h:15:30: warning: unused parameter ‘dst’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                        ~~~~~~^~~
/srv/BeamMP-Server/include/UnixCompat.h:15:42: warning: unused parameter ‘len’ [-Wunused-parameter]
   15 | inline void ZeroMemory(void* dst, size_t len) {
      |                                   ~~~~~~~^~~
/srv/BeamMP-Server/src/Network/GParser.cpp: In function ‘void Apply(Client*, int, const string&)’:
/srv/BeamMP-Server/src/Network/GParser.cpp:36:24: error: ‘rapidjson::Document’ {aka ‘class rapidjson::GenericDocument<rapidjson::UTF8<> >’} has no member named ‘GetObjectA’; did you mean ‘GetObject’?
   36 |     for(auto& M : Pack.GetObjectA()){
      |                        ^~~~~~~~~~
      |                        GetObject
make[2]: *** [CMakeFiles/BeamMP-Server.dir/build.make:206: CMakeFiles/BeamMP-Server.dir/src/Network/GParser.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/BeamMP-Server.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

so it looks like I'm running into:
error: ‘rapidjson::Document’ {aka ‘class rapidjson::GenericDocument<rapidjson::UTF8<> >’} has no member named ‘GetObjectA’; did you mean ‘GetObject’?

I'm unsure in how to solve this.

libboost1.70 updated to 1.71 and now it will not compile.

I installed libboost1.71-dev which is the only one available in apt repositories.

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package): Could not find a package configuration file provided by "boost_system" (requested version 1.71.0) with any of the following names: boost_systemConfig.cmake boost_system-config.cmake Add the installation prefix of "boost_system" to CMAKE_PREFIX_PATH or set "boost_system_DIR" to a directory containing one of the above files. If "boost_system" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component) /usr/share/cmake-3.13/Modules/FindBoost.cmake:264 (find_package) CMakeLists.txt:33 (find_package)

I believe it's looking for 1.70. Any ideas?

[Feature Request] Sideloading (mod) files via http/https

Hey,

would be great, if there is a setting (maybe a url) locating to a webserver, where the mods can be downloaded.
The folderstructure must be the same as in the game, may makes it more easy. The Client will download the mods from this url instead from the BeamMP-Server.

Cheers,
Pakon

Arch Linux: Which packages do I need to build the server?

I cannot find the right libraries and other dependencies needed to build from source for my archlinux installation as all the package names in the readme file are Debian/Ubuntu style. Any help in pointing me to the right dependencies for arch would be highly appreciated that's the only unclear part of the build guide

Linux, Lua

onChatMessage isn't cancelling
onVehicleSpawn isn't cancelling
onVehicleEdited isn't cancelling

function onChatMessage(id, name, message)
return 1
end

[Bug] Properly check for player timeout

Problem:

While a player connects, they don't send any pings. This means that they can timeout if their load takes too long. THeartbeatThread kicks after 5 minutes of no-ping.

Solution:

Either send ping from the start and asynchronous to downloads, or fix the timeout in some other way. We need timeout to prevent ghost players (players that show up in the player list but aren't actually there).

Add onExit

I suggest to add event when plugin is stopping so that stop plugin threads or close mysql connection

README build instructions are incomplete

The current build instructions are incomplete, we should either remove them or write a more complete and correct instructions.

Do we need Unix, Windows, Mac? Which toolchains do we support / recommend? Do we offer build instructions at all?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.