M7MD# Posted June 23, 2015 Share Posted June 23, 2015 السلام عليكم اخباركم بغيت كود ماعرفت اكمله ابي يوم الاعب يلمس الماركر تجيه سيارة سويت الكود تمام اشتغل لكن ابي اذا كان الاعب داخل سيارة تنسحب سيارته وياخذ سيارة وينتقل الاعب الى السيارة local marker = createMarker(2498.37598 ,-1674.69775, 13.34354,'cylinder',2,0,255,0,255) function MarkerHit(player) if getElementType(player) == "vehicle" then destroyElement(player) local v = createVehicle (411,2492.44751 ,-1671.60828, 13.3359) warpPedIntoVehicle(player,v) end end addEventHandler( "onMarkerHit", marker, MarkerHit ) هذا كودي لكن اذا كان الاعب داخل السيارة تنسحب سيارته لكن ما ينتقل للسيارة Link to comment
M7MD# Posted June 23, 2015 Author Share Posted June 23, 2015 ساعدني لان ماعندي خبرة نهائيا بالجداول Link to comment
TAPL Posted June 23, 2015 Share Posted June 23, 2015 local vehTB = {} local marker = createMarker(2498.375, -1674.697, 13.34354, "cylinder", 2, 0, 255, 0, 255) addEventHandler("onMarkerHit", marker, function(player) if getElementType(player) == "player" then if isElement(vehTB[player]) then destroyElement(vehTB[player]) vehTB[player] = nil end local x, y, z = getElementPosition(source) vehTB[player] = createVehicle(411, x, y, z + 1.5) warpPedIntoVehicle(player, vehTB[player]) end end) ولا تنسى تحذف السيارة لما اللاعب يخرج من السيرفر Link to comment
M7MD# Posted June 23, 2015 Author Share Posted June 23, 2015 تمام لكن في كودي يوم يلمس الماركر راح يكون بالتأكيد سيارة مو لاعب بدون سيارة وانا ابيه يسحب الموتر الاصلية الي لمسها قبل م ياخذ الموتر الي في الكود .. ~ Link to comment
iMr.Dawix~# Posted June 23, 2015 Share Posted June 23, 2015 تمام لكن في كودي يوم يلمس الماركر راح يكون بالتأكيد سيارة مو لاعب بدون سيارةوانا ابيه يسحب الموتر الاصلية الي لمسها قبل م ياخذ الموتر الي في الكود .. ~ isPedInVehicle destroyElement getPedOccupiedVehicle 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