Jump to content

Joaovit13

Members
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Joaovit13

  1. Olá, amigo tudo bem? Bom o senhor precisará fazer uma vistoria no seu servidor, pode ter alguns mods que tem muitos setElementDatas por exemplo, como também pode ser até mesmo a hospedagem que o senhor comprou. Espero ter ajudado!
  2. Olá, tudo bem? A partir do momento que ele iniciar a patrulha use: setElementData Logo após faça uma verificação usando if, se ele estiver com a data caso ele estiver utilize o: setTimer criando uma função dentro dele aonde utiliza o: getPlayerMoney entregando o dinheiro desejado. Crie outra função aonde verifica se o jogador quitou ou caiu do servidor utilizando: onPlayerQuit e cancelando o evento utilizando: cancelEvent e retirando a data que a função setou nele. Bom acho que é isso, Tenha uma Boa sorte!
  3. Olá, tudo bem? Bem eu estava querendo adicionar águas nos esgotos do mta, porém acabei que chegando numa rua sem fim, tentei verificar as funções setWeather, setWeatherBlended. Porém elas foram feitas para mudar o clima da água, será que existe alguma função aonde teria como adicionar nos locais?
  4. Olá, tudo bem? Bom amigo existe uma função aqui no fórum aonde você consegue colocar o script para ficar mais legível. https://prnt.sc/15qpv29 Já na função de criar o carro seria essa: createVehicle E a função de destruir o veiculo seria essa: destroyElement Tenha uma boa sorte
  5. Olá, tudo bem? Para criar o veiculo você precisa dessa função: createVehicle Para deixar a cor do veiculo já pré-definida use essa função: setVehicleColor Tenha uma boa sorte!
  6. Olá, bom dia. Eu queria saber se existe uma forma de sumir com uma marker e deixa-lá ainda funcional.
  7. Por acaso o recurso dgs está ativado? Esse pode ser o problema.
  8. Olá, tudo bem? Bom eu já tive esse problema e consegui resolver da seguinte forma: 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 E em vez de usar o isCursorElement use o isMouseInPostion(). Ele funciona da seguinte forma dentro do painel dx aonde você deseja clicar use ele dessa forma como exemplo: if isMouseInPosition(screenW * 0.3133, screenH * 0.5768, screenW * 0.0836, screenH * 0.0794) then As posições dele deve ser a da posição do local aonde deseja clicar. Obs: A função isMouseInPosition deve estar no final do seu código do client.
  9. Olá, tudo bem? Para isso você pode usar: AclGroupAddObject para adicionar o usuário quando digitar um comando na tag de Staff que tem acesso ao painel p. AclGroupRemoveObject para tirar o usuário da tag Staff quando digitar um comando para sair
  10. Ah sim, é e pra remover existe alguma função assim? Ah, encontrei como remove obrigado.
  11. Olá, eu queria saber qual função eu utilizo para setar uma acl pro player automáticamente.
  12. Bom @miiguelzoutra forma é usar o OnClientPlayerDamage essa função é client-side
  13. addEventHandler ( "onPlayerDamage", root, nomeDaFunction ) Olá, miiguelz, acredito que essa função possa te ajudar, como você disse ele só avisa caso o jogador tome dano de qualquer forma: onPlayerDamage. Boa sorte!
  14. Tente usar o comando addEventHandler mals pelo next page kk
  15. function portao1 (player) local arma = getPedWeapon (player) local wl = getPlayerWantedLevel (player) if getElementData (player, "Policial") == true then return extensions.scripts_Dxmessages: outputDx (player, "#CFCFCF (# 1E90FFINFO # CFCFCF) #ffffffVoce é Policia Não pode Roubar! "," error ") end if arma == 0 or arma == 1 or arma == 2 or arma == 3 or arma == 4 or arma == 5 or arma == 6 or arma == 7 or arma == 8 or arma == 9 or arma == 16 or arma == 17 or arma == 18 or arma == 19 or arma == 20 or arma == 21 or arma == 22 or arma == 23 or arma == 24 or arma == 26 or arma == 27 or arma == 28 or arma == 32 or arma == 33 or arma == 34 or arma == 46 or arma == 15 or arma == 42 then return export.scripts_Dxmessages:outputDx(player, "#CFCFCF (# 1E90FFINFO # CFCFCF) # ffffffVocê Precisa de um Fuzil (M4, AK-47, MP5)", "error") end if roubobanco1 == false then extensions.scripts_Dxmessages: outputDx(root, "#CFCFCF (# 1E90FFINFO # CFCFCF) #ffffffUm Assalto ao Banco Central Iniciado", 'info') moveObject(portao, 95000, 1137.8000488281, -1118.3000488281, 25) setPlayerWantedLevel(player, 6) --destroyElement ( player, 6) roubo1) end setTimer (function () setElementAlpha (roubo1, 0) end, 1, 0) setTimer (function () setElementAlpha (roubo1, 80) end, 3000,0) end addEvent ("inicio", true) addEventHandler ("inicio", root, portao1) bom teve parte que você usou: ou/exportações/então. Tomei cuidado
  16. marker_aleatoriosS = { 1872.08, -1308.8, 18.147, 1893.097, -1314.732, 23.151, 1892.831, -1316.274, 28.152, 1872.101, -1317.594, 33.147, 1876.034, -1321.604, 38.147, 1876.088, -1309.743, 43.147, 1873.865, -1322.412, 48.069, --Para não pegar repetido 1872.08, -1308.8, 18.147, 1893.097, -1314.732, 23.151, 1892.831, -1316.274, 28.152, 1872.101, -1317.594, 33.147, 1876.034, -1321.604, 38.147, 1876.088, -1309.743, 43.147, 1873.865, -1322.412, 48.069, } Object_ferro = {} marker_EntregarS = {} --ID do objeto barra de ferro 2960 function pegarFerroS(player,cmd) local x, y, z = getElementPosition(marker_ferro) local Random_Pos = math.random(#marker_aleatoriosS) if not isPedInVehicle(player) then if isElementWithinMarker(player, marker_ferro) then if getElementData(player, "Ferro") == false then if getElementData(player, "Pedreiro") == true then setPedAnimation(player, "CARRY", "liftup", 1.0, false) setTimer(function() if isElement(Object_ferro[player]) then destroyElement(Object_ferro[player]) end if isElement(marker_EntregarS[player]) then destroyElement(marker_EntregarS) end setElementData(player, "Recompensa", 0) setPedAnimation(player, nil) setElementData(player, "Ferro", true) toggleControl(player, "jump", false) toggleControl(player, "fire", false) toggleControl(player, "aim_weapon", false) setPedAnimation( player, "CARRY", "crry_prtial", 4.1, true, true, true ) marker_EntregarS[player] = createMarker ( marker_aleatoriosS[Random_Pos][1], marker_aleatoriosS[Random_Pos][2], marker_aleatoriosS[Random_Pos][3] -2.2, "cylinder", 2.5, 16, 111, 231, 50) setElementVisibleTo(marker_EntregarS, root, false) setElementVisibleTo(marker_EntregarS, player, true) addEventHandler("onMarkerHit", marker_EntregarS[player], fim_Emprego) Object_ferro[player] = createObject(2960, x, y, z) exports.bone_attach:attachElementToBone(Object_ferro[player], player, 4, 0, 0.4, - 0.6, -90, 0, 0 ) end, 1000,1) end end end end end addCommandHandler("ferro", pegarFerroS) Essa função está retornando erro no createMarker attemp to index upvalue 'Random_Pos' <a number value> não encontrei aonde está meu erro.
  17. O arquivo .lua dele. mais antes tente ver se você realmente criou a tag no painel p em: Resource/Manage ACL/Create Group/nome do grupo/user.Seulogin para adicionar seu usuário no painel.
  18. Olá, André é poderia colocar o código aqui para facilitar a ajuda?
  19. Aproveitando essa postagem aqui é está retornando esse erro aqui pra mim: attempt to index field --Marker_Aleatórios marker_aleatoriosS = { 1872.08, -1308.8, 18.147, 1893.097, -1314.732, 23.151, 1892.831, -1316.274, 28.152, 1872.101, -1317.594, 33.147, 1876.034, -1321.604, 38.147, 1876.088, -1309.743, 43.147, 1873.865, -1322.412, 48.069, } --Marker entregar marker_EntregarS = {} --Local Random_Pos local Random_Pos = math.random ( #marker_aleatoriosS) --Marker que está retornando o erro: attempt to index field marker_EntregarS[player] = createMarker(marker_aleatoriosS[Random_Pos][1], marker_aleatoriosS[Random_Pos][2], marker_aleatoriosS[Random_Pos][3] -2.2, "cylinder", 2.5, 16, 111, 231, 50) Obs é a mesma função ali de cima a unica diferença é que eu coloquei as marker_aleatoriosS e a marker_EntregarS
  20. Irmão valeu, queria saber qual é o problema do mta ter me falado a linha 69 sendo que era a 68 kkkkkk
  21. function pegarFerroS(thePlayer) local x, y, z = getElementPosition(marker_aleatoriosS) local random_Pos = math.random(#marker_aleatoriosS) if thePlayer then player = getPlayerFromName(thePlayer) if not isPedInVehicle(player) then if isElementWithinMarker(player, marker_ferro) if getElementData(player, "Ferro") == false then if getElementData(player, "Pedreiro") == true then setPedAnimation(player, "CARRY", "liftup", 1.0, false) setTimer(function() if isElement(Object_ferro[player]) then destroyElement(Object_ferro[player]) end if isElement(marker_EntregarS[player]) then destroyElement(marker_EntregarS) end setElementData(player, "Recompensa", 0) setPedAnimation(player, nil) setElementData(player, "Ferro", true) toggleControl(player, "jump", false) toggleControl(player, "fire", false) toggleControl(player, "aim_weapon", false) setPedAnimation( source, "CARRY", "crry_prtial", 4.1, true, true, true ) marker_EntregarS[player] = createMarker(marker_aleatoriosS[random_Pos[1]],marker_aleatoriosS[random_Pos[2]],marker_aleatoriosS[random_Pos[3]], -2.2, "cylinder", 2.5, 16, 111, 231, 50) setElementVisibleTo(marker_EntregarS, root, false) setElementVisibleTo(marker_EntregarS, player, true) addEventHandler("onMarkerHit", marker_EntregarS[player], fim_Emprego) Object_ferro[player] = createObject(2960, x, y, z) exports.bone_attach:attachElementToBone(Object_Lixo[source], source, 4, 0, 0.4, - 0.6, -90, 0, 0 ) end, 1000,1) end end end end end end end addCommandHandler("ferro", pegarFerroS) Está dando erro nos if getElementData(player, "Ferro") == false then if getElementData(player, "Pedreiro") == true then Não sei aonde estou errando o erro do debug está falando: 'then' expected near 'if'
  22. Consegui resolver o problema! if getElementData(localPlayer, "Pedreiro") == false then setElementData(localPlayer, "Pedreiro", true) end
×
×
  • Create New...