Jump to content

getCameraMatrix( player ) problem on serverside


-Blaze-

Recommended Posts

Hey,

  
function getCameraMatrixPosition(player) 
local camx, camy, camz, tarx, tary, tarz = getCameraMatrix(player) 
outputChatBox(camx..", "..camy..", "..camz..", "..tarx..", "..tary..", "..tarz, player) 
end 
addCommandHandler("matrix", getCameraMatrixPosition) 
  

I need to use getCameraMatrix on server side due to some reasons but it just won't work.

it gives an error : attempt to concatenate 'tarz' a nil value, in line 4.

Any help?

Link to comment

My guess on why it returns nil is probably because you have to set the camera matrix first before getting it (this applies for server-side only):

Note: The server-side version of this function returns the last camera matrix that was set by the server, and thus does not necessarily indicate the current matrix of the camera (since it may have been changed client-side).
Link to comment
  • Moderators

You can use it serverside.

You can use the synchronization of mta. (which doesn't always works dual the data reduction and optimization)

Or you use trigger events to request the data. (which has of course a delay, PING, because it isn't streamed)

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