Now I've managed to bind the key "F" to the marker I have made in ammu-nation
local Marker1 = createMarker(295.70001, -38.2, 1000.6, "cylinder", 1.5, 255, 255, 0, 0)
setElementInterior(Marker1, 1)
function MarkerHit(player)
if getElementType(player) == "player" and source == Marker1 then
bindKey(player, "f", "down", camera)
outputChatBox("Press F to buy weapons", player)
end
end
addEventHandler("onMarkerHit", getRootElement(), MarkerHit)
function MarkerLeave(player)
if getElementType(player) == "player" and source == Marker1 then
unbindKey(player, "f", "down", camera)
end
end
addEventHandler("onMarkerLeave", getRootElement(), MarkerLeave)
function camera(player, key, keyState)
setCameraMatrix(player, 293.10001, -39.8, 1002.8, 293.10001 , -41.8, 1002.8)
end
Now I want to know how to make the camera move from an object to another one using "Left" and "Right" arrow.
The places I want the camera goes to
setCameraMatrix(293.10001, -39.8, 1002.8, 293.10001, -41.8, 1002.8)
setCameraMatrix(293, -39.8, 1002.4, 293, -41.8, 1002.4)
setCameraMatrix(293, -39.8, 1002, 293, -41.8, 1002)
setCameraMatrix(293.79999, -39.83, 1002.7, 293.79999, -41.83, 1002.7)
setCameraMatrix(293.79999, -39.8, 1002.3, 293.79999, -41.8, 1002.3)
setCameraMatrix(293.79999, -39.83, 1001.95, 293.79999, -41.83, 1001.95)
setCameraMatrix(295, -39.8, 1002.05, 295, -41.8, 1002.05)
setCameraMatrix(294.89999, -39.8, 1002.33, 294.89999, -41.8, 1002.33)
setCameraMatrix(294.89999, -39.8, 1002.81, 294.89999, -41.8, 1002.81)
setCameraMatrix(296.29999, -39.8, 1002.53, 296.29999, -41.8, 1002.53)
setCameraMatrix(296.29999, -39.8, 1002, 296.29999, -41.8, 1002)
setCameraMatrix(297.89999, -39.8, 1002.6, 297.89999, -41.8, 1002.6)
setCameraMatrix(297.89999, -39.8, 1002.1, 297.89999, -41.8, 1002.1)
setCameraMatrix(299.39999, -39.6, 1002.4, 299.39999, -41.6, 1002.4)
setCameraMatrix(298.29999, -36.4, 1001.8, 298.29999, -38.4, 1001.8)
setCameraMatrix(297.39999, -37, 1001.84, 297.39999, -39, 1001.84)
setCameraMatrix(296.70001, -37.04, 1001.6, 296.70001, -39.04, 1001.6)
setCameraMatrix(296.39999, -37.04, 1001.577, 296.39999, -39.04, 1001.577)
setCameraMatrix(293.20001, -37, 1001.6, 293.20001, -39, 1001.6)
setCameraMatrix(293.60001, -37, 1001.7, 293.60001, -39, 1001.7)
setCameraMatrix(294.20001, -37, 1001.635, 294.20001, -39, 1001.635)
And can anyone explain these?