Mhmd.z Posted October 29, 2015 Share Posted October 29, 2015 السلام عليكم ورحمة الله وبركاته معي كود ضابط وكل شيئ بس فيه مشكله resourceRoot ما اقدر احدد اي ماركر يوم يقرب عليه الاعب يصير الحدث , بس اقدر احدد وانا ابي اني اقدر احدد اي ماركر بالمود مو resourceRoot marker = { {-710.56818,958.04419,12.39771}, {-712.20367,947.42712,12.34575} } addEventHandler("onClientResourceStart",root, function () local number = math.random (#marker) local x = marker [number][1] local y = marker [number][2] local z = marker [number][3] local marker = createMarker(x,y,z - 1,"cylinder",2.0,255,0,0,255) blip = createBlip(x,y,z,41) end ) addEventHandler ( "onClientMarkerHit", resourceRoot, function () outputChatBox("marker hit", 255, 0, 0) end ) Link to comment
TAPL Posted October 29, 2015 Share Posted October 29, 2015 Marker = { {-710.568, 958.044, 12.397}, {-712.203, 947.427, 12.345} } addEventHandler("onClientResourceStart",resourceRoot, function() local number = math.random(#Marker) local x, y, z = unpack(Marker[number]) local marker = createMarker(x, y, z-1, "cylinder", 2.0, 255, 0, 0, 255) addEventHandler("onClientMarkerHit", marker, onHit) blip = createBlip(x, y, z, 41) end) function onHit(player) if player == localPlayer then outputChatBox("marker hit", 255, 0, 0) end end Link to comment
Rockyz Posted October 29, 2015 Share Posted October 29, 2015 عفوا ♕ المتحدث الرسمي ولا المتحدث المكرك Link to comment
Mr.Ronaldo Posted October 30, 2015 Share Posted October 30, 2015 عفوا ♕ المتحدث الرسمي ولا المتحدث المكرك يمكن ذا المتحدث الرسمي لتابل Link to comment
Mhmd.z Posted October 30, 2015 Author Share Posted October 30, 2015 طيب الحين عندي ابي اسوي اشياء اكثر للماركر الي بالجدوله setMarkerColor ( newmarker, 0, 255, 0, 255 ) مثل بس ما اقدر احدد اسم الماركر هذي مشكله... Link to comment
#DRAGON!FIRE Posted October 30, 2015 Share Posted October 30, 2015 marker حط newmarker عادي بدال بشرط يكون داخل الحدث هذا مو خارجه يعني تحت سطر انشاء الماركر مثلأ . Link to comment
Mhmd.z Posted October 30, 2015 Author Share Posted October 30, 2015 انا ابيه خارج الحدث مثال: addEventHandler("onClientPlayerVehicleExit",getRootElement(), function () destroyElement(marker) end ) Link to comment
` Allawi Posted October 30, 2015 Share Posted October 30, 2015 سطر 10 في كود تابل امسح منه local 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