You can rotate it via setElementMatrix:
function setMarkerHeading(markerElement, rotationDegrees)
local markerMatrix = getElementMatrix(markerElement)
-- Convert degrees to radians
rotationDegrees = math.rad(rotationDegrees)
-- Rotate around Z axis
local cosAngle = math.cos(rotationDegrees)
local sinAngle = math.sin(rotationDegrees)
markerMatrix[1][1] = cosAngle
markerMatrix[1][2] = sinAngle
markerMatrix[1][3] = 0
markerMatrix[2][1] = -sinAngle
markerMatrix[2][2] = cosAngle
markerMatrix[2][3] = 0
markerMatrix[3][1] = 0
markerMatrix[3][2] = 0
markerMatrix[3][3] = 1
-- Apply updated matrix
return setElementMatrix(markerElement, markerMatrix)
end
It's only rotates it around the Z axis like in Single-Player, if you want to rotate it in more axes you should search for rotation matrix in your preferred search engine.
You could try something like this:
local elementFocus=createPed(...)
function setMissionHandler(player)
bindKey(player,"mouse1","down",function(src)
if(getPedTarget(src)==elementFocus)then
outputChatBox("You've taken a photo",src,255,255,0)
end
end,player)
end