10.05.2015, 17:06
Код:
SetActorToFacePlayer(actorid, targetid) { new Float: pX, Float: pY, Float: tX, Float: tY ; return GetPlayerPos(targetid, tX, tY, Float: targetid) && GetActorPos(actorid, pX, pY, Float: targetid) && SetActorFacingAngle(actorid, -atan2(tX - pX, tY - pY)) ; }