/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
- Make a backup.
- Know how to create and edit files in the File Manager.
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
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:
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 calledmain.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. Compareplayer_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.Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026