Search the Community
Showing results for tags 'mta version'.
-
um script da o seguinte erro [servidor]\[servidor]\[Scripts]\[AtivarVip\caioS.Lua:14: <min_mtaversion> section in the meta.xml is incorrect or missing (expected at least server 1.5.4-9.11413 becayse 'formFields' is begin used Script aki local url = "https://discordapp.com/api/webhooks/1133572830953476227/ja3_b-h9pOGeJIxAcLJfc2FQQWUOUtXbR-614F93FwhTM-b4mSg96oLjyp2DNfRCoNsb" ---- Coloque o link da sua webhook entre as "aspas" -------- --> --> --> --> --> "LOGS" nao mexa aqui <-- <-- <-- <-- <-- function messageDiscord(message, link) sendOptions = { queueName = "dcq", connectionAttempts = 3, connectTimeout = 5000, formFields = { content=""..message.."" }, } fetchRemote(link, sendOptions, function () return end) end --> --> --> --> --> LOGS <-- <-- <-- <-- <-- function messageS(player, message, tipo) exports['FR_DxMessages']:addBox(player, message, tipo) ----------- altere para sua infobox----- end function RegisterEvent(event, ...) addEvent(event, true) addEventHandler(event, ...) end addEventHandler('onResourceStart', getResourceRootElement(getThisResource()), function () connection = dbConnect('sqlite', 'dados.sqlite') dbExec(connection, 'create table if not exists key (key, vip, dias)') dbExec(connection, 'create table if not exists keyPoints (key, amount)') dbExec(connection, 'create table if not exists vips (conta, vip, tempo)') end ) setTimer( function ( ) local logins = dbPoll(dbQuery(connection, 'select * from vips'), - 1) if (#logins ~= 0) then for i, v in ipairs(logins) do if (v['tempo'] < 11000) then aclGroupRemoveObject(aclGetGroup(v['vip']), 'user.'..v['conta']) dbExec(connection, 'delete from vips where conta = ? and vip = ?', v['conta'], v['vip']) else dbExec(connection, 'update vips set tempo = ? where conta = ? and vip = ?', (tonumber(v['tempo']) - 10000), v['conta'], v['vip']) end end end end , 10000, 0) function getPlayerAdmin (player) for i,v in ipairs(config.acl) do if isObjectInACLGroup('user.'..getAccountName(getPlayerAccount(player)), aclGetGroup(v)) then return true end end return false end function getVipExists (vip) vips = {'Omega', 'Sigma', 'Epsylon', 'Alpha'} for i,v in ipairs(vips) do if (v == vip) then return true end end return false end addCommandHandler('gerarkey', function(player, _, vip, dias) if getPlayerAdmin(player) then if (vip) and (dias) then if getVipExists(vip) then local seconds = (dias * 86400000) local key = gerarKey() local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys == 0) then dbExec(connection, 'insert into key (key, vip, dias) values(?, ?, ?)', tostring(key), tostring(vip), tonumber(seconds)) triggerClientEvent(player, 'copyKey', player, tostring(key)) messageS(player, 'Você gerou uma key com o vip ' .. vip .. ' por '..dias..' dias.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Key gerada**\n**Vip:**`".. vip .."`\n**Dias:**`".. dias .."`\n**key:**||".. key .."||\n⇌--------------------⇌ ", ""..url.."") messageS(player, 'A key foi copiada, utilize (ctrl + v) para colar.', 'info') else messageS(player, 'Ocorreu um erro inesperado na hora de criar a key, tente novamente em alguns segundos.', 'success') end else messageS(player, 'Você precisa digitar algum dos vips atuais.', 'error') end end end end ) addCommandHandler('gerarpontos', function(player, _, amount) if getPlayerAdmin(player) then if tonumber(amount) then local key = gerarKey() local keys = dbPoll(dbQuery(connection, 'select * from keyPoints where key = ?', key), - 1) if (#keys == 0) then dbExec(connection, 'insert into keyPoints (key, amount) values(?, ?)', tostring(key), tonumber(amount)) triggerClientEvent(player, 'copyKey', player, tostring(key)) messageS(player, 'Você gerou uma key com ' .. amount .. ' vpoints.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Moedas Geradas**\n**Moedas:**`"..amount.."` \n**key:**||".. key .."||\n⇌--------------------⇌ ", ""..url.."") messageS(player, 'A key foi copiada, utilize (ctrl + v) para colar.', 'info') else messageS(player, 'Esta key já existe.', 'info') end end end end ) addCommandHandler('usarpontos', function (player, _, key) if key then local keys = dbPoll(dbQuery(connection, 'select * from keyPoints where key = ?', key), - 1) if (#keys ~= 0) then setElementData(player, 'moneycoins', (getElementData(player, 'moneycoins') or 0) + tonumber(keys[1]['amount'])) for i, v in ipairs(getElementsByType('player')) do triggerClientEvent(v, 'Caio.onDrawTextAtivado2', v, keys[1]['amount'], getPlayerName(player)) end messageS(player, 'Você ativou a key e recebeu ' .. keys[1]['amount'] .. ' de vPoints', 'success') dbExec(connection, 'delete from keyPoints where key = ?', key) else messageS(player, 'Esta key não existe ou já foi utilizada.', 'info') end else outputChatBox('Syntax error: /usarpontos [Key]') end end ) addCommandHandler('usarkey', function (player, _, key) if (key) then local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys ~= 0) and (type(keys) == 'table') then local dados = dbPoll(dbQuery(connection, 'select * from vips where conta = ? and vip = ?', getAccountName(getPlayerAccount(player)), keys[1]['vip']), - 1) if (#dados == 0) then dbExec(connection, 'insert into vips (conta, vip, tempo) values(?, ?, ?)', getAccountName(getPlayerAccount(player)), keys[1]['vip'], keys[1]['dias']) aclGroupAddObject(aclGetGroup(keys[1]['vip']), 'user.'..getAccountName(getPlayerAccount(player))) messageS(player, 'Você utilizou a key e recebeu um vip '..keys[1]['vip']..' por '..(keys[1]['dias'] / 86400000)..' dias.', 'success') for i,v in ipairs(getElementsByType('player')) do triggerClientEvent(v, 'Caio.onDrawTextAtivado', v, keys[1]['vip'], getPlayerName(player)) end givePlayerMoney(player, (config[tostring(keys[1]['vip'])] or 0)) dbExec(connection, 'delete from key where key = ?', key) else messageS(player, 'Você já possui esse vip.', 'warning') end else messageS(player, 'Esta key não existe', 'warning') end else messageS(player, 'Você precisa digitar a key', 'warning') end end ) addCommandHandler('gerenciador', function (player) if getPlayerAdmin(player) then triggerClientEvent(player, 'Caio.onOpenGerenciar', player) local vips = dbPoll(dbQuery(connection, 'select * from vips'), - 1) local keys = dbPoll(dbQuery(connection, 'select * from key'), - 1) if (keys ~= 0) then for i,v in ipairs(keys) do triggerClientEvent(player, 'Caio.onInsertTableKey', player, v['key'], v['vip'], math.floor(v['dias'] / 86400000)) end end if (vips ~= 0) then for i,v in ipairs(vips) do triggerClientEvent(player, 'Caio.onInsertTableVip', player, v['conta'], v['vip'], math.floor(v['tempo'] / 86400000)) end end end end ) RegisterEvent('Caio.onRemoveKey', root, function (player, key, index) if (key) and (index) then local keys = dbPoll(dbQuery(connection, 'select * from key where key = ?', key), - 1) if (#keys ~= 0) and (type(keys) == 'table') then dbExec(connection, 'delete from key where key = ?', key) messageS(player, 'Você deletou com sucesso esta key.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Key Excluida**\n**Key:**`"..key.."`\n⇌--------------------⇌", ""..url.."") triggerClientEvent(player, 'Caio.onOpenGerenciar', player) else messageS(player, 'Ocorreu um erro ao remover esta key.', 'error') end end end ) RegisterEvent('Caio.onRemoveVip', root, function (player, login, vip, index) if (login) and (vip) then local result = dbPoll(dbQuery(connection, 'select * from vips where conta = ? and vip = ?', tostring(login), tostring(vip)), - 1) if (#result ~= 0) then aclGroupRemoveObject(aclGetGroup(tostring(vip)), 'user.'..tostring(login)) dbExec(connection, 'delete from vips where conta = ? and vip = ?', tostring(login), tostring(vip)) messageS(player, 'Você removeu o vip '..vip..' do usuário '..login..'.', 'success') messageDiscord(">>> ⇌--------------------⇌\n**Vip removido**\n**Login:** `"..login.."`\n**Vip:**`"..vip.."`\n⇌--------------------⇌ ", ""..url.."") triggerClientEvent(player, 'Caio.onOpenGerenciar', player) else messageS(player, 'Ocorreu um erro na hora de remover o vip.', 'error') end end end ) function gerarKey() letters = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} local sas = '' for i = 1, 10 do sas = sas .. letters[math.random(1, #letters)] end return sas end https://imgur.com/78DOMQj