alowner Posted April 30, 2020 Posted April 30, 2020 function animationped (thePlayer) local x, y, z = getElementPosition (thePlayer) local objpick = createObject(1578, x + 2, y, z) if isElementWithinMarker(thePlayer, markerpgdrg) then setPedAnimation(thePlayer, "CARRY", "liftup") end end addEventHandler("onMarkerHit",markerpgdrg, animationped) Queria colocar esse objeto em cima da mão do personagem alguém me ajuda ?
Moderators Lord Henry Posted May 1, 2020 Moderators Posted May 1, 2020 Vc vai precisar disso: Resource:Bone_attach Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
alowner Posted May 1, 2020 Author Posted May 1, 2020 (edited) 3 hours ago, Lord Henry said: Vc vai precisar disso: Resource:Bone_attach Tava olhando isso agora, já consegui colocar o objeto na mão do player agora só preciso saber como faço para a animação do player não sair dps que começa a andar --código da animação setPedAnimation(player, "CARRY", "liftup",-1, false, false, false, false) está assim e quando anda a animação saí Edited May 1, 2020 by alowner
Moderators Lord Henry Posted May 1, 2020 Moderators Posted May 1, 2020 (edited) Faça assim: setPedAnimation (player, "CARRY", "liftup", 1.0, false) setTimer (function (thePlayer) setPedAnimation (thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true) end, 1000, 1, player) Edited May 1, 2020 by Lord Henry 1 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
alowner Posted May 1, 2020 Author Posted May 1, 2020 (edited) 1 hour ago, Lord Henry said: Faça assim: setPedAnimation (player, "CARRY", "liftup", 1.0, false) setTimer (function (thePlayer) setPedAnimation (thePlayer, "CARRY", "crry_prtial", 4.1, true, true, true) end, 1000, 1, player) Tira mais uma dúvida que eu estou tendo, como faço para os npc(ped) do comando createPed (id,x,y,z) faz para não levar dano ? ficar sempre com a vida cheia Edited May 1, 2020 by alowner
Moderators Lord Henry Posted May 1, 2020 Moderators Posted May 1, 2020 (edited) local theNPC = createPed (...) -- NPC qualquer. addEventHandler ("onClientPlayerDamage", theNPC, function () -- Quando o theNPC tomar dano, cancela o dano e não perde vida. cancelEvent() end) addEventHandler ("onClientPlayerStealthKill", localPlayer, function (targetPlayer) -- Quando o jogador tenta usar a facada fatal em alguém. if (targetPlayer == theNPC) then -- Se o jogador alvo for o theNPC, então cancela e não permite a execução. cancelEvent() end end) Edited May 1, 2020 by Lord Henry Removido spam causado por timed out do fórum. 1 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now