Jump to content

Script


Recommended Posts

Hi,

Error comes from that addEvenHandler is not closed. Also, there is no attached function.

addEventHandler("onClientClick", root, function(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedWorld)
	if (button == "right") and (state == "up") then
		--- script
	end
end) -- end of function and ")" close addEventHandler

Then, you have multiple other problems : there is functions with wrong name and other syntax problems that will not make your script works like :

getDistanceBetweenPoints3D() and his arguments wrongly writed, I guess it should be getDistanceBetweenPoints3D(x, y, z, pX, pY, pZ) (clicked position to player position).

Plus, you could directly use worldX, worldY and worldZ rather than getting position of clickedWorld (clickElement in your script).

 

https://wiki.multitheftauto.com/wiki/OnClientClick

 

Edited by Mkl
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...