FUNCTION UTILITY
To create a new command in the modules/client/data/cl_command.lua file and set permissions, follow these steps:
Creating a New Command
Open the
modules/client/data/cl_command.lua
file.Add a new command entry similar to existing ones. For example, to add a new command called
examplecommand
:
To create an example command, follow these steps:
Setting Permissions
Open the
config.lua
file.Add the permission for the new command in the
CFG.CommandPerms
table. For example:Verify that the command is correctly added in
cl_command.lua
.Check the permissions in
config.lua
to ensure they are properly configured.Look at the server logs for possible error messages that can provide clues.
By following these steps, you can successfully add and test new commands in your Lua-based game scripts.
Last updated