Jump to content

LeoX

Members
  • Posts

    3
  • Joined

  • Last visited

LeoX's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. Estou com um problema na verificação, pela lógica era para funcionar, já printei o level ta retornando normalmente, já troquei as verificações, estou com o level correto e acima do necessário para entrar no emprego, irei deixar o código para visualização: newEvent("LEO >> newPlayerInWork", root, function(id_player, data_work, level_work) if (not id_player) then notifyS(client, "Insira o id do player!", "error") return end if (not data_work) then notifyS(client, "Insira a elementData do emprego!", "error") return end if (not level_work) then notifyS(client, "Insira o level do emprego!", "error") return end local playerID = tonumber(id_player) if (playerID) then local target = getPlayerID(playerID) if (target) then local inJob = getPlayerInWork(playerID) if (inJob == true) then notifyS(target, "Você já possui um emprego. Saia do emprego atual para entrar em outro!", "error") return end local levelPlayer = tonumber(getElementData(target, shared.elementLevel)) or 0 if (inJob == false) then if (levelPlayer) then if levelPlayer >= tonumber(level_work) then -- linha com problema setElementData(target, data_work, true) notifyS(target, "Você foi contratado na empresa!", "success") dbExec(dbConn, "INSERT INTO works_members (player_id, work_name) VALUES (?, ?)", playerID, name_work) elseif levelPlayer < tonumber(level_work) then notifyS(target, "Você não possui experiência suficiente para este emprego!", "error") end end end else notifyS(target, "ID do jogador não encontrado!", "error") end end end) já verifiquei se o levelPlayer existe, não retorna nenhum erro no debugscript 3.
  2. olá, tem algum control name no toggleControl que impeça que a animação no jogador cancele ao cair? por exemplo de quando o player sair de cima de um veiculo? por que fiz um sistema de algema que esta algemando tudo certinho, mas quando o player é algemado em cima de um veiculo e ele precisa descer, quando ele desce a animação é cancelada
  3. Olá, Estou Fazendo Um Sistema De Prisão, Estou Com Um Problema Nesse Sistema Que Quando Eu Seleciono Um Artigo Que Esta Na Posição 5 Por Exemplo e na parte de artigos selecionados ta vazio, ele não fica em primeiro e sim na posição 5, queria saber se tem algum jeito de resolver esse problema, imagem abaixo e codigo tambem: Código Necessário: - Mostrar Artigos Selecionados: --/ Artigos Setados /-- dxCreateScrollBar("scroll:artigos:selecionados", 5, x * 1275, y * 473, x * 12, y * 296, 25, {using = {CONFIG.INTERFACE.USE_SCROLL_COLOR[1], CONFIG.INTERFACE.USE_SCROLL_COLOR[2], CONFIG.INTERFACE.USE_SCROLL_COLOR[3], 255}, scroll = {CONFIG.INTERFACE.SCROLL_COLOR[1], CONFIG.INTERFACE.SCROLL_COLOR[2], CONFIG.INTERFACE.SCROLL_COLOR[3], 255}, background = {CONFIG.INTERFACE.BG_SCROLL_COLOR[1], CONFIG.INTERFACE.BG_SCROLL_COLOR[2], CONFIG.INTERFACE.BG_SCROLL_COLOR[3], 255}}, (#CONFIG.ARTIGOS - options.visible_arts_selected) + 1, false) local scrollDataSelectedArtigos = dxGetPropertiesScrollBar("scroll:artigos:selecionados") if scrollDataSelectedArtigos and type(scrollDataSelectedArtigos) == "table" and next(scrollDataSelectedArtigos) then local data = scrollDataSelectedArtigos.actual local editboxID = tonumber(dxEditboxGetText("id-suspect")) local targetPlayer = getPlayerID(editboxID) for i = 0, options.visible_arts_selected - 1 do local values_selected_artigo = CONFIG.ARTIGOS[i + data] if values_selected_artigo and targetPlayer then if getElementData(targetPlayer, values_selected_artigo["data_name"]) then dxDrawText(values_selected_artigo["name"], x * 989 - 0, y * 485 + (i * 15), x * 117, y * 18, tocolor(255, 255, 255, 255), 0.6, fonts.bold, "left", "top") dxDrawRoundedRectangle(x*975, y*783, x*296, y*38, 5, tocolor(51, 51, 51)) -- Button Confirmar dxDrawText("Confirmar", x*1085, y*793, x*75, y*18, tocolor(255, 255, 255, 255), 0.5, fonts.bold, "left", "top") if (isCursorOnElement(x*975, y*783, x*296, y*38)) then dxDrawRoundedRectangle(x*975, y*783, x*296, y*38, 5, tocolor(31, 31, 31)) -- Button Confirmar dxDrawText("Confirmar", x*1085, y*793, x*75, y*18, tocolor(255, 255, 255, 255), 0.5, fonts.bold, "left", "top") end dxDrawText(values_selected_artigo["name"], x * 989 - 0, y * 485 + (i * 15), x * 117, y * 18, tocolor(255, 255, 255, 255), 0.6, fonts.bold, "left", "top") end end end end - Selecionar Artigo (OnClientClick) e o Mostrar Artigos Para Selecionar: --/ Mostrar Artigos /-- dxCreateScrollBar ("scroll:select:artigos", 3, x*944, y*364, x*12, y*405, 25, {using = {CONFIG.INTERFACE.USE_SCROLL_COLOR[1], CONFIG.INTERFACE.USE_SCROLL_COLOR[2], CONFIG.INTERFACE.USE_SCROLL_COLOR[3], 255}, scroll = {CONFIG.INTERFACE.SCROLL_COLOR[1], CONFIG.INTERFACE.SCROLL_COLOR[2], CONFIG.INTERFACE.SCROLL_COLOR[3], 255}, background = {CONFIG.INTERFACE.BG_SCROLL_COLOR[1], CONFIG.INTERFACE.BG_SCROLL_COLOR[2], CONFIG.INTERFACE.BG_SCROLL_COLOR[3], 255}}, (#CONFIG.ARTIGOS - options.visible_arts) + 1, false) local scrollDataSelectArtigos = dxGetPropertiesScrollBar ("scroll:select:artigos") if scrollDataSelectArtigos and type (scrollDataSelectArtigos) == "table" and next (scrollDataSelectArtigos) then local data = scrollDataSelectArtigos.actual for i = 0, options.visible_arts - 1 do local values_select_artigo = CONFIG.ARTIGOS[i + data] if values_select_artigo then dxDrawRoundedRectangle(x*653, y*378 - 0 + (i * 31), x*276, y*38, 5, tocolor(values_select_artigo.color_button1, values_select_artigo.color_button2, values_select_artigo.color_button3)) dxDrawText(values_select_artigo.art.." - "..values_select_artigo.name, x*689 - 15, y*388 + (i * 31), x*188, y*18, tocolor(255, 255, 255, 255), 0.5, fonts.bold, "left", "top") --/ Hover /-- if (isCursorOnElement(x*653, y*378 - 0 + (i * 31), x*276, y*38)) then dxDrawRoundedRectangle(x*653, y*378 - 0 + (i * 31), x*276, y*38, 5, tocolor(112, 143, 166)) dxDrawText(values_select_artigo.art.." - "..values_select_artigo.name, x*689 - 15, y*388 + (i * 31), x*188, y*18, tocolor(255, 255, 255, 255), 0.5, fonts.bold, "left", "top") end --/ Button Aplicar/Remover /-- --[[if (visible_aplicar == true) then dxDrawRoundedRectangle(x*643, y*783, x*296, y*38, 5, tocolor(31, 31, 31)) dxDrawText("Aplicar/Remover", x*729, y*793, x*123, y*18, tocolor(255, 255, 255, 255), 0.5, fonts.bold, "left", "top") end]]-- end end end -- Selecionar Artigos -- addEventHandler("onClientClick", root, function(b, s, id) if (b == "left" and s == "down") then if (isEventHandlerAdded("onClientRender", root, renderPrison)) then --/ Selecionar Artigo /-- editboxID = dxEditboxGetText("id-suspect") local scrollDataSelectArtigos = dxGetPropertiesScrollBar ("scroll:select:artigos") if scrollDataSelectArtigos and type (scrollDataSelectArtigos) == "table" and next (scrollDataSelectArtigos) then local data = scrollDataSelectArtigos.actual for i = 0, options.visible_arts - 1 do local values_select_artigo = CONFIG.ARTIGOS[i + data] if values_select_artigo then --/ Selecionar o Artigo /-- if (isCursorOnElement(x*653, y*378 - 0 + (i * 31), x*276, y*38)) then if (editboxID == "") then notifyC("Insira o ID Do Suspeito", "error") else triggerServerEvent("LEO >> SetarArtigo", localPlayer, localPlayer, values_select_artigo["art"], values_select_artigo["name"], editboxID, values_select_artigo["data_name"]) end end end end end end end end) Imagem:
×
×
  • Create New...