Jump to content

Help


Recommended Posts

Help in the console I get error: move \ server.lua: 14: attemp to call global'moveobject' <a table value>
help please as I do so that the object leaves the earth only the object appears and does not move

objs = {}
function objE(player)

	local xb,yb,zb = getElementPosition(player)
	local rxb,ryb,rzb = getElementRotation(player)
	local origX, origY, origZ = getElementPosition (player)
	local matrixs = (Matrix.create(xb,yb,zb, rxb,ryb,rzb, 

origX,origY,origZ))
	local forward = (Matrix.getForward(matrixs) * 15)
	local positions = (Matrix.getPosition(matrixs) + forward)
	objs[player] = createObject(689,xb+15,yb+15,zb-10, positions)
	local newZ = origZ +20
	moveObject( object, 6000,origX, origY,newZ)

end
addCommandHandler("god",objE)

 

Edited by DiosSasuke
Link to comment
1 hour ago, !#NssoR_) said:

Change line 14 to :


moveObject( objs[player], 6000,origX, origY,newZ)

 

I also need you to help me so that the object appears in front of me, and tried but the object keeps appearing where I am and I want it in front of me
 

objs = {}
function objE(player)
	local xb, yb, zb = getElementPosition(player)

	local origX, origY, origZ = getElementPosition (player)

	local rx, ry, rz = getElementRotation ( thePlayer )

	local matrixs = (Matrix.create( xb, yb, zb-100, rx, ry, 

rz,origX,origY,origZ))

	local forward = ( Matrix.getForward ( matrixs ) * 4)

	local positions = (Matrix.getPosition( matrixs ) + forward)

	objs[player] = createObject(689, positions)

	local newZ = origZ -1
	moveObject( objs[player], 6000,origX, origY,newZ)

end
addCommandHandler("god",objE)

 

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...