mr.ekoo Posted June 22, 2013 Share Posted June 22, 2013 السلام عليكم بغيت استفسر هل اقدر اخلي الاعب يلحق لاعب ثاني مثل البيد يلحق لاعب ؟ Link to comment
PaiN^ Posted June 22, 2013 Share Posted June 22, 2013 يب بس المود معقد شوي الوظائف : setPedControlState - getElementPosition - getElementRotation - setElementRotation Link to comment
][sojn][ Posted June 22, 2013 Share Posted June 22, 2013 يب بس المود معقد شويالوظائف : setPedControlState - getElementPosition - getElementRotation - setElementRotation + getElementPosition getDistanceBetweenPoints3D setPedControlState createPed Link to comment
PaiN^ Posted June 22, 2013 Share Posted June 22, 2013 @ ][sojn][ : ؟ getDistanceBetweenPoints3D وظيفتين من اللي انت حاطهم انا حاطهم ذذ & ممكن تقولي ليش Link to comment
./BlackBird# Posted June 22, 2013 Share Posted June 22, 2013 @ ][sojn][ : ؟ getDistanceBetweenPoints3D وظيفتين من اللي انت حاطهم انا حاطهم ذذ & ممكن تقولي ليش عشان يعرف الفرق بين البيد و الاعب عشان يخليه يركض او يمشي او يوقف Link to comment
PaiN^ Posted June 23, 2013 Share Posted June 23, 2013 اهاا اوكي + راح يحتاج كمان : setTimer أو onClientPreRender . Link to comment
][sojn][ Posted June 23, 2013 Share Posted June 23, 2013 @ ][sojn][ : ؟ getDistanceBetweenPoints3D وظيفتين من اللي انت حاطهم انا حاطهم ذذ & ممكن تقولي ليش ما لاحظت Link to comment
./BlackBird# Posted June 23, 2013 Share Posted June 23, 2013 الاسهل تستخدم ذذ function walktheprisoner(thecop, theprisoner) local copx, copy, copz = getElementPosition ( thecop ) local prisonerx, prisonery, prisonerz = getElementPosition ( theprisoner ) copangle = ( 360 - math.deg ( math.atan2 ( ( copx - prisonerx ), ( copy - prisonery ) ) ) ) % 360 setPedRotation ( theprisoner, copangle ) setCameraTarget ( theprisoner, theprisoner ) local dist = getDistanceBetweenPoints2D ( copx, copy, prisonerx, prisonery ) if ( dist > 16 ) then freetheguy ( theprisoner ) --FREES PRISONER IF HE GETS FAR AWAY elseif ( dist > 12 ) then setControlState ( theprisoner, "sprint", true ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist > 6 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist > 1.5 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", true ) setControlState ( theprisoner, "forwards", true ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) elseif ( dist < 1.5 ) then setControlState ( theprisoner, "sprint", false ) setControlState ( theprisoner, "walk", false ) setControlState ( theprisoner, "forwards", false ) local zombify = setTimer ( walktheprisoner, 500, 1, thecop, theprisoner ) end end هذا من سكربت legalsystem 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