DiosSasuke Posted May 16, 2018 Share Posted May 16, 2018 (edited) 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 May 16, 2018 by DiosSasuke Link to comment
!#NssoR_) Posted May 16, 2018 Share Posted May 16, 2018 Change line 14 to : moveObject( objs[player], 6000,origX, origY,newZ) Link to comment
DiosSasuke Posted May 16, 2018 Author Share Posted May 16, 2018 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
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