golanu21 Posted August 12, 2013 Share Posted August 12, 2013 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) end end addEventHandler("onClientMarkerHit", marke, shotplayer) i make that is working but the ped is not look at the player for unlimited time ... Link to comment
motax Posted August 12, 2013 Share Posted August 12, 2013 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) count= setTimer(shotplayer ,50,0) end end addEventHandler("onClientMarkerHit", marke, shotplayer) Maybe a timer like this could help Link to comment
golanu21 Posted August 12, 2013 Author Share Posted August 12, 2013 nope, is not help...the ped turns its head towards me and returns. Link to comment
motax Posted August 12, 2013 Share Posted August 12, 2013 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." Link to comment
golanu21 Posted August 12, 2013 Author Share Posted August 12, 2013 oh, yea, thanx man Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now