Thanks for your help, but I have a little problem with it. This is a pic of the problem: http://i.imgur.com/2UreMY8.jpg and my code is:
addCommandHandler("matrix", function()
function getMatrixLeft(m)
return m[1][1], m[1][2], m[1][3]
end
function getMatrixForward(m)
return m[2][1], m[2][2], m[2][3]
end
function getMatrixUp(m)
return m[3][1], m[3][2], m[3][3]
end
function getMatrixPosition(m)
return m[4][1], m[4][2], m[4][3]
end
local veh = getPedOccupiedVehicle(localPlayer)
local mat = getElementMatrix(veh)
local ax, ay, az = getElementPosition(veh)
vx,vy,vz = getMatrixForward(mat)
cp = createMarker(ax, ay, az, "checkpoint", 1)
attachElements(cp, veh, vx, vy - 6, vz)
end)
I dont know if I'm on the right track...