Jump to content

Find FiveM Mods and Resources

8168 files and posts available in the database

  • Welcome to FiveMDEV! A maior comunidade FIVEM do Brasil!

    Welcome to FiveMDEV! A maior comunidade FIVEM do Brasil!, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of FiveMDEV! A maior comunidade FIVEM do Brasil! by signing in or creating an account.

    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    Welcome and enjoy the community! 😊

     
     
    0:00

PAINEL ORG/GROUP LEIA A DESCRIÇÃO, VRP E VRPEX. 1.0.0

   (0 reviews)

1 Screenshot

About This File

Prepare: 
 

vRP.prepare("mirtin_orgs/getOrg", "SELECT * FROM mirtin_orgs WHERE org = @org")
vRP.prepare("mirtin_orgs/updateMembers", "UPDATE mirtin_orgs SET membros = @membros WHERE org = @org")
vRP.prepare("mirtin_orgs/updateBanco", "UPDATE mirtin_orgs SET banco = @banco, bancoHistorico = @bancoHistorico WHERE org = @org")
vRP.prepare("mirtin_orgs/updateText", "UPDATE mirtin_orgs SET anotacao = @anotacao WHERE org = @org")
vRP.prepare("mirtin_orgs/initGroups", "INSERT IGNORE INTO mirtin_orgs(org,maxMembros) VALUES(@org, @maxMembros)")
vRP.prepare("mirtin_orgs/initTable", "CREATE TABLE IF NOT EXISTS `mirtin_orgs` ( `org` varchar(50) NOT NULL, `membros` text NOT NULL DEFAULT '{}', `maxMembros` int(11) NOT NULL DEFAULT 0, `anotacao` text DEFAULT NULL, PRIMARY KEY (`org`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;")
vRP.prepare("mirtin_orgs/clearArmazem", "UPDATE vrp_srv_data SET dvalue = @dvalue WHERE dkey = @dkey")


Configs:
 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- CONFIGS
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
config.createTable = false -- Criar Tabela Automaticamente (Depois de startar o script pela primeira vez coloque false)
config.automaticGroups = true -- INSERIR CATEGORIA DE GRUPOS AUTOMATICAMENTE NO BANCO DE DADOS
config.adminPermission = "admin.permissao" -- Permissao de ADM
config.blackList = 3 -- dia(s) Configura o tempo que o jogador não pode entrar em uma organização quando pedir contas/demitido

config.weebhook = {
    color = 6356736,
    logo = "https://media.discordapp.net/attachments/871769750710149140/1001895906515361843/01_9.png?width=1370&height=683",
    footer = "© Mirt1n Store"
}

Já tem vários grupos criados, mas configure do seu jeito. No Config.

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)

 


User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

×
×
  • Create New...

Important Information

Esse website utiliza Cookies, se continuar navegando você concordar na usabilidade.