Open gouyeh opened 4 years ago
Hi, not sure if this has something to do with Linux, but you get an error on the function to create admin/player commands. If it causes problems for you, you can delete them or change that part to a compatible function you can use.
I've got the same error but without line of failure. I tried to change the admin command creation and it would not fix it. The issue is caused by the fxmanifest using wildcard inports/references. That causes an permission acess error, all the used resouces have to be writen on that file.
UPDATE: Also that could be caused by the nesting of 2 wild card paths. ->'ui/assets/*', 'ui/assets/heritage/*',
(IDK)
Replace the:
files { 'ui/index.html', 'ui/assets/*', 'ui/assets/heritage/*', 'ui/fonts/*', 'ui/css/*', 'ui/js/*', }
With (FIY if the resources have changed on further commits):
files { 'ui/index.html', 'ui/css/style.css', 'ui/css/tabs.css', 'ui/js/front.js', 'ui/js/script.js', 'ui/assets/arrow-left.png', 'ui/assets/clothes.png', 'ui/assets/head.png', 'ui/assets/identity.png', 'ui/assets/radio-check-black.png', 'ui/assets/rotate-left.pn', 'ui/assets/arrow-right.png', 'ui/assets/cursor.png', 'ui/assets/pilosite.png', 'ui/assets/radio-check.png', 'ui/assets/rotate-right.pg', '/ui/assets/heritage/Face-0.jpg', '/ui/assets/heritage/Face-1.jpg', '/ui/assets/heritage/Face-10.jpg', '/ui/assets/heritage/Face-11.jpg', '/ui/assets/heritage/Face-12.jpg', '/ui/assets/heritage/Face-13.jpg', '/ui/assets/heritage/Face-14.jpg', '/ui/assets/heritage/Face-15.jpg', '/ui/assets/heritage/Face-16.jpg', '/ui/assets/heritage/Face-17.jpg', '/ui/assets/heritage/Face-18.jpg', '/ui/assets/heritage/Face-19.jpg', '/ui/assets/heritage/Face-2.jpg', '/ui/assets/heritage/Face-20.jpg', '/ui/assets/heritage/Face-21.jpg', '/ui/assets/heritage/Face-22.jpg', '/ui/assets/heritage/Face-23.jpg', '/ui/assets/heritage/Face-24.jpg', '/ui/assets/heritage/Face-25.jpg', '/ui/assets/heritage/Face-26.jpg', '/ui/assets/heritage/Face-27.jpg', '/ui/assets/heritage/Face-28.jpg', '/ui/assets/heritage/Face-29.jpg', '/ui/assets/heritage/Face-3.jpg', '/ui/assets/heritage/Face-30.jpg', '/ui/assets/heritage/Face-31.jpg', '/ui/assets/heritage/Face-32.jpg', '/ui/assets/heritage/Face-33.jpg', '/ui/assets/heritage/Face-34.jpg', '/ui/assets/heritage/Face-35.jpg', '/ui/assets/heritage/Face-36.jpg', '/ui/assets/heritage/Face-37.jpg', '/ui/assets/heritage/Face-38.jpg', '/ui/assets/heritage/Face-39.jpg', '/ui/assets/heritage/Face-4.jpg', '/ui/assets/heritage/Face-40.jpg', '/ui/assets/heritage/Face-41.jpg', '/ui/assets/heritage/Face-42.jpg', '/ui/assets/heritage/Face-43.jpg', '/ui/assets/heritage/Face-44.jpg', '/ui/assets/heritage/Face-45.jpg', '/ui/assets/heritage/Face-5.jpg', '/ui/assets/heritage/Face-6.jpg', '/ui/assets/heritage/Face-7.jpg', '/ui/assets/heritage/Face-8.jpg', }
No its because es_extended doesnt have RegisterCommand fix: Go to es_extended/server open functions.lua add
ESX.RegisterCommand = function(name, group, cb, allowConsole, suggestion) if type(name) == 'table' then for k,v in ipairs(name) do ESX.RegisterCommand(v, group, cb, allowConsole, suggestion) end
return
end
if ESX.RegisteredCommands[name] then
print(('[es_extended] [^3WARNING^7] An command "%s" is already registered, overriding command'):format(name))
if ESX.RegisteredCommands[name].suggestion then
TriggerClientEvent('chat:removeSuggestion', -1, ('/%s'):format(name))
end
end
if suggestion then
if not suggestion.arguments then suggestion.arguments = {} end
if not suggestion.help then suggestion.help = '' end
TriggerClientEvent('chat:addSuggestion', -1, ('/%s'):format(name), suggestion.help, suggestion.arguments)
end
ESX.RegisteredCommands[name] = {group = group, cb = cb, allowConsole = allowConsole, suggestion = suggestion}
RegisterCommand(name, function(playerId, args, rawCommand)
local command = ESX.RegisteredCommands[name]
if not command.allowConsole and playerId == 0 then
print(('[es_extended] [^3WARNING^7] %s'):format(_U('commanderror_console')))
else
local xPlayer, error = ESX.GetPlayerFromId(playerId), nil
if command.suggestion then
if command.suggestion.validate then
if #args ~= #command.suggestion.arguments then
error = _U('commanderror_argumentmismatch', #args, #command.suggestion.arguments)
end
end
if not error and command.suggestion.arguments then
local newArgs = {}
for k,v in ipairs(command.suggestion.arguments) do
if v.type then
if v.type == 'number' then
local newArg = tonumber(args[k])
if newArg then
newArgs[v.name] = newArg
else
error = _U('commanderror_argumentmismatch_number', k)
end
elseif v.type == 'player' or v.type == 'playerId' then
local targetPlayer = tonumber(args[k])
if args[k] == 'me' then targetPlayer = playerId end
if targetPlayer then
local xTargetPlayer = ESX.GetPlayerFromId(targetPlayer)
if xTargetPlayer then
if v.type == 'player' then
newArgs[v.name] = xTargetPlayer
else
newArgs[v.name] = targetPlayer
end
else
error = _U('commanderror_invalidplayerid')
end
else
error = _U('commanderror_argumentmismatch_number', k)
end
elseif v.type == 'string' then
newArgs[v.name] = args[k]
elseif v.type == 'item' then
if ESX.Items[args[k]] then
newArgs[v.name] = args[k]
else
error = _U('commanderror_invaliditem')
end
elseif v.type == 'weapon' then
if ESX.GetWeapon(args[k]) then
newArgs[v.name] = string.upper(args[k])
else
error = _U('commanderror_invalidweapon')
end
elseif v.type == 'any' then
newArgs[v.name] = args[k]
end
end
if error then break end
end
args = newArgs
end
end
if error then
if playerId == 0 then
print(('[es_extended] [^3WARNING^7] %s^7'):format(error))
else
xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', error}})
end
else
cb(xPlayer or false, args, function(msg)
if playerId == 0 then
print(('[es_extended] [^3WARNING^7] %s^7'):format(msg))
else
xPlayer.triggerEvent('chat:addMessage', {args = {'^1SYSTEM', msg}})
end
end)
end
end
end, true)
if type(group) == 'table' then
for k,v in ipairs(group) do
ExecuteCommand(('add_ace group.%s command.%s allow'):format(v, name))
end
else
ExecuteCommand(('add_ace group.%s command.%s allow'):format(group, name))
end
end
and add this in es_extended/server/common.lua
ESX.RegisteredCommands = {}
and its fixed
I am getting this error everything is setup correctly.
Using Linux