Open do Menu:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- OPEN MENU
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RegisterCommand('org', function(source,args)
local user_id = vRP.getUserId(source)
if user_id then
vCLIENT.openNui(source, src.getMyOrg(user_id))
end
end)
RegisterCommand('orgadm', function(source,args)
local user_id = vRP.getUserId(source)
if user_id then
if vRP.hasPermission(user_id, config.adminPermission) then
if config.groups[args[1]] then
vCLIENT.openNui(source, args[1])
end
end
end
end)
RegisterCommand('clearorg', function(source,args)
local user_id = vRP.getUserId(source)
if user_id then
if vRP.hasPermission(user_id, "developer.permissao") then
vRP._execute("mirtin_orgs/updateMembers", { org = args[1], membros = json.encode({})})
vRP._execute("mirtin_orgs/clearArmazem", { dkey = "armazem:"..args[1], dvalue = json.encode({})})
TriggerClientEvent("Notify",source, "sucesso","Você limpou a organização: "..args[1], 5)
end
end
end)
RegisterCommand('rbl', function(source,args)
local user_id = vRP.getUserId(source)
if user_id then
if vRP.hasPermission(user_id, config.adminPermission) then
local id = tonumber(args[1])
if id ~= nil then
vRP.setUData(id, "Mirt1n:BlackList", 0)
TriggerClientEvent("Notify",source, "sucesso","Você tirou a blacklist do id: "..id, 5)
end
end
end
end)