Big Smoker Posted February 16, 2021 Posted February 16, 2021 (edited) Boa noite, Estou fazendo um sistema de bot que atira na direção do player, esta funcionando tudo certo. Mais ele esta atirando muito para cima, na mesma direção mas, só que para cima, vou enviar uma print mostrando. Qual função posso usar para abaixar o tiro do ped https://ibb.co/s3BMdDX Edited February 16, 2021 by felipebaidoloko
Moderators Lord Henry Posted February 16, 2021 Moderators Posted February 16, 2021 setPedAimTarget 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.
Big Smoker Posted February 16, 2021 Author Posted February 16, 2021 esta dando esse erro attempt to call global 'setPedAimTarget' (a nil value) addEvent( "botsStartAttack", true ) addEventHandler( "botsStartAttack", getRootElement(), function (zomb,numberBot) if isElement ( zomb ) and not getElementData ( zomb, "target" ) then if getElementData ( zomb, "zHeared" ) then setElementData ( zomb, "zHeared", false ) end setElementSyncer ( zomb, source ) setPedAnimation ( zomb ) if not isHLCEnabled ( zomb ) then enableHLCForNPC( zomb, getElementData ( zomb,"speed") or "sprint") end clearNPCTasks (zomb) addNPCTask ( zomb, {"killPed", source, 6, 6} ) setElementData ( zomb, "target", source ) local x,y,z = getElementPosition(zomb) setPedAimTarget ( zomb, x,y,z ) setElementAlpha ( zomb, 255 ) end end)
LucasST Posted February 16, 2021 Posted February 16, 2021 Essa função é utilizada no Client-Side. 1 DISCORD : LucasST#1725 DÚVIDAS ESTOU SEMPRE A DISPOSIÇÃO
Big Smoker Posted February 16, 2021 Author Posted February 16, 2021 agora deu certo, obrigado pela ajuda
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