peds = createPed(7, -1560.013671875, 660.078125, 7.0390625)
marke = createMarker(-1559.30859375, 654.59375, 7.0390625 -1, "cylinder", 2, 255, 0, 0, 100)
function shotplayer ( hitPlayer, matchingDimension )
if hitPlayer == localPlayer then
localPlayer = getLocalPlayer()
x, y, z = getElementPosition(localPlayer)
setPedAimTarget(peds, x, y, z)
setPedLookAt(peds, x, y, z,-1)
end
end
addEventHandler("onClientMarkerHit", marke, shotplayer)
Maybe this one'll be good.
Because:
bool setPedLookAt ( ped thePed, float x, float y, float z [, int time = 3000 [, int blend = 1000 ], element target = nil ] )
"time: the time, in milliseconds, during which the ped will look at the target. Once this time has elapsed, he will look ahead again like before the function was applied. A time of 0 will immediately stop any lookat.A negative time will make the ped look at the target indefinitely."