Search the Community
Showing results for tags 'resolver'.
-
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
-
Estava Tentando Resolver Outro Bug ai Quando fui testar deu esse erro alguem sabe resolver-lo ? local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1366), (screenH/768) function onClientRender() dxDrawRectangle((screenW - 323) / 2, (screenH - 465) / 2, 323, 465, tocolor(0, 0, 0, 185), false) dxDrawText("Ak 47", 657, 302, 710, 331, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawRectangle(519, 299, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawImage(471, 321, 320, 110, "Img/30.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(519, 403, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 181, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 507, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawText("Deagle", 644, 406, 697, 435, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawText("Uzi", 667, 184, 720, 213, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawImage(513, 221, 240, 110, "Img/28.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(509, 425, 256, 128, "Img/24.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Trafico", 548, 151, 824, 181, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Fechar", 650, 564, 86, 31, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("✖", x*903, y*219, x*918, y*234, tocolor(255, 255, 255, 255), 1.50, "default-bold", "center", "center", false, false, false, false, false) end function onClientClick(button, state) if isEventHandlerAdded("onClientRender", root, onClientRender) and isEventHandlerAdded("onClientClick", root, onClientClick) then if button == "left" and state == "up" then elseif isMouseInPosition(650, 564, 86, 31) then showCursor(false) removeEventHandler("onClientRender", root, onClientRender) removeEventHandler("onClientClick", root, onClientClick) end end function lojaAbrir () if not isEventHandlerAdded("onClientRender", root, onClientRender) and not isEventHandlerAdded("onClientClick", root, onClientClick) then showCursor(true) addEventHandler("onClientRender", root, onClientRender) addEventHandler("onClientClick", root, onClientClick) end end addEvent("lojaArma", true) addEventHandler("lojaArma", resourceRoot, lojaAbrir) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end function isEventHandlerAdded( sEventName, pElementAttachedTo, func ) if type( sEventName ) == 'string' and isElement( pElementAttachedTo ) and type( func ) == 'function' then local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo ) if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then for i, v in ipairs( aAttachedFunctions ) do if v == func then return true end end end end return false end end