βοΈFUNCTION UTILITY
To create a new command in the modules/client/data/cl_command.lua file and set permissions, follow these steps:
LGF.Command:CreateCommand({ { name = "examplecommand", description = "Description of the example command.", permission = 'example.useCommand', Data = function(source, args) -- Command logic here end } })Setting PermissionsCFG.CommandPerms = { ['admin'] = { ['cache.getPlayerCache'] = true, ['cache.clearPlayerCache'] = true, ['admin.createVehicle'] = true, ['example.useCommand'] = true -- Add this line }, ['mod'] = { ['cache.getCache'] = false, ['example.useCommand'] = false -- Add this line } }
Setting Permissions
Last updated