-
Posts
115 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Eficiencia
-
ola estou criando um painel mas estou tendo problema q quando o player clica no botão a açao desejada n executa client local dp = createMarker ( 1579.9151611328,-1635.1785888672,13.561134338379, "cylinder", 1.5, 0, 85, 0, 255 ) Painel_DP = false function DXPM() dxDrawRectangle(83, 136, 814, 449, tocolor(0, 0, 0, 184), false) dxDrawRectangle(83, 136, 814, 28, tocolor(10, 72, 175, 254), false) dxDrawText("PMESP", 468, 138, 509, 164, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawRectangle(115, 197, 195, 343, tocolor(0, 0, 0, 176), false) dxDrawText("Fardas", 130, 174, 300, 197, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) ------------------------------------------------------------------------------------- dxDrawRectangle(115, 217, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("Farda 1", 130, 212, 300, 235, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) -------------------------------------------------------------------------------- dxDrawRectangle(115, 245, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("Farda 2", 130, 240, 300, 263, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) ------------------------------------------------------ dxDrawRectangle(115, 273, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("Farda 3", 130, 268, 300, 291, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) ----------------------------------------------------------------------------- dxDrawRectangle(115, 301, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("Farda 4", 130, 296, 300, 319, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) ---------------------------------------------------------------------------- dxDrawRectangle(335, 197, 195, 343, tocolor(0, 0, 0, 176), false) dxDrawText("Viaturas", 345, 174, 515, 197, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) ------------------------------------------------------------------------------ dxDrawRectangle(335, 217, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("VTR 1", 345, 212, 515, 235, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) ------------------------------------------------------------------------------------ dxDrawRectangle(335, 245, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("VTR 2", 345, 240, 515, 263, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) ----------------------------------------------------------------------------------- dxDrawRectangle(335, 273, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawText("VTR 3", 345, 268, 515, 291, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "bottom", false, false, false, false, false) --------------------------------------------------------------------------------- dxDrawRectangle(335, 301, 195, 18, tocolor(129, 129, 129, 162), false) dxDrawImage(571, 181, 280, 36, ":PMESP/botao.png", 0, 0, 0, tocolor(10, 72, 175, 254), false) dxDrawText("Pegar Armamento", 636, 192, 782, 213, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawImage(571, 504, 280, 36, ":PMESP/botao.png", 0, 0, 0, tocolor(10, 72, 175, 254), false) dxDrawText("Concluido", 640, 514, 786, 535, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "top", false, false, false, false, false) dxDrawImage(574, 239, 277, 249, ":[SAMU]Departamento/Img/Logo.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(650, 309, 113, 106, ":[SAMU]Departamento/Img/dp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function render() if Painel_DP == false then Painel_DP = true addEventHandler("onClientRender", root, DXPM) showCursor(true) end end addEventHandler ( "onClientMarkerHit", dp, render ) function botoes() if Painel_DP == true then f1 = guiCreateButton( 115, 217, 195, 18, "", true ) setElementAlpha (f1, 0) f2 = guiCreateButton( 115, 245, 195, 18, "", true ) setElementAlpha (f2, 0) f3 = guiCreateButton( 115, 273, 195, 18, "", true ) setElementAlpha (f3, 0) f4 = guiCreateButton( 115, 301, 195, 18, "", true ) setElementAlpha (f4, 0) v1 = guiCreateButton( 115, 301, 195, 18, "", true ) setElementAlpha (v1, 0) v2 = guiCreateButton( 115, 301, 195, 18, "", true ) setElementAlpha (v2, 0) v3 = guiCreateButton( 115, 301, 195, 18, "", true ) setElementAlpha (v3, 0) addEventHandler ( "onClientGUIClick", f1, skin1, true ) addEventHandler ( "onClientGUIClick", f2, skin2, true ) addEventHandler ( "onClientGUIClick", f3, skin3, true ) addEventHandler ( "onClientGUIClick", f4, skin4, true ) addEventHandler ( "onClientGUIClick", v1, vtr1, true ) addEventHandler ( "onClientGUIClick", v2, vtr2, true ) addEventHandler ( "onClientGUIClick", v3, vtr3, true ) end end function skin1() triggerServerEvent("Farda1PM",getLocalPlayer()) end function skin2() triggerServerEvent("Farda2PM",getLocalPlayer()) end function skin3() triggerServerEvent("Farda3PM",getLocalPlayer()) end function skin4() triggerServerEvent("Farda4PM",getLocalPlayer()) end --------------------VTR-------------------- function vtr1() createVehicle ( 432, 1603.0577392578,-1684.6134033203,5.890625 ) end function vtr2() createVehicle ( 432, 1601.2092285156,-1692.5222167969,5.890625 ) end function vtr3() createVehicle ( 432, 1601.6129150391,-1699.3563232422,5.890625 ) end server function Farda1 () setElementModel ( source, 272 ) end addEvent("Farda1PM", true) addEventHandler("Farda1PM",root, Farda1) function Farda2 () setElementModel ( source, 273 ) end addEvent("Farda2PM", true) addEventHandler("Farda2PM",root, Farda2) function Farda3 () setElementModel ( source, 0 ) end addEvent("Farda3PM", true) addEventHandler("Farda3PM",root, Farda3) function Farda4 () setElementModel ( source, 0 ) end addEvent("Farda4PM", true) addEventHandler("Farda4PM",root, Farda4) function Farda5 () setElementModel ( source, 0 ) end addEvent("Farda5PM", true) addEventHandler("Farda5PM",root, Farda5) function Farda6 () setElementModel ( source, 23 ) end addEvent("Farda6PM", true) addEventHandler("Farda6PM",root, Farda6) ----------------------------------------------------------------------------------------------------------
-
Recomendo que baixe um da internet, tem varios paineis mt bons na net
-
ok
-
jonas eu estava dando uma mexida e acabei dando uma arrumada local arrumar1 = createMarker( 2063.1059570313,-1831.181640625,13.546875 -1, "cylinder", 1.5, 255, 255, 0, 170 ) local preco = 3000 function Consertar (thePlayer) local driver = getVehicleOccupant ( thePlayer ) local vehicles = getElementsByType("vehicle") local vehicleHealth = getElementHealth ( driver ) if vehicleHealth == 100 then outputChatBox("Seu Veículo não está quebrado") elseif vehicleHealth <= 70 then for _, vehicle in pairs(vehicles) do fixVehicle(vehicle) takePlayerMoney( thePlayer, preco ) outputChatBox("Você consertou seu carro por "..preco.."") end end end addEventHandler("onMarkerHit", arrumar1, Consertar) vou fazer algo baseado no codigo que você montou
-
assim estou fazendo um script para consertar o veiculo quando o player passar no marker, estou tendo um problema que a funçao se repete varias vezes mesmo depois de o carro ja ter sido reparado. Gostaria de saber quais funçoes posso usar para checar a vida do veiculo e impedir que a funçao aconteça. codigo: local arrumar1 = createMarker( 2063.1059570313,-1831.181640625,13.546875 -1, "cylinder", 1.5, 255, 255, 0, 170 ) local preco = 3000 function Consertar (thePlayer) local vehicles = getElementsByType("vehicle") for _, vehicle in pairs(vehicles) do fixVehicle(vehicle) takePlayerMoney( thePlayer, preco ) outputChatBox("Você consertou seu carro por "..preco.."") end end addEventHandler("onMarkerHit", arrumar1, Consertar)
-
Na sua linha 13 tem um erro local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function () local Dinheiro_Mao = getPlayerMoney ( localPlayer ) local Dinheiro_Banco = getElementData ( localPlayer, "Bank:Caixa" ) or 0 dxDrawImage(screenW * 0.6504, screenH * 0.0130, screenW * 0.3398, screenH * 0.2344, ":[BVN]HUD2/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("R$", screenW * 0.8193, screenH * 0.0482, screenW * 0.8408, screenH * 0.0742, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("R$", screenW * 0.8193, screenH * 0.1224, screenW * 0.8408, screenH * 0.1484, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Dinheiro_Mao, screenW * 0.8408, screenH * 0.1224, screenW * 0.9434, screenH * 0.1497, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Dinheiro_Banco, screenW * 0.8408, screenH * 0.0482, screenW * 0.9434, screenH * 0.0755, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Cargo.., screenW * 0.8193, screenH * 0.1966, screenW * 0.9219, screenH * 0.2240, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) end ) vou tentar arrumar pra vc Client local screenW, screenH = guiGetScreenSize() addEventHandler("onClientRender", root, function () local Dinheiro_Mao = getPlayerMoney ( localPlayer ) local Dinheiro_Banco = getElementData ( localPlayer, "Bank:Caixa" ) or 0 local Cargo = getElementData(localPlayer, "Cargo" ) dxDrawImage(screenW * 0.6504, screenH * 0.0130, screenW * 0.3398, screenH * 0.2344, ":[BVN]HUD2/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("R$", screenW * 0.8193, screenH * 0.0482, screenW * 0.8408, screenH * 0.0742, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText("R$", screenW * 0.8193, screenH * 0.1224, screenW * 0.8408, screenH * 0.1484, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Dinheiro_Mao, screenW * 0.8408, screenH * 0.1224, screenW * 0.9434, screenH * 0.1497, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Dinheiro_Banco, screenW * 0.8408, screenH * 0.0482, screenW * 0.9434, screenH * 0.0755, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) dxDrawText(""..Cargo, screenW * 0.8193, screenH * 0.1966, screenW * 0.9219, screenH * 0.2240, tocolor(255, 255, 255, 255), 1.10, "default-bold", "left", "top", false, false, false, false, false) end) Server function setCargo(source) if player then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Acl")) then -- Nome da ACL setElementData(source, "Cargo") end end end EDIT:Não testado
-
Alguém que possa ajudar neste script <3
Eficiencia replied to BrasilFavela's topic in Programação em Lua
Pfv amigo coloque o script de forma correta clicando em <> Bom mas prosseguindo, vc deve baixar o mod que responde a addNotification -
galera, andei dando uma pesquisada e achei shader para markers (Eu sei que muitos devem te-lo, mas resolvi mandar aqi para se alguém quiser) bom vou deixar ai o link : https://community.multitheftauto.com/index.php?p=resources&s=details&id=16039
-
ele esta tentando deixar os staffs invisiveis
-
@Jonas^tenta ajudar o mano ai.
-
n sei se vai dar certo mas tente incluir em sua funçao esse comando https://wiki.multitheftauto.com/wiki/SetPlayerNametagColor
-
sim infelizmente o fórum tem esse erro
-
local now = getRealTime () -- Recebe os dados do momento atual. local hours = now.hour local minutes = now.minute local seconds = now.second local days = now.monthday local months = now.month local years = now.year if (hours < 10) then -- Adiciona um 0 na frente, caso seja menor que 10. hours = "0"..hours end if (minutes < 10) then minutes = "0"..minutes end if (seconds < 10) then seconds = "0"..seconds end function horas() dxDrawText(" "..hours..":"..minutes.." ", x*1133, y*100, x*956, y*65, tocolor(255, 255, 255, 255), x*1.00, dxfont0_font, "left", "center", false, false, false, false, false) end addEventHandler("onClientRender", root, horas) EDIT:Nao testado
-
passou no debug?? ahh acho q achei a falha n tem o addEventHandler("onClientRender", root, nomedopainel)
-
ou simplesmente faça isso com os resources mais recentes e que tenham a ver com veiculos ou policia
-
blz vou dar uma olhada nele
-
@Jonas^Obg agora so gostaria de saber se existe forma de eu por o objeto reto na maos do personagens n estou conseguindo por reto ele so fica torto
-
para script para por o objeto na mao do player. tipo o player pega o objeto mas o objeto fica zuado
-
pessoal gostaria de saber como faço a rotaçao de um objeto, estou editando uns scripts e ta dificil de acertar a rotaçao gostaria de saber se existe algum site ou algo do tipo q me de o Rx Ry Rz
