Collecting Ideas for Server Lua Plugin API

Hello BeamMP Community,

I’m one of the BeamMP-Server developers, and I’d like to start working on adding some more features to what Lua plugins can do.

Please, in this thread, comment what you would like to see in the Server’s Lua API. This could be new functions, improvements to existing functions, or really anything else.

Make sure to look if someone suggested what you want to suggest, first.

Thank you and have fun!

– Lion

1 Like

Some changes we’re going to do already:

  • https POST & GET
  • GetOSName (Linux, Windows, Other)
  • Render distance. The pros are greater than the cons.
  • Server-authoritative client configs.
  • Client vehicle state on the server. (As the server receives client vehicle data, it gets stored to a table so that we can access damage, vehicle/parts, fuel, etc)
2 Likes

Okay! I have a few!

  • More options regarding lua function timeouts and debug
  • Ability to view stack maybe?
  • Server doesn’t auto crash when functions that clearly aren’t required timeout
  • Base support for luasocket
  • functional modules instead of having to hack stuff together to make them work?
  • The ability to catch console input the exact same way we can catch chat with an event, cancel the event and it doesn’t get executed, don’t cancel it and it executes as lua like it normally does!
1 Like

The ability to catch console input the exact same way we can catch chat with an event, cancel the event and it doesn’t get executed, don’t cancel it and it executes as lua like it normally does!

We started implementing a way to register a function with the console - you could then do something like Register("myfunction") and be able to call myfunction() from the console. I do personally believe the console needs a lot more work, too, and I think a proper command syntax might even preferrable, and possibly a way to switch between them. I personally like the “minecraft-server” way of using console commands /help and so on instead of a lua console, but I’m not sure the guys that decide this stuff would be willing to do something like that.

Maybe as a little thought inspiration - what if the server console and the ingame chat had a common interface?

Either way, thanks for the great suggestions! Luasocket was in the back of my mind, and proper modules, oh boy, that’d be cool!

This is good, but honestly I think the best way we could it would be to literally have it show up in an event the exact way chat shows up in an event and allow us to choose if we’d like it to be processed as lua.

I would appreciate a GetPlayerServerID(playerName) function because sometimes I only have the player name but need the server id of this player

Locked due to 3.x already being out. For new ideas open a new thread.