Jump to content

Bot que atira


Recommended Posts

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)

 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...