[Release][ESX / vRP / Standalone] Drag & Drop chat command packs

Universal Chat Command System

Are you tired of having to download old, broken and deprecated chat command resources?
Fear not, here’s a totally new universal chat command system that works standalone and with popular frameworks.

A custom system made to allow easy installation of chat command packs that allows advanced customized behavior, and allows quick and easy modification for server owners.

Features

  • Framework compatiblity (vRP & ESX)
  • Automatic name formatting based on server frameworks
  • Easy configuration
  • Simple drag-and-drop installation method
  • Universal bridge between chat commands and frameworks
  • Potentially powerful API, yet also simple to use.
  • Auto-updater, so you can easily get the newest features!

Note

This resource in itself does not contain commands, example packs can be found at the bottom of this post.

There should be enough comments etc. to get started on creating your own commands, even if you’re not an experienced programmer.

All commands can only be ran by players, and will be blocked in the console.

Download

Warning! This resource depends on a feature only available since FXServer version 1226!

If you are using linux!

Instructions Linux Compatibility

Seems like this method is currently not linux compatible then.

A workaround is to between the
server_script "commands/*.lua"
and the
server_script "system/sv_fxcheck_*.lua"
lines in the __resource.lua file, you can add each command pack as a server_script.

F.ex:
server_script "commands/*.lua"
server_script "commands/cmds_roleplay_toolkit.lua"
server_script "commands/cmds_admin.lua"
server_script "system/sv_fxcheck_*.lua"

This will still show the warning in the console, but the packs will be loaded.

Also, do note that whenever support comes around for drag-and-drop files, your files will be loaded twice and you need to remove the manual additions.

Resource Installation

  • Download the repository
  • Put the chat_commands folder in your resources directory
  • Add start chat_commands to your server config
  • Configure settings.lua to your liking
    • If you are using ESX or vRP, set the use_esx or use_vrp field to true!

Command Pack Installation

  • Download the command pack, they usually come as .lua files
  • Drag and drop the pack file into the chat_commands/commands folder
  • You should now see that the pack is loaded when the server is started

Example packs can be found at the bottom of this post.

Settings

There are a couple settings you can configure for your server.
These can be found in the settings.lua file.

Setting Required Type Description
show_id No boolean makes the players name also include the players ID
logging No boolean enables print output to the console (and chat during commands)
use_esx No boolean compatibility with ESX
use_vrp No boolean compatibility with vRP (f.ex Dunko’s vRP) (does not support vRP 2!)
cb No function Global callback function, can be used to log every command, or do other fancy stuff
use_framework_name No boolean automatically format names using framework systems, such as character identity
check_updates No boolean check for updates on startup (recommended)

Credits

Version check system by @blumlaut

Example Packs

These are complete packs that serve one purpose or another. Some may require configuration.

Roleplay Toolkit

An essential roleplay command kit. No configuration required.

Expand

Commands:

Command Description Aliases
/me [action] A typical /me [action] command, has an event in place to support floating text (not implemented here) /do
/ooc [message] Global out of character chat
/looc [message] Local out of character chat /b
/twitter [message] Global in-character tweet, showing character name plus username as handle /twt

Previews:



Download:

cmds_roleplay_toolkit.lua (1.6 KB)

Information Commands

Commands that give the player some information, such as Discord invites etc. (must be configured)

Expand

Commands:

Command Description Aliases
/discord Shows a discord invite link in the players chat
/teamspeak Shows a teamspeak ip in the players chat
/forum Shows a forum link in the players chat

Preview:

Download:

cmds_info.lua (898 Bytes)

Report Command

A command that sends a report to your Discord using @flatracer’s FiveM to Discord resource:

Expand

Commands:

Command Description Aliases
/report [message] Sends a message to your Discord

Download:

cmds_report.lua (864 Bytes)

Direct Messages / SMS

A simple DM / SMS system with a reply feature.

Expand

Commands:

Command Description Aliases
/sms [player] [message] Sends a message to the specified player /m
/reply [message] Replies to the last player you received a message from /r

Preview:

Download:

cmds_direct_message.lua (2.5 KB)

Administrator Announcement

A simple announcement command locked behind administrator access.

Expand

Commands:

Command Description Admin Only
/announce [message] Makes an announcement in chat Yes

Preview:

Download:

cmds_admin.lua (608 Bytes)

Other command packs

You are encouraged to create and release command packs. This system is made to be expanded upon by the community.

Disclaimer

Please refrain from remixing this resource.

It is intended to be a universal solution, if there are missing features, please submit a PR on GitHub with improvements.

You may include this as part of pack downloads, as long as it is not modified.

License

Attribution-NoDerivs 3.0 Unported (CC BY-ND 3.0)

https://creativecommons.org/licenses/by-nd/3.0/

9 Likes

Sexy utility script as usual. Also lonnggg topic post :stuck_out_tongue:

Could summarize each example pack in one of

these

big bois

Otherwise sexy :fire:

3 Likes

Very nice

Very nice post, will install it to my dev server. This here really adds a lot of options to the command system.

Great release, working great and loving the modularity of it. :slight_smile:

Do you have plans of adding esx_identity support?

Yes, although I’m not familiar with ESX, so adding compatibility with ESX stuff in general is something I need others to help with

i try instal to my server hosting (zaphosting) and i got Error on the console

[Chat Commands] ESX compatibility enabled
[Chat Commands] Starting chat command loading process
Failed to load script commands/*.lua.
Failed to load script system/sv_fxcheck_*.lua.
[Chat Commands] /==================================\
[Chat Commands] |              WARNING!            |
[Chat Commands] |===================================
[Chat Commands] | Unsupported FXServer version!    |
[Chat Commands] | Required: FXServer 1226 or newer |
[Chat Commands] \==================================/
[Chat Commands] Checking for updates...

I do not understand. I did the instructions correctly. but got an error like that

and on ingame still using the original command chat

This clearly states what the problem is. It’s also mentioned in the post right by the download that you need FXServer 1226 or newer.

If you are unable to manually update your FXServer, contact ZAP support for help.

This does not remove or replace any functionality already present on your server, it’s a modular system that allows easier installation of new commands.

I tried to manually update my server. but on
https://runtime.fivem.net/artifacts/fivem/build_proot_linux/master/
the latest version is 1141

note: my hosting server uses the linux version

Seems like this method is currently not linux compatible then.

A workaround is to between the
server_script "commands/*.lua"
and the
server_script "system/sv_fxcheck_*.lua"
lines in the __resource.lua file, you can add each command pack as a server_script.

F.ex:
server_script "commands/*.lua"
server_script "commands/cmds_roleplay_toolkit.lua"
server_script "commands/cmds_admin.lua"
server_script "system/sv_fxcheck_*.lua"

This will still show the warning in the console, but the packs will be loaded.

Also, do note that whenever support comes around for drag-and-drop files, your files will be loaded twice and you need to remove the manual additions.


oops?

I was not aware of the person using Linux until after that message, only that they were using ZAP-hosting.
I was also not aware that Linux was not being updated with the Windows artifacts.

I’ve also added the workaround to the OP just by the download, so this issue can be resolved by the end user themselves.

I download that and I have this Fail but is updated to last version of FXServer

[Chat Commands] /==================================\
[Chat Commands] |              WARNING!            |
[Chat Commands] |===================================
[Chat Commands] | Unsupported FXServer version!    |
[Chat Commands] | Required: FXServer 1226 or newer |
[Chat Commands] \==================================/

A new update has been released, the notable changes include:

  • ESX Identity support
  • Now utilizing Essentialmode’s command system for ESX compatibility
  • An auto-updater feature
  • Examples are now included in the download, but not in the resource itself
  • Added some more examples
  • Included a module system for client modules, such as overhead text
  • Smaller changes to logic

You need to update manually with this update, but further updates can be automatically downloaded.

1 Like

Such a great update. Wonderful work :slight_smile:

Hi ! Thx for the topic ! I’m block with chat_commands, my folder is in [esx] everything load (on the cmd) when i launch the server and when i start fivm this one bloc the connection > Couldn’t load ressource “chat_commands”.

Can you help me pls ?

I have the same problem

None of you have specified what version you are using, saying “i have this problem” doesn’t do anything.
Are you using windows or linux? Have you read the OP fully? What FXServer version are you using?

Not sure if it’s just an issue on my end, but the Overhead text example in /me is not working. :thinking:

Hello so What do I need to do for this to work on zap hosting?