-
Posts
343 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Doongogar
-
a linha do retangulo do não é essa dxDrawRoundedRectangle(screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) e o do mouse é essa elseif isMouseInPosition( screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533 ) then quando clicko no sim funciona porém no não não acontece nada o codigo todo ta assim: -------------------------------------------------- Funções Utils -------------------------------------------------- function dxDrawRoundedRectangle(x, y, width, height, radius, color, postGUI, subPixelPositioning) dxDrawRectangle(x+radius, y+radius, width-(radius*2), height-(radius*2), color, postGUI, subPixelPositioning) dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI) dxDrawCircle(x+radius, (y+height)-radius, radius, 90, 180, color, color, 16, 1, postGUI) dxDrawCircle((x+width)-radius, (y+height)-radius, radius, 0, 90, color, color, 16, 1, postGUI) dxDrawCircle((x+width)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI) dxDrawRectangle(x, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning) dxDrawRectangle(x+radius, y+height-radius, width-(radius*2), radius, color, postGUI, subPixelPositioning) dxDrawRectangle(x+width-radius, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning) dxDrawRectangle(x+radius, y, width-(radius*2), radius, color, postGUI, subPixelPositioning) end 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 ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end function isCursorOverText(posX, posY, sizeX, sizeY) if ( not isCursorShowing( ) ) then return false end local cX, cY = getCursorPosition() local screenWidth, screenHeight = guiGetScreenSize() local cX, cY = (cX*screenWidth), (cY*screenHeight) return ( (cX >= posX and cX <= posX+(sizeX - posX)) and (cY >= posY and cY <= posY+(sizeY - posY)) ) end -------------------------------------------------- Funções / Painel -------------------------------------------------- local screenW, screenH = guiGetScreenSize() function DX_Entregas() dxDrawRectangle(screenW * 0.3794, screenH * 0.2467, screenW * 0.2288, screenH * 0.4833, tocolor(31, 31, 31, 255), false) dxDrawRectangle(screenW * 0.3794, screenH * 0.2356, screenW * 0.2288, screenH * 0.0111, tocolor(116, 0, 165, 255), false) dxDrawRoundedRectangle(screenW * 0.3956, screenH * 0.2711, screenW * 0.1969, screenH * 0.3333, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.4019, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawText("SIM", screenW * 0.4200, screenH * 0.6489, screenW * 0.4788, screenH * 0.6778, tocolor(25, 232, 4, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("NÃO", screenW * 0.5240, screenH * 0.6489, screenW * 0.5837, screenH * 0.6778, tocolor(237, 0, 0, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Você Quer Trabalhar Entregando Drogas?", screenW * 0.4200, screenH * 0.2822, screenW * 0.6019, screenH * 0.3122, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber uma Van no Local ao Lado", screenW * 0.4044, screenH * 0.3267, screenW * 0.5863, screenH * 0.3567, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Entregar a Carga em um Local Secreto", screenW * 0.4044, screenH * 0.3567, screenW * 0.5863, screenH * 0.3867, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber de R$8000 a R$9000 de Dinheiro Sujo", screenW * 0.4044, screenH * 0.4167, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Caso Saia da Van Perderá a Carga", screenW * 0.4044, screenH * 0.4467, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Caso a Van Quebre Perderá a Carga", screenW * 0.4044, screenH * 0.4767, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) end addEvent("Open:Ilegal", true) addEventHandler("Open:Ilegal", root, function() if states then removeEventHandler("onClientRender", root, DX_Entregas) else addEventHandler("onClientRender", root, DX_Entregas) end states = not states showCursor(states) end) bindKey("backspace", "down", function(key, keyState) if states and isCursorShowing() then removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) states = not states end end) addEventHandler( "onClientClick", root, function( button, state ) if states == true then if ( button == "left" and state == "down" ) then if isMouseInPosition( screenW * 0.4019, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533 ) then if getElementData(localPlayer, "EntregadorD") == false then setElementData(localPlayer, "EntregadorD", true) exports._infobox:addNotification("Você Agora Trabalha na Entrega Ilegal!", "info") removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) elseif isMouseInPosition( screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533 ) then if getElementData(localPlayer, "EntregadorD") == true then setElementData(localPlayer, "EntregadorD", false) exports._infobox:addNotification("Você Saiu do Emprego de Entregas Ilegais!", "info") removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) else removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) end end end end end end ) perdão não colocar as funções úteis achei que quanto menos linhas, menos desgastante é ler
-
creio que em vez de "source" você teria que usar o "player", para filtrar o loop para somente as pessoas que tem o element data e o "elseif" aparenta estar fazendo a mesma coisa que o "if" acima então tirei e indentei o codigo ComandoDoChatGlobal = "copom" function adminchat ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do if ( isPlayerOnGroup ( player ) ) then conta = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup ("user."..conta, aclGetGroup ( "Policial" ) ) then if getElementData(player, "TrabalhoPolicial") == true then outputChatBox("#FF0000[Facção#FF0000]#ffffff "..getPlayerName(thePlayer).. "#FF0000:#ffffff "..message, player, 255, 255, 255, true) end end end end end setElementData ( thePlayer, "Chat:Avisado", true ) setElementData ( thePlayer, "Chat:Delay1",true ) setTimer ( setElementData, 5000, 1, thePlayer, "Chat:Delay1", false ) end addCommandHandler ( ComandoDoChatGlobal, adminchat ) function isPlayerOnGroup ( thePlayer ) local account = getPlayerAccount ( thePlayer ) local inGroup = false for _, group in ipairs ( { "Policial" } ) do if isObjectInACLGroup ( "user.".. getAccountName ( account ), aclGetGroup ( "Policial" ) ) then inGroup = true break end end return inGroup end
-
Pegar todos os resource e mandar uma mensagem pro discord
Doongogar replied to Doongogar's topic in Programação em Lua
sobre o quote, sinto muito eu não sabia, sobre o script diz que name deu um valor booleano e o primeiro argumento de getResourceName tbm esta dando erro: -
eu fiz um sistema pra quando alguem morrer ficar 7 segundos com a colisão em false em relação aos outros players usando a função setElementCollidableWith para que os players não fiquem presos uns nos outros no local aonde spawna após a morte pórem eu queria modificar isso para o player morrer e então setar a colisão em false, e quando ele saisse de dentro do player setasse em true novamente, no caso teria que ter algo verificando se existe algum player em colisão para setar em false a principio, podem ajudar?
-
aqui quando eu clicko no botão de sair do trabalho não acontece nada, nem da erro no debug addEvent("Open:Ilegal", true) addEventHandler("Open:Ilegal", root, function() if states then removeEventHandler("onClientRender", root, DX_Entregas) else addEventHandler("onClientRender", root, DX_Entregas) end states = not states showCursor(states) end) bindKey("backspace", "down", function() if states == true and isCursorShowing() then removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) end end) addEventHandler( "onClientClick", root, function( button, state ) if states == true then if ( button == "left" and state == "down" ) then if isMouseInPosition( screenW * 0.4019, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533 ) then if getElementData(localPlayer, "EntregadorD") == false then setElementData(localPlayer, "EntregadorD", true) exports._infobox:addNotification("Você Agora Trabalha na Entrega Ilegal!", "info") removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) elseif isMouseInPosition( screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533 ) then if getElementData(localPlayer, "EntregadorD") == true then exports._infobox:addNotification("Você Saiu do Emprego de Entregas Ilegais!", "info") setElementData(localPlayer, "EntregadorD", false) removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) else removeEventHandler("onClientRender", root, DX_Entregas) showCursor(false) end end end end end end ) e tambem quando clicko na posição do botão mesmo sem o painel estar aberto as funções são executadas como se estivesse aberto
-
então minha scoreboar é a base de banners, então aparece quem é fundador, staff, vip ou cidadão la eu queria que ficassem os fundadores em cima depois staff's, depois vip's, e depois os cidadãos como eu poderia fazer isso: function scoreBoardDX() exports[""..config.Blur]:dxDrawBluredRectangle(x*0, y*0, screenW, screenH, tocolor(255, 255, 255, 255), false) local Jogador = getPlayerName(localPlayer) local ID = getElementData(localPlayer, "ID") or "0" local Emprego = getElementData(localPlayer, "Emprego") or "Desempregado" local Element_X = 0 local Element_Y = 0 local ava_l = getElementData( localPlayer, "conta:avatar" ) or 0 players = getElementsByType( "player" ) dxDrawRoundedRectangle(x*510, y*132, x*346, y*503, tocolor(28, 28, 28, 243), 10) dxDrawRoundedRectangle(x*510, y*132, x*345, y*36, tocolor(41, 41, 41, 255), 10) dxDrawRectangle(x*754, y*139, x*96, y*24, tocolor(28, 28, 28, 231), false) dxDrawText(#players..'/'..config.Slot, x*754, y*140, x*850, y*163, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawRectangle(x*754, y*139, x*96*#players/100, y*24, tocolor(config.R, config.G, config.B, 255), false) dxDrawRectangle(x*520, y*261, x*326, y*4, tocolor(41, 41, 41, 255), false) dxDrawText("Jogadores | FPS:"..GetFPS(), x*536, y*134, x*723, y*170, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawImage(x*828, y*238, x*18, y*17, "images/settings.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(x*521, y*178, x*75, y*75, "avatars/"..ava_l..".png", 0, 0, 0, tocolor(255, 255, 255, 255), false) local level = getElementData( localPlayer, ""..config.Level.."" ) or 0 local name = getElementData( localPlayer, "conta:nome" ) or 'Desconhecido' local id = getElementData( localPlayer, ""..config.ID.."" ) or 'N/A' local din = getPlayerMoney(localPlayer) local DinheiroB = getElementData( localPlayer, ""..config.Banco.."" ) or 'N/A' local emrepgo = getElementData( localPlayer, "Emprego" ) or 'Desempregado' dxDrawText(""..getPlayerName(localPlayer).." | "..id.."", x*602, y*165, x*765, y*217, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Dinheiro:"..din.." Banco:"..DinheiroB, x*602, y*197, x*765, y*217, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText(emrepgo, x*602, y*209, x*765, y*238, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, false, false, false) dxDrawText("Level : "..level, x*603, y*233, x*699, y*251, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "center", false, false, true, false, false) for k, player in ipairs(getElementsByType("player")) do local Ping = getPlayerPing(player) local name = getPlayerName(player) if (k > PageInventory and Element_X < MaxInventory) and name ~= "" then dxDrawRoundedRectangle(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, tocolor(41, 41, 41, 255), 4) -- Borda de trás Player local avatar = getElementData( player, "conta:avatar" ) or 0 if getElementData(player, "Cargo") == "Fundador" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/fundador.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end dxDrawImage( 650*sx + Element_X * (sx*150), 383*sy + Element_Y * (sy*55), 40*sx, 40*sy, "avatars/"..avatar..".png", 0, 0, 0, tocolor( 255, 255, 255, 255 ), true ) if getElementData(player, "Cargo") == "Patrocinador" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/6.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "Booster" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/7.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "Youtuber" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/3.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "Admin" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/2.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "VIP" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/5.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "Membro" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/4.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "Policial" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/8.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end if getElementData(player, "Cargo") == "GANG" then dxDrawImage(643*sx + Element_X * (sx*150), 375*sy + Element_Y * (sy*55), 400*sx, 51*sy, "banners/9.png", 0, 0, 0, tocolor(255, 255, 255, 255)) end dxDrawText(name, 700*sx + Element_X * (sx*150), 387*sy + Element_Y * (sy*55), 797*sx, 373*sy, tocolor(255, 255, 255, 255), 1.50*sy, FontN, "left", "top", false, false, true, true, false) dxDrawText(Ping, 985*sx + Element_X * (sx*150), 390*sy + Element_Y * (sy*55), 1010*sx, 364*sy, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, true, false) -- Ping Element_X = Element_X + 1 if Element_X == 1 then Element_Y = Element_Y + 1 Element_X = 0 end if Element_Y == 9 then Element_Y = 1000 end end players = getElementsByType("player") local progress = #players if progress == 500 then progress = progress-138 end if progress == 400 then progress = progress-140 end if progress == 300 then progress = progress-140 end if progress == 200 then progress = progress-140 end if progress == 100 then progress = progress-60 end local cX, cY = interpolateBetween(0, 0, 0, progress, 0, 0, progress, "Linear") players = getElementsByType( "player" ) end perdão o codigo grande, não sei oque é importante, fiquei perdido nesse codigo
-
então eu to usando esse codigo aqui, ele chega a ficar imortal contra tiros e talz, mas o stealth kill não ta funcionando(sem erros no debug) [Sim, estou setando o element data "imortal" nos ped's] function onStealthKill (targetPed) if (getElementData (targetPed, "imortal")) then cancelEvent() end end addEventHandler ("onPlayerStealthKill", root, onStealthKill) function cancelDamage() if (getElementData (source, "imortal")) then cancelEvent() end end addEventHandler ("onClientPedDamage", root, cancelDamage)
-
então na minha resolução fica normal, mas a resolução do meu amigo é diferente e ele disse que as letras saem para fora do painel poderiam me ajudar? local screenW, screenH = guiGetScreenSize() function DX_Entregas() dxDrawRectangle(screenW * 0.3794, screenH * 0.2467, screenW * 0.2288, screenH * 0.4833, tocolor(31, 31, 31, 255), false) dxDrawRectangle(screenW * 0.3794, screenH * 0.2356, screenW * 0.2288, screenH * 0.0111, tocolor(116, 0, 165, 255), false) dxDrawRoundedRectangle(screenW * 0.3956, screenH * 0.2711, screenW * 0.1969, screenH * 0.3333, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.4019, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawText("SIM", screenW * 0.4200, screenH * 0.6489, screenW * 0.4788, screenH * 0.6778, tocolor(25, 232, 4, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("NÃO", screenW * 0.5240, screenH * 0.6489, screenW * 0.5837, screenH * 0.6778, tocolor(237, 0, 0, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Você Quer Trabalhar Entregando Drogas?", screenW * 0.4200, screenH * 0.2822, screenW * 0.6019, screenH * 0.3122, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber uma Van no Local ao Lado", screenW * 0.4044, screenH * 0.3267, screenW * 0.5863, screenH * 0.3567, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Entregar a Carga em um Local Secreto", screenW * 0.4044, screenH * 0.3567, screenW * 0.5863, screenH * 0.3867, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber de R$8000 a R$9000 de Dinheiro Sujo", screenW * 0.4044, screenH * 0.4167, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Caso Saia da Van Perderá a Carga", screenW * 0.4044, screenH * 0.4467, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Caso a Van Quebre Perderá a Carga", screenW * 0.4044, screenH * 0.4767, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, false, false, false) end
-
Pegar todos os resource e mandar uma mensagem pro discord
Doongogar replied to Doongogar's topic in Programação em Lua
function Resources(res) local resourcesP = getResources(res) local resourcesName = getResourceFromName(resourcesP) for i, v in ipairs(res) do enviarMsg(" Resource ["..i.."]") end end addCommandHandler("rsc",Resources) desse jeito?, tentei escrever lá naquele "quote" mas n foi... -
Painel DX abre e fecha Instantâneamente
Doongogar replied to Doongogar's topic in Programação em Lua
mano muito obrigado, eu tava quebrando a cabeça kkk, errinho bobo, lord henry salvando vidas -
cria um arquivo chamado "blips.lua" na mesma pasta do mod de aluguel e coloca essa linha no meta.xml do aluguel de bike: <script src="blips.lua" type="server" /> e la no arquivo blips.lua você coloca o codigo que te mandei
-
eu estava tentando fazer um codigo a partir de um ant backdoor ja que ele funciona no formato que eu quero a cada resource tem uma linha, mas está dando erro no loop. Poderiam me ajudar? function Resources(source) local res = getResourceFromName(resource) for i, v in ipairs(res) do enviarMsg(" Resource ["..i.."]") end end addCommandHandler("rsc",Resources)
-
isso esta sendo lido como shared?
-
eu acho que conheço o mod de aluguel de bikes que você esta utilizando e se não me engano ele é compilado tente colocar isso no final do codigo: function BlipsVisiveis() for i,blips in pairs(getElementsByType("blip")) do -- loop para getar todos os blips if getBlipIcon(blips) == 56 then -- verificar se os blips são do modelo 56 setBlipVisibleDistance(blips, 150) -- seta a distancia da visibilidade em 150 end -- fecha o if end -- fecha o loop end -- fecha a função addEventHandler("onResourceStart", root, BlipsVisiveis) -- determina que a função será executada ao startar o resource (coloque no lado server-side)
-
primeiro você tem que achar aonde o blip ta sendo criado, depois ver oque nomeia ele Ex: function BlipVisiviel() NomeBlip = createBlip(x, y, z, 0) setBlipVisibleDistance(NomeBlip, 150) end addEventHandler("onResourceStart", BlipVisivel) >Utilize a ferramenta "code para adicionar codigos ao seu post<
-
na parte em que estiver criando o blip
-
Para inserir um script use a ferramente "code" acima você pode usar o recurso: setBlipVisibleDistance assim: setBlipVisibleDistance(NomedoBlip, Distancia) no seu caso a distancia seria 150
-
quando eu passo no marke ele pisca ligeiramente: --Server function MensagemMarker(thePlayer) if not getPedOccupiedVehicle(thePlayer) then if getElementData(thePlayer, "EntregadorD") == false then outputChatBox("Para Entregar Drogas Digite /drogas", thePlayer, 255, 255, 255, true) triggerClientEvent(thePlayer, "Open:Ilegal", thePlayer) else outputChatBox("Para Sair Dessa Vida Digite /drogas", thePlayer, 255, 255, 255, true) end end end addEventHandler("onMarkerHit", MarkerEmprego, MensagemMarker) -- Client local screenW, screenH = guiGetScreenSize() local states = false function DX_Entregas() if not isCursorShowing() then showCursor(true) dxDrawRectangle(screenW * 0.3794, screenH * 0.2467, screenW * 0.2288, screenH * 0.4833, tocolor(31, 31, 31, 255), false) dxDrawRectangle(screenW * 0.3794, screenH * 0.2356, screenW * 0.2288, screenH * 0.0111, tocolor(116, 0, 165, 255), false) dxDrawRoundedRectangle(screenW * 0.3956, screenH * 0.2711, screenW * 0.1969, screenH * 0.3333, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.4019, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawRoundedRectangle(screenW * 0.5094, screenH * 0.6444, screenW * 0.0769, screenH * 0.0533, 15, tocolor(82, 82, 82, 224), false) dxDrawText("SIM", screenW * 0.4200, screenH * 0.6489, screenW * 0.4788, screenH * 0.6778, tocolor(25, 232, 4, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("NÃO", screenW * 0.5240, screenH * 0.6489, screenW * 0.5837, screenH * 0.6778, tocolor(237, 0, 0, 255), 3.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("Você quer trabalhar entregando drogas?", screenW * 0.4200, screenH * 0.2822, screenW * 0.6019, screenH * 0.3122, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber uma van no local ao lado", screenW * 0.4044, screenH * 0.3267, screenW * 0.5863, screenH * 0.3567, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Entregar a carga em um local secreto", screenW * 0.4044, screenH * 0.3567, screenW * 0.5863, screenH * 0.3867, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("--Receber de 10000 a 13000 de Dinheiro Sujo", screenW * 0.4044, screenH * 0.3867, screenW * 0.5863, screenH * 0.4211, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) end end addEvent("Open:Ilegal", true) addEventHandler("Open:Ilegal", root, function() if states == false then addEventHandler("onClientRender", getRootElement(), DX_Entregas) states = true else removeEventHandler("onClientRender", getRootElement(), DX_Entregas) states = false end end)
-
local shape2 = createColRectangle(-673.51763916016, -594.61047363281, 15, 15) function AntCarro(player, seat, jacked) if (getElementType(player) == "player") then if isElementWithinColShape(player, shape2) then cancelEvent() end end end addEventHandler ( "onVehicleStartEnter", getRootElement(), AntCarro ) porque não ta funcionando?????
-
Quando eu hito o segundo marker da função "MarkerEntregaFunction3" não acontece nada nem da nenhum erro function MarkerEntregaFunction(thePlayer) if getElementType(thePlayer) ~= "player" then return end if isPedInVehicle(thePlayer) then local ocupado = getPedOccupiedVehicle(thePlayer) if getElementData(thePlayer, "EntregadorD") == true and getElementData(ocupado, "kombiEntregas") == true and getElementData(thePlayer, "Entregou") == false then givePlayerMoney(thePlayer, 1000) setElementVisibleTo(MarkerEntrega, thePlayer, false) setElementVisibleTo(BlipEntrega, thePlayer, false) setElementVisibleTo(MarkerEntrega2, thePlayer, true) setElementVisibleTo(BlipEntrega2, thePlayer, true) setElementData(thePlayer, "Entregou", true) end end end addEventHandler("onMarkerHit", MarkerEntrega, MarkerEntregaFunction) MarkerEntrega3 = createMarker(-1196.2092285156,-1028.4724121094,129.21192932129 - 1, "cylinder", 2.5, 69, 69, 69) BlipEntrega3 = createBlipAttachedTo(MarkerEntrega2, 0) setElementVisibleTo(MarkerEntrega3, root, false) setElementVisibleTo(BlipEntrega3, root, false) function MarkerEntregaFunction3(thePlayer) if getElementType(thePlayer) ~= "player" then return end if isPedInVehicle(thePlayer) then local ocupado = getPedOccupiedVehicle(thePlayer) if getElementData(thePlayer, "EntregadorD") == true and getElementData(ocupado, "kombiEntregas") == true and getElementData(thePlayer, "Entregou2") == false then givePlayerMoney(thePlayer, 1000) setElementVisibleTo(MarkerEntrega2, thePlayer, false) setElementVisibleTo(BlipEntrega2, thePlayer, false) setElementVisibleTo(MarkerEntrega3, thePlayer, true) setElementVisibleTo(BlipEntrega3, thePlayer, true) setElementData(thePlayer, "Entregou2", true) end end end addEventHandler("onMarkerHit", MarkerEntrega3, MarkerEntregaFunction3)
-
obrigado, eu nunca tinha usado esse recurso "tonumber"
