Sfa7 Posted September 18, 2013 Share Posted September 18, 2013 السلام عليكم addEventHandler ( "onClientMarkerHit",mark, function (thePlayer) if getElementType ( thePlayer ) == "player" and isPedInVehicle ( thePlayer ) and getPlayerTeam ( thePlayer ) and getPlayerTeam ( thePlayer ) == getTeamFromName ( "myteam" ) then destroyElement(mark) mark= nil destroyElement(blb) blb = nil triggerServerEvent("givem", localPlayer) end end ) ماني شايف خطا ولكن لما المس الماركر بـ السياره مايحصل اي شي و الدي بق يقول الخطا في addEventHandler ( "onClientMarkerHit",mark, وش الحل ي بروات ؟ انا ابيه يكون كلنت مو سيرفر للمعلومه Link to comment
hassan.k.s.a Posted September 18, 2013 Share Posted September 18, 2013 عندط خطئين واحد بـ سطر 6 وواحد بـ سطر 7 nil = لحذف قيمه من الجدول Link to comment
3NAD Posted September 18, 2013 Share Posted September 18, 2013 addEventHandler ( "onClientMarkerHit", resourceRoot, function ( thePlayer ) if source == mark then if thePlayer == localPlayer then if isPedInVehicle ( thePlayer ) then local playerTeam = getPlayerTeam ( thePlayer ) if playerTeam then if playerTeam == getTeamFromName ( "myteam" ) then if blb then if isElement ( blb ) then destroyElement ( blb ) end end destroyElement ( mark ) triggerServerEvent ( "givem", localPlayer ) end end end end end end ) Link to comment
Sfa7 Posted September 18, 2013 Author Share Posted September 18, 2013 كفوو والله ي عناد والله انك ذيب ابن ذيب يالغالي ممكن تشرحلي وش الاخطاء الي كانت في كودي وانا شايف انك مسوي if كثييره وانا حبيت اختصرها ولكن حصلتك مزوده ضض2 وش الفرق وهل لها فائده ؟ ي ليت تعطيني شرح كامل وبـالتفصيل الله لايهينك ي الشنب Link to comment
3NAD Posted September 18, 2013 Share Posted September 18, 2013 if = جملة شرطية لـ تفادي الأخطاء 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