Bassam*Syria Posted July 13, 2016 Posted July 13, 2016 السلام عليكم انا سويت كود لما الاعب يضرب على اوبجيكت يختفي لكن في مشكله مدري وين الاكواد function test ( attacker, weapon, targetElem ) -- if ( weapon == 42 ) then if ( getElementType ( targetElem ) == "object" ) and ( getElementModel ( targetElem ) == 2023 ) then destroyElement ( targetElem ) end --end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), test ) skype : jeefhardiy06
Bassam*Syria Posted July 13, 2016 Author Posted July 13, 2016 إستعمل الحدث ذا : onClientObjectDamage شكرا على تعليقكم اخوي لكن انا جربته وما اشتغل لو تقدر تعدل على كودي تكون فضل skype : jeefhardiy06
N3xT Posted July 13, 2016 Posted July 13, 2016 addEventHandler("onClientObjectDamage", root, function(_,attacker) if ( attacker ) then destroyElement(source) end end)
Bassam*Syria Posted July 13, 2016 Author Posted July 13, 2016 addEventHandler("onClientObjectDamage", root, function(_,attacker) if ( attacker ) then destroyElement(source) end end) شكرا اخوي ظبت لكن في مشكله انا ضفت لو كان معاه سلاح طفايه الحريق لكن مو راضي يظبت M4 غيرت السلاح سويته ظبت ! كيف ممكن اسويها ؟ skype : jeefhardiy06
N3xT Posted July 13, 2016 Posted July 13, 2016 ^ العفو , وحياك الله تأكد من الآي دي حق الطفاية + هل هي سلاح ؟
Bassam*Syria Posted July 13, 2016 Author Posted July 13, 2016 ^ العفو , وحياك الله تأكد من الآي دي حق الطفاية + هل هي سلاح ؟ يب هي سلاح لاك لما ارب مافي تعيين يعني تعيين و تضرب ما يطلع دائره بالنص الشاشه زي السلاح العادي اعتقد هنا المشكله كيف ممكن اسويها ؟ skype : jeefhardiy06
فاّرس Posted July 13, 2016 Posted July 13, 2016 .getPedWeapon اعتقد انها تعتبر ضمن الأسلحه استخدم Sha67 سابقاً
N3xT Posted July 13, 2016 Posted July 13, 2016 addEventHandler("onClientObjectDamage", root, function(_,attacker) if ( attacker ) then if ( getPedWeapon ( attacker ) == 42 ) then destroyElement(source) end end end)
Me[Z]oO Posted July 13, 2016 Posted July 13, 2016 addEventHandler("onClientObjectDamage", root, function(_,attacker) if ( attacker ) then if ( getPedWeapon ( attacker ) == 42 ) then destroyElement(source) end end end) افترض لو هو مسوي مود اخر وحاطط اوبجيكت واجا لاعب ضرب الاوبجيكت بالسلاح (ID = 42) ؟ رح يختفي لذلك تحقق ان السورس == اسم متغير انشاء الاوبجيكت + تحقق من الاتاكر هو لاعب @Bassam لو حاط كلمة local قبل متغير انشاء الاوبجيكت يا ريت تشيلها بعد التعديل addEventHandler("onClientObjectDamage", root, function(_,attacker) if attacker and getElementType(attacker) == 'player' then if source == اسم متغير انشاء الاوبجيكت then if getPedWeapon ( attacker ) == 42 then destroyElement(source) end end end end ) Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
فاّرس Posted July 13, 2016 Posted July 13, 2016 ^ لأنه هو يبيها كذا مثل كوده اللي فوق getElementModel يستخدم Sha67 سابقاً
Me[Z]oO Posted July 14, 2016 Posted July 14, 2016 شكرا لكم العفو Skype :- mezo.prince1 FaceBook :- https://www.facebook.com/medolua YouTube :- http://www.youtube.com/c/MeZoOPriNse
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