-
Posts
68 -
Joined
-
Last visited
Everything posted by #Gubiani
-
[Hospedagem] Inovados Host [PREÇO BAIXO]
#Gubiani replied to #Gubiani's topic in Serviços de hospedagem
Boa tarde pessoal, só para feedback não estou mais atuando com a Inovados Host, criei minha própria linha de hosts (Gubiani Host), temos planos à partir de 6,99/mês, interessados: ip de teste: mtasa://gubianihost.ddns.net:22003 Discord: discord.gg/sxuXs2x. Taxa de ping -
Boa tarde galera! Iniciei a empresa à pouco tempo e estou com uns preços bem baixos! Dá uma passada lá! IP [SERVIDOR TESTE]: 158.69.156.184:22083 Site: https://inovadoshost.net/mta.html Whats: +55 (14)9 9662-3649 Obrigado.
-
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Certo, muito obrigado! -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Então basicamente tu ta falando pro computador fazer o calculo para ele percorrer até no máximo 360 graus, e com isso ele conseguir rotacionar? -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Meu deus surreal isso cara! tu é insaaaanoo!!!! Muito obrigado mesmo ta rodando perfeitamente com esse cálculo ! Aproveitando esse tópico tu poderia me explicar o que acontece nesse cálculo que tu fez? ele verifica a rotação? -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Mas daí o que eu preciso mudar no script do mapeamento ? Se poder me ajudar a fazer ele verificar a rotação pelo moveObject vou ficar muito grato cara *-* é só eu adicionar as variáveis de rotação do lado do x, y, z ? -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Nossa muito obrigado @MaligNos nem sei como agradecer, funcionou só que ele da o delay do tempo que foi pego as coordenadas, se eu diminuir o tempo de mapeamento acho que fica lisinho, ele conta 1 segundo pra atualizar a rotação dai fica todo travado. Muito obrigado -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
eu comentei a linha 20 do primeiro código, aonde ele seta a rotação, e não mudou nada no andamento, ele não está executando a rotação que foi programada... -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Nossa muito obrigado mesmo! @MaligNos ele fica meio artificial mas ta muito bom, ele não está rotacionando como programado tem como arrumar ? ele fica na mesma posição de saída, mas se não der ta bom de mais da conta! Obrigado novamente! -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Caramba, que loucura, nunca vi um programa assim, que crie arquivos e tal, achei muito interessante valeu @MaligNos vou testar em cima dessa base, no primeiro exemplo, eu posso ignorar as rotas e substituir pelo segundo exemplo, ele irá funcionar normal? -
Veiculo andando sozinho [A até B] (Dúvida)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Muito obrigado @Mewjas e @Lord Henry vou, analisar os dois argumentos, e verei o que eu faço! No caso ali do NPC dentro do veiculo dirigindo, tem alguma função que eu possa usar para fazer que o ônibus ande e faça curvas? (Ou seja, como vou falar para o jogo acelere o veiculo tanta velocidade, vire aqui vire lá até chegar nos pontos?) -
Boa tarde! Estou pensando em fazer um script que faça um ônibus traçar uma rota, sem alguém para dirigir, se puderem me ajudar dando as funções que irei usar para fazer esse script ficarei muito Grato!
-
Existe algum conversor estilo GM2MC, só que, para objetos?
#Gubiani replied to PrisonSong's topic in Portuguese / Português
GM2MC serve para todo Model ID não apenas carros, se você tem um objeto para ser substituído, apenas pegue o model ID e aplique com DFF e TXD, esses tempos eu fiz um trabalho de leiteiro, e consegui substituir um objeto e por uma vaca no lugar, funcionou perfeitamente! -
Valeu @Lord Henry Deu tudo certo aqui só tive que adicionar umas variáveis na table por que tava dando erro no debug, agora vou batalhar pra tentar criar mais caixas muito obrigado mesmo.
-
Então eu fiz o esquema das datas porém ele continua bugando pra quem esta nas datas hehe, mas pra quem nao ta não buga segue a baixo: mCarregamento = createMarker(-2253.13, 2387.62, 3.95, "cylinder", 2, 255, 0, 0, 255, getRootElement()) balsa = createVehicle (454, -2224.43, 2432.65, 2.14, 0, 0, 45) function criarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if not getElementData(thePlayer, "criar.objeto") or getElementData(thePlayer, "criar.objeto") ~= 1 then if source == mCarregamento then setElementData(thePlayer, "criar.objeto", 1) obj1 = createObject(964, -2260.14, 2382.28, 3.90, 0, 0, 0, true) setObjectScale (obj1, 0.5) ox, oy, oz = getElementPosition(obj1) mObjeto = createMarker(ox, oy, oz, "cylinder", 2.5, 255, 0, 0, 0, thePlayer) bObjeto = createBlipAttachedTo(mObjeto, 0, 2, 255, 0, 0, 255, 0, 999, thePlayer) addEventHandler("onMarkerHit", mObjeto, carregarObjeto) end end end end addEventHandler("onMarkerHit", mCarregamento, criarObjeto) function carregarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if not getElementData(thePlayer, "carregando.objeto") or getElementData(thePlayer, "carregando.objeto") ~= 1 then if source == mObjeto then destroyElement(bObjeto) setElementData(thePlayer, "carregando.objeto", 1) setPedAnimation( thePlayer, "CARRY", "liftup", 1.0, false ) setTimer(function() setElementData(thePlayer, "caixa.armas", 1) setPedAnimation( thePlayer, nil ) setPedAnimation( thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true ) attachElements(obj1, thePlayer, 0, 0.5, 0.3) toggleControl( thePlayer, "jump", false ) toggleControl( thePlayer, "fire", false ) toggleControl( thePlayer, "sprint", false ) toggleControl( thePlayer, "crouch", false ) toggleControl( thePlayer, "enter_exit", false ) destroyElement(mObjeto) mEntrega = createMarker(-2230.40, 2438.80, 1.49, "cylinder", 2, 255, 0, 0, 255, thePlayer) bEntrega = createBlipAttachedTo(mEntrega, 0, 2, 255, 0, 0, 255, 0, 999, thePlayer) addEventHandler("onMarkerHit", mEntrega, entregarObjeto) end, 1000, 1) end end end end function entregarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if getElementData(thePlayer, "caixa.armas") and getElementData(thePlayer, "caixa.armas") ~= 0 then if source == mEntrega then setPedAnimation( thePlayer, "CARRY", "liftup", 1.0, false ) setTimer(function () setPedAnimation( thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true ) toggleControl( thePlayer, "jump", true ) toggleControl( thePlayer, "fire", true ) toggleControl( thePlayer, "sprint", true ) toggleControl( thePlayer, "crouch", true ) toggleControl( thePlayer, "enter_exit", true ) destroyElement(mEntrega) destroyElement(bEntrega) print("01") end, 1000, 1) carg1 = attachElements(obj1, balsa, 0, 0, 0.3) setElementData(thePlayer, "caixa.armas", 0) setElementData(thePlayer, "criar.objeto", 0) setElementData(thePlayer, "carregando.objeto", 0) end end end end function teste( thePlayer, command ) setElementData(thePlayer, "caixa.armas", 0) setElementData(thePlayer, "criar.objeto", 0) setElementData(thePlayer, "carregando.objeto", 0) outputChatBox("Desbugado", thePlayer, 255, 0, 0, true) end addCommandHandler("desbugar", teste, command) Seria mais viável fazer o esquema dos markers e das cols na client?
-
Muito Obrigado @Lord Henry Vou tentar bloquear usando o setElementData, depois que eu conseguir, eu retorno para gente ver como vou fazer para usar condição For.
-
Boa tarde pessoal! Tudo certo? Então eu comecei a desenvolver uns trabalhos pra MTA, porém to enfrentando alguns problemas quando eu rodo eles em um servidor com mais de um jogador, por exemplo esse trabalho de carregador que eu estou desenvolvendo ainda, ele consiste em pegar a carga e levar para a balsa e dai em diante fazer a entrega do mesmo, mas na parte de fazer a entrega ainda não fiz, meu problema é o seguinte, quando o jogador pega a carga, é criado um marker aonde ele tem que levar a carga para ela aprecer em cima da balsa certo? Ok até aí beleza, o problema é se eu pegar a carga e outro player ir no mesmo lugar do marker que faz a carga ir para a balsa, ele ativa e a minha carga que eu ia levar some e aparece la sem eu ter ativado o marker, então meu problema é esse o script ele ta entendo como todos os players fossem um só (cada player que começa a trabalhar seja diferente que o outro), eu queria saber como eu faço pra bloquear isso abaixo está o código: server-side mCarregamento = createMarker(-2253.13, 2387.62, 3.95, "cylinder", 2, 255, 0, 0, 255, getRootElement()) balsa = createVehicle (454, -2224.43, 2432.65, 2.14, 0, 0, 45) function criarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if source == mCarregamento then obj1 = createObject(964, -2260.14, 2382.28, 3.90, 0, 0, 0, true) setObjectScale (obj1, 0.5) ox, oy, oz = getElementPosition(obj1) mObjeto = createMarker(ox, oy, oz, "cylinder", 2.5, 255, 0, 0, 255, thePlayer) addEventHandler("onMarkerHit", mObjeto, carregarObjeto) end end end addEventHandler("onMarkerHit", mCarregamento, criarObjeto) function carregarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if source == mObjeto then setPedAnimation( thePlayer, "CARRY", "liftup", 1.0, false ) setTimer(function() setPedAnimation( thePlayer, nil ) setPedAnimation( thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true ) attachElementToElement(obj1, thePlayer, 0, 0.5, 0.3) toggleControl( thePlayer, "jump", false ) toggleControl( thePlayer, "fire", false ) destroyElement(mObjeto) mEntrega = createMarker(-2230.40, 2438.80, 1.49, "cylinder", 2, 255, 0, 0, 255, thePlayer) mEntrega2 = createMarker(-2230.40, 2438.80, 1.49, "cylinder", 2, 255, 0, 0, 0, thePlayer) bEntrega = createBlipAttachedTo(mEntrega, 0, 2, 255, 0, 0, 255, 0, 999, thePlayer) addEventHandler("onMarkerHit", mEntrega, entregarObjeto) end, 1000, 1) end end end function entregarObjeto(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if source == mEntrega then setPedAnimation( thePlayer, "CARRY", "liftup", 1.0, false ) setTimer(function () setPedAnimation( thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true ) toggleControl( thePlayer, "jump", true ) toggleControl( thePlayer, "fire", true ) destroyElement(mEntrega) destroyElement(bEntrega) end, 1000, 1) addEventHandler("onMarkerHit", mEntrega2, carregarBalsa) destroyElement(mEntrega2) end end end function carregarBalsa(thePlayer) if getPedOccupiedVehicle(thePlayer) then return end if thePlayer and isElement(thePlayer) and getElementType(thePlayer) == "player" then if source == mEntrega then attachElementToElement(obj1, balsa, 0, 0, 0.3) createBlipAttachedTo(obj1, 0, 2, 255, 0, 0, 255, 0, 999, thePlayer) end end end E outra coisa se for possível, eu quero criar algo que tenha varias caixas para varias coordenadas por exemplo, quero que cada caixa que criar o jogador entregasse e ela ficasse em outra coordenada dentro da balsa. Eu teria que usar a condição FOR mas eu não entendo como ela funciona, se poder me ajudar fico muito grato pelo meu aprendizado. Obs( o barco que estou utilizando está com textura modificada ).
-
Sim, kkk estava fazendo ao contrário, por que primeiro tu tem que ver se o jogador está com as estrelas pra depois seta-las não seta-las primeiro antes de ver se ele está sendo procurado e tu usou o return sem precisão... Abraços se precisar estou por aí
-
Teste isso para ver se funciona. function policeStationHit (thePlayer) lvlWant = getPlayerWantedLevel (thePlayer) -- Verifica se o player está sendo procurado. if lvlWant >= 1 then -- Se o jogador estiver com estrela então.. outputChatBox("Este jogador já esta procurado", thePlayer) -- faz isso... else setPlayerWantedLevel(thePlayer, (getPlayerWantedLevel(thePlayer) + 2)) -- se for ao contrário do if ele faz isso. outputChatBox( "Agora você esta sendo procurado !", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "a", policeStationHit )
-
Como você está fazendo essa verificação para eu entender o que você realmente quer.
-
Tente isso meu amigo... Espero ter te ajudado! (se eu te ajudei me avalie) Alguma dúvida em relação ao código é só da um grito! Abraços --[[ * Lembrando que: a váriavel setNivel não está sendo executado! É apenas uma váriavel, para fazer ela funcionar você terá que chamar ela em algum lugar! (No caso quando alguém der um hit na estação policial...) ]]-- function policeStationHit (thePlayer) local setNivel = setPlayerWantedLevel (thePlayer, 1) -- A váriavel setNivel seta ao jogador 1 estrela. outputChatBox( "Agora você esta sendo procurado !", thePlayer, 255, 0, 0 ) lvlWant = getPlayerWantedLevel (thePlayer) -- Verifica se o player está sendo procurado. if lvlWant < 1 then -- Se o jogador não estiver com estrela então.. return outputChatBox( "Este jogador já esta procurado", thePlayer ) -- diz isso... end end addCommandHandler ( "a", policeStationHit ) Correção do código. (use isso) if lvlWant >= 1 then -- Se o jogador estiver com estrela então.. outputChatBox( "Este jogador já esta procurado", thePlayer ) return -- faz isso...
-
Valeu Lord consegui arrumar!
-
E ai, gurizada, criei um trabalho recentemente de leiteiro, tu pega o veiculo na fazenda entrega o leite, depois retorna à fazenda recebe a grana e o veiculo é destruido, certo isso ta rodando de boa, o meu problema é quando o player sair do veiculo durante o trabalho ele deverá ser destruído em um tempo, fiz duas funções na qual estão na "onVehicleEnter" e "onVehicleExit", porém não está reconhecendo e não acontece nada, quem poder ajudar fico grato. as funções ditas acima estão em: sairVeh e entrarVeh mInicio = createMarker (1073.20752, -343.23349, 72.99219, "cylinder", 1.5, 255, 0, 0, 255, getRootElement()) bInicio = createBlipAttachedTo (mInicio, 42, 2, 255, 255, 255, 255, 600) tabela = {} -- tabela vazia para receber valores. globaltimer = {} function tInicial(elemento, dim) if source == mInicio then -- Inicio do trabalho. if elemento and isElement(elemento) and getElementType(elemento) == "player" and dim and not tabela[elemento] then -- se o elemento for um player e estiver na mesma dimensão e não ter nenhum valor na tabela então: if not getPedOccupiedVehicle (elemento) then tabela[elemento] = {} -- cria um valor na tabela tabela[elemento]["skin"] = setElementModel (elemento, 158) -- cria um valor chamada skin dentro da tabela e ela seta a skin do player para 158 tabela[elemento]["carro"] = createVehicle (478, 1059.50110, -342.88776, 73.99219, 0, 0, 0) -- cria um veiculo e grava na tabela do player. tabela[elemento]["marker"] = createMarker (1545.62268, 16.95301, 23.14063, "cylinder", 1.5, 255, 0, 0, 255) -- cria um marker e grava na tabela do player. tabela[elemento]["blip"] = createBlipAttachedTo (tabela[elemento]["marker"], 0, 2, 255, 0, 0, 255, 9999) -- cria um blip no local do marker de inicio e grava na tabela do player. addEventHandler("onMarkerHit", tabela[elemento]["marker"], tEntrega) -- quando o player atingir o marker chama a função tEntrega. end end end end addEventHandler("onMarkerHit", mInicio, tInicial) -- quando o player atingir o marker inicia a função tInicial function sairVeh (elemento) local meuCarro = false if elemento and isElement(elemento) and getElementType(elemento) == "player" and tabela[elemento] and tabela[elemento]["carro"] then if source == vehicle then meuCarro = vehicle end end if not meuCarro then return end if not isTimer (globalTimer[meuCarro]) then outputChatBox ("#FF0000ATENÇÃO: #8E8E8ERetorne para o veiculo da fazenda em 1 minuto, senão, perderá o trabalho!", elemento, 255, 255, 255, true) globalTimer[meuCarro] = setTimer (function() destroyElement (meuCarro) -- Respawna o veículo. end, 20000, 1) else resetTimer (globalTimer[meuCarro]) end end addEventHandler ("onVehicleExit", root, sairVeh) function entrarveh (elemento) local meuCarro = false if elemento and isElement(elemento) and getElementType(elemento) == "player" and tabela[elemento] and tabela[elemento]["carro"] then if source == vehicle then meuCarro = vehicle end end if not meuCarro then return end if isTimer (globalTimer[meuCarro]) then killTimer (globalTimer[meuCarro]) end end addEventHandler ("onVehicleEnter", root, entrarVeh) function tEntrega(elemento, dim) if elemento and isElement(elemento) and getElementType(elemento) == "vehicle" and dim then p = getVehicleOccupant(elemento, 0) if p and tabela[p] and tabela[p]["carro"] and elemento == tabela[p]["carro"] then destroyElement(tabela[p]["blip"]) destroyElement(tabela[p]["marker"]) tabela[p]["mVeh"] = createMarker (1045.57288, -306.22220, 72.99308, "cylinder", 1.5, 255, 0, 0, 255) tabela[p]["bmVeh"] = createBlipAttachedTo (tabela[p]["mVeh"], 0, 2, 255, 0, 0, 255, 9999) outputChatBox("#FF6600AVISO: #8E8E8EVocê entregou os leites! Volte para a fazenda.", p, 255, 255, 255, true) addEventHandler ("onMarkerHit", tabela[p]["mVeh"], tEntregaVeh) else outputChatBox("#FF0000ATENÇÃO: #8E8E8EEste não é o carro da fazenda!", p, 255, 0, 0, true) end end end function tEntregaVeh(elemento, dim) if elemento and isElement(elemento) and getElementType(elemento) == "vehicle" and dim then p = getVehicleOccupant(elemento, 0) if p and tabela[p] and tabela[p]["carro"] and elemento == tabela[p]["carro"] then destroyElement (tabela[p]["carro"]) destroyElement (tabela[p]["mVeh"]) destroyElement (tabela[p]["bmVeh"]) tabela[p]["carro"] = nil tabela[p]["marker"] = nil tabela[p] = nil givePlayerMoney(p, 150) outputChatBox("#2FC401PARABÉNS: #8E8E8EVocê fez a entrega com sucesso e ganhou #2FC401$150", p, 255, 255, 255, true) else outputChatBox ("#FF0000ATENÇÃO: #8E8E8EEste não é o carro da fazenda!", p, 255, 0, 0, true) end end end
-
E ai gurizada, beleza? Então de uns tempos para cá eu não estou conseguindo usar o hamachi para abrir o servidor, diz que eu não to com a porta 22005 aberta algo assim, mas eu lembro que eu não precisava mexer em nada além de pegar o ipv4 do hamachi, o que devo fazer ? Obs: nesse período ja formatei meu notebook 1 vez, e está habilitado no firewall (hamachi) para receber e enviar os dados, preciso realmente de ajuda! Obrigado = D screenshot (imagem)
-
Respawn de veículo por tempo (precisando de ajuda)
#Gubiani replied to #Gubiani's topic in Programação em Lua
Beleza, tudo certo agora, Obrigado! @Lord Henry e @MaligNos Ajudaram muito!