Ahmed Araby Posted October 13, 2016 Share Posted October 13, 2016 سلام عليكم انا بدي اسوي مود بدي اسوي شخصيه و اسوي كول شب وهمي و اول ما اي شخص يخش الكولشب اذا في سياره يجيب سرعه السياره اذا اكبر من 100 الشخصيه تطلق عليه اذا طلع من الكول شب خلاص ترجع الشخصيه مكانها و توقف الطلق ؟ ممكن الاكواد المستخدمه ؟ انا مابيه يقتل الشخص ابيه يطلق عليه .. Link to comment
Mohamed_king Posted October 13, 2016 Share Posted October 13, 2016 مافي حد فهم طلب تبعك Link to comment
Walid Posted October 13, 2016 Share Posted October 13, 2016 (edited) Functions: createPed , createColPolygon, givePedWeapon , getElementVelocity (or getElementSpeed) , getElementPosition, setPedControlState, setPedAimTarget Events : onClientColShapeHit , onClientColShapeLeave Edited October 13, 2016 by Walid Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 (edited) 12 hours ago, Walid said: Functions: createPed , createColPolygon, givePedWeapon , getElementVelocity (or getElementSpeed) , getElementPosition, setPedControlState, setPedAimTarget Events : onClientColShapeHit , onClientColShapeLeave اخي طيب قلي انا بعرف كم واحد بس createColPolygon و getElementVelocity و setPedAimTarget وش يسوو .. الباقي عارفهم Edited October 13, 2016 by Ahmed Araby Link to comment
Walid Posted October 13, 2016 Share Posted October 13, 2016 replace (createColPolygon with createColSphere) and (getElementVelocity with getElementSpeed) setPedAimTarget : لتحديد الهدف getElementSpeed: لتحقق من سرعة السيارة Link to comment
iPrestege Posted October 13, 2016 Share Posted October 13, 2016 Just now, Walid said: replace (createColPolygon with createColSphere) and (getElementVelocity with getElementSpeed) setPedAimTarget : لتحديد الهدف getElementSpeed: لتحقق من سرعة السيارة + يحتاج تايمر او يستخدم كلنت رندر عشان اطلاق النار : 'onClientRender' addEventHandler( string eventName, element attachedTo, function handlerFunction ) getElementPosition( element theElement ) setPedAimTarget( ped thePed, float x, float y, float z ) + removeEventHandler عشان توقف اطلاق النار Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, Walid said: replace (createColPolygon with createColSphere) and (getElementVelocity with getElementSpeed) setPedAimTarget : لتحديد الهدف getElementSpeed: لتحقق من سرعة السيارة طيب انا سويت givePedWeapon بس ما صار ما يعطيه السلاح . Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, Default said: اطرح محاولتك function cmdArmedPed( command ) local x, y, z = getElementPosition(localPlayer) local thePed = createPed(0, x + 1, y, z) givePedWeapon(thePed, 30, 5000,true) end addCommandHandler("armedped", cmdArmedPed) Link to comment
' A F . Posted October 13, 2016 Share Posted October 13, 2016 متأكد انه بجانب الكلنت ؟ Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, Default said: متأكد انه بجانب الكلنت ؟ اه في الكلينت ..متاكد .. و الميتا متاكد منها <meta> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> </meta> Link to comment
iPrestege Posted October 13, 2016 Share Posted October 13, 2016 7 minutes ago, Ahmed Araby said: function cmdArmedPed( command ) local x, y, z = getElementPosition(localPlayer) local thePed = createPed(0, x + 1, y, z) givePedWeapon(thePed, 30, 5000,true) endaddCommandHandler("armedped", cmdArmedPed) ضيف تايمر بدل هذي : givePedWeapon(thePed, 30, 5000,true) بـ هذي setTimer ( givePedWeapon,500,1,thePed,30,5000,true ) 1 Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, FaHaD said: ضيف تايمر بدل هذي : givePedWeapon(thePed, 30, 5000,true) بـ هذي setTimer ( givePedWeapon,500,1,thePed,30,5000,true ) تمام جاء الحين انا ضفت هاد ليه setPedAimTarget( thePed, x,y,z) ليه ما يضرب علي ؟ Link to comment
iPrestege Posted October 13, 2016 Share Posted October 13, 2016 ورني كيف سويت ؟ وهل استعملت setPedControlState? Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, FaHaD said: ورني كيف سويت ؟ وهل استعملت setPedControlState? function cmdArmedPed( command ) local x,y,z = getElementPosition(localPlayer) local thePed = createPed(0, x + 1, y, z) setTimer ( givePedWeapon,500,1,thePed,30,5000,true ) setPedControlState(thePed,"fire", true) setPedAimTarget( thePed, x,y,z) end addCommandHandler("armedped", cmdArmedPed) يب شوف يطلق بس مو علي .. Link to comment
Abdul KariM Posted October 13, 2016 Share Posted October 13, 2016 استخدم setPedLookAt Link to comment
iPrestege Posted October 13, 2016 Share Posted October 13, 2016 (edited) function cmdArmedPed ( ) local x, y, z = getElementPosition ( localPlayer ) thePed = createPed(0, x + 1, y, z) setTimer ( givePedWeapon,500,1,thePed, 30, 5000,true ) setPedControlState( thePed,'fire',true ) addEventHandler ( 'onClientRender',root,attack ) end addCommandHandler("armedped", cmdArmedPed) function attack ( ) local x, y, z = getElementPosition ( localPlayer ) setPedAimTarget ( thePed, x, y, z ) end -- تنبية -- لا تكرر الكود اكثر من مرة بيعطيك خطأ للايفنت ماسويت تحقق فية Edited October 13, 2016 by FaHaD اضافة تنبية Link to comment
Ahmed Araby Posted October 13, 2016 Author Share Posted October 13, 2016 12 hours ago, FaHaD said: function cmdArmedPed ( ) local x, y, z = getElementPosition ( localPlayer ) thePed = createPed(0, x + 1, y, z) setTimer ( givePedWeapon,500,1,thePed, 30, 5000,true ) setPedControlState( thePed,'fire',true ) addEventHandler ( 'onClientRender',root,attack ) end addCommandHandler("armedped", cmdArmedPed) function attack ( ) local x, y, z = getElementPosition ( localPlayer ) setPedAimTarget ( thePed, x, y, z ) end setPedLookAt(thePed, x,y,z, -1, 0) ما صار 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