Skip to main content
BeamMP has no built-in chat commands for players. To add commands such as /help or /players, create a Lua plugin in Resources/Server/<PluginName>/main.lua, register a handler for the onChatMessage event, reply with MP.SendChatMessage and return 1 to hide the command from chat. Admin commands for the server owner are typed in the panel Console instead; see console commands.

Before you start

How to add chat commands with a Lua plugin

1

Create the plugin folder

In Files, open Resources/Server and create a folder called ChatCommands.
2

Create main.lua

Inside ChatCommands, create a file called main.lua and paste the example below.
3

Restart the server

Restart the server. Watch the console for Lua errors.
4

Test in game

Join the server and type /help in chat.

Example: /help and /players

How it works: To add a command, add another elseif message == "/yourcommand" then block above the final end.

How do I send a message to all players?

From a plugin, use -1 as the player ID:
From the panel, type say <message> in the console, for example say Server restarts in 10 minutes.

Frequently asked questions

Do I need to restart after editing main.lua?

Saving a change to a file directly in the plugin folder reloads that plugin. A new plugin folder added while the server runs needs a restart.

Why doesn’t my command do anything?

Check the console for a Lua error, check the file is called main.lua and sits in its own folder under Resources/Server, and check the command text matches exactly, including the slash.

Can I make admin-only commands?

Yes. Compare player_name with a list of trusted names before running the command. For stronger checks, use the player’s BeamMP ID from MP.GetPlayerIdentifiers(player_id).

Does BeamMP have voice chat?

The BeamMP server has no voice chat setting. Groups usually use a separate voice app.

BeamMP server guide

Every BeamMP page in one place.

Console commands

Kick, say, list and more.

Lua events

All server events and functions.

Restrict vehicles

Another Lua plugin example.

Checked against the official BeamMP server scripting reference on 3 November 2026, with file paths from our Game Panel (BeamMP Server v3.9.3, Lua 5.3.5).

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026