The moVer Posted March 28, 2015 Posted March 28, 2015 السلام عليكم ورحمة الله وبركاته اليوم ابي كيف اخلي نرسبن شخصية مو حقيقية (بيد) يركب بسيارتك اذا قربت منو وتكون انت بتيم معين ويطلع اذا خشينا بماركر وبعدها يختفي وشكرا
TAPL Posted March 28, 2015 Posted March 28, 2015 وعليكم السلام عليكم ورحمة الله وبركاته createPed warpPedIntoVehicle -- removePedFromVehicle ** البيد ما تقدر تخليه يركب السيارة عن طريق المشي/الركض و فتح الباب و الركوب http://bugs.multitheftauto.com/view.php?id=8799
The moVer Posted March 28, 2015 Author Posted March 28, 2015 يعني يا تبل وش اقول والله انك كفو الله يعطيك العافية ما قصرت
#MFGR7OM Posted March 28, 2015 Posted March 28, 2015 بس ينفع انو بس انا اشوف البيد ؟؟؟ لا الكل يشوفه بس يمكن فيه طريقه ما اعرف
Professional Posted March 28, 2015 Posted March 28, 2015 function pedLoad () function onEnter(player) createPed ( modelid, x, y, z ) warpPedIntoVehicle(thePed,vehicle) removePedFromVehicle(theprisoner) end end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad )
iMr.TZ[W]ER Posted March 28, 2015 Posted March 28, 2015 بس ينفع انو بس انا اشوف البيد ؟؟؟ نعم تقدر , الفنكشن كلنت وسيرفر
yazan Posted March 28, 2015 Posted March 28, 2015 function pedLoad () function onEnter(player) createPed ( modelid, x, y, z ) warpPedIntoVehicle(thePed,vehicle) removePedFromVehicle(theprisoner) end end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) نعم تقدر عبر كلنت و تقرايقر سيرفر م اجل يركب + مكي هريسه ليه عامل فنيشن 2 و مو معرف البيد ----------------- local marker2 = createMarker (1536.27,-1686.387,13.546,"cylinder", 2, 0, 255, 0, 255) local blip2 = createBlip (1536.27, -1686.387, 13.546,5) addEventHandler("onClientMarkerHit", marker2, function (hit) if (hit == localPlayer) then if isElement (ped) then destroyElement ( ped ) end end end ) local marker33 = createMarker ( 1536.27,-1686.387+5,13.54,"cylinder", 2, 0, 255, 0, 255) addEventHandler("onClientMarkerHit", marker33, function (hit) if (hit == localPlayer) then if getPlayerTeam (localPlayer) and getTeamName (getPlayerTeam (localPlayer)) == "No Team" then ped = createPed(0, getElementPosition(localPlayer)) end end end ) addEventHandler("onClientRender", root, function() if getPlayerTeam (localPlayer) and getTeamName (getPlayerTeam (localPlayer)) == "No Team" then local x, y, z = getElementPosition(localPlayer) local tx, ty, tz = getElementPosition(ped) local dis = getDistanceBetweenPoints2D(x, y, tx, ty) if dis > 2 then setPedControlState(ped, "forwards", true) else setPedControlState(ped, "forwards", false) end setPedRotation(ped, findRotation(tx, ty, x, y)) end end ) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end return t end
The moVer Posted March 28, 2015 Author Posted March 28, 2015 function warpPedIntoVehicle ( Ped, ..mycar ) end local mycar = --وش احط
*[MSN]MHMD Posted March 29, 2015 Posted March 29, 2015 تفضل أخوي جرب local id = ------- ايدي البيد local x, y, z = -------- احداثيات البيد local xx, yy, zz = -------- احداثيات الماركر الي لمن تصله يشيل البيد من السيارة ويخفيه local team = "" -------- اسم التيم الي تبيه بس لهم حطه بين القوسين -------------------------------------------------------- ped = createPed( id, x, y, z ) marker = createMarker ( x, y, z-1,"cylinder", 1.5, 0, 0, 0, 0 ) markerout = createMarker ( xx, yy, zz,"cylinder", 1.5, 100, 90, 80, 150 ) local playervehicle = getPedOccupiedVehicle ( localPlayer ) function destroyPed() destroyElement(ped) end addEventHandler("onClientMarkerHit",getRootElement(),function if ( source == marker ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then warpPedIntoVehicle ( ped, playervehicle ) destroyElement(marker) elseif ( source == markerout ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then removePedFromVehicle ( ped ) setTimer ( destroyPed, 5000, 1 ) end end )
</Mr.Tn6eL> Posted March 29, 2015 Posted March 29, 2015 تفضل أخوي جرب local id = ------- ايدي البيد local x, y, z = -------- احداثيات البيد local xx, yy, zz = -------- احداثيات الماركر الي لمن تصله يشيل البيد من السيارة ويخفيه local team = "" -------- اسم التيم الي تبيه بس لهم حطه بين القوسين -------------------------------------------------------- ped = createPed( id, x, y, z ) marker = createMarker ( x, y, z-1,"cylinder", 1.5, 0, 0, 0, 0 ) markerout = createMarker ( xx, yy, zz,"cylinder", 1.5, 100, 90, 80, 150 ) local playervehicle = getPedOccupiedVehicle ( localPlayer ) function destroyPed() destroyElement(ped) end addEventHandler("onClientMarkerHit",getRootElement(),function if ( source == marker ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then warpPedIntoVehicle ( ped, playervehicle ) destroyElement(marker) elseif ( source == markerout ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then removePedFromVehicle ( ped ) setTimer ( destroyPed, 5000, 1 ) end end ) ماتفرق بين فنكشنات السيرفر والكلنت وعندك playervehicle حطه داخل الحدثonClientMarkerHit
The moVer Posted March 29, 2015 Author Posted March 29, 2015 شباب انا ابيها وظيفة تاكسي انو يركب معي ويطلع اذا خشينا ماركر ويكون بتيم Taxi وبس
The moVer Posted March 29, 2015 Author Posted March 29, 2015 وسؤال ثاني في حدث اذا دخلنا السيارة؟؟ واتمنا تجاوبو ايش احط function warpPedIntoVehicle ( Ped, ..mycar ) end local mycar = --وش احط
#MFGR7OM Posted March 29, 2015 Posted March 29, 2015 وسؤال ثاني في حدث اذا دخلنا السيارة؟؟ واتمنا تجاوبو ايش احط function warpPedIntoVehicle ( Ped, ..mycar ) end local mycar = --وش احط https://wiki.multitheftauto.com/wiki/OnClientVehicleEnter والله مدري للسؤال الاخر بس ذا حدث لما تدخل السياره
#MFGR7OM Posted March 29, 2015 Posted March 29, 2015 شباب انا ابيها وظيفة تاكسي انو يركب معي ويطلع اذا خشينا ماركر ويكون بتيم Taxi وبس getPlayerTeam onMarkerHit
The moVer Posted March 30, 2015 Author Posted March 30, 2015 شكرا شباب بس ابي اعرف وش احط فوق function warpPedIntoVehicle ( Ped, ..mycar ) end local mycar = --وش احط
*[MSN]MHMD Posted March 30, 2015 Posted March 30, 2015 تفضل أخوي جرب local id = ------- ايدي البيد local x, y, z = -------- احداثيات البيد local xx, yy, zz = -------- احداثيات الماركر الي لمن تصله يشيل البيد من السيارة ويخفيه local team = "" -------- اسم التيم الي تبيه بس لهم حطه بين القوسين -------------------------------------------------------- ped = createPed( id, x, y, z ) marker = createMarker ( x, y, z-1,"cylinder", 1.5, 0, 0, 0, 0 ) markerout = createMarker ( xx, yy, zz,"cylinder", 1.5, 100, 90, 80, 150 ) local playervehicle = getPedOccupiedVehicle ( localPlayer ) function destroyPed() destroyElement(ped) end addEventHandler("onClientMarkerHit",getRootElement(),function if ( source == marker ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then warpPedIntoVehicle ( ped, playervehicle ) destroyElement(marker) elseif ( source == markerout ) and ( playervehicle ) and ( getTeamName(getPlayerTeam(localPlayer)) == team ) then removePedFromVehicle ( ped ) setTimer ( destroyPed, 5000, 1 ) end end ) ماتفرق بين فنكشنات السيرفر والكلنت وعندك playervehicle حطه داخل الحدثonClientMarkerHit local كل الفنكشات الي انا حاططها كلنت + م يحتاج اضيفه لداخل الحدث صحيح انا مسوي بس ماهي بداخل فنكشن او شي هي تكون في كل الملف يعني تقدر تستعملها + لو م ضبطت يمديه يشيل كلمة لوكال
*[MSN]MHMD Posted March 30, 2015 Posted March 30, 2015 شكرا شباب بس ابي اعرف وش احط فوق function warpPedIntoVehicle ( Ped, ..mycar ) end local mycar = --وش احط local mycar = getPedOccupiedVehicle ( localPlayer )
shwaeki Posted March 30, 2015 Posted March 30, 2015 *[MSN]MHMD local playervehicle = getPedOccupiedVehicle ( localPlayer ) الكود هاد لازم يكون داخل الحدث لانه هو يجيب سيارة الاعب اول ما يشتغل المود يعني اذا ما كان راكب يكون على طول مو راكب سيارة و لو كان راكب يكون على طول راكب سيارة بس لما تحطة في الحدث يتحقق اذا راكب ولا مو راكب لما يلمس الماركر فهمت علي
*[MSN]MHMD Posted March 30, 2015 Posted March 30, 2015 *[MSN]MHMDlocal playervehicle = getPedOccupiedVehicle ( localPlayer ) الكود هاد لازم يكون داخل الحدث لانه هو يجيب سيارة الاعب اول ما يشتغل المود يعني اذا ما كان راكب يكون على طول مو راكب سيارة و لو كان راكب يكون على طول راكب سيارة بس لما تحطة في الحدث يتحقق اذا راكب ولا مو راكب لما يلمس الماركر فهمت علي اها مشكور على الشرح توني فاهم لانه م فهمت من ذاك زين
The moVer Posted March 30, 2015 Author Posted March 30, 2015 local marker2 = createMarker (1536.27,-1686.387,13.546,"cylinder", 2, 0, 255, 0, 255) local blip2 = createBlip (1536.27, -1686.387, 13.546,5) addEventHandler("onClientMarkerHit", marker2, function (hit) if (hit == localPlayer) then if isElement (ped) then destroyElement ( ped ) end end end ) local marker33 = createMarker ( 1536.27,-1686.387+5,13.54,"cylinder", 2, 0, 255, 0, 255) addEventHandler("onClientMarkerHit", marker33, function (hit) if (hit == localPlayer) then if getPlayerTeam (localPlayer) and getTeamName (getPlayerTeam (localPlayer)) == "No Team" then ped = createPed(0, getElementPosition(localPlayer)) end end end ) addEventHandler("onClientRender", root, function() if getPlayerTeam (localPlayer) and getTeamName (getPlayerTeam (localPlayer)) == "No Team" then local x, y, z = getElementPosition(localPlayer) local tx, ty, tz = getElementPosition(ped) local dis = getDistanceBetweenPoints2D(x, y, tx, ty) if dis > 2 then setPedControlState(ped, "forwards", true) else setPedControlState(ped, "forwards", false) end setPedRotation(ped, findRotation(tx, ty, x, y)) end end ) function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end return t end اناعندي ذا الكود بس اخش يرسبن بيد ويلحقني اسا انا ابيه بس اركب سيارة يركب معي وبس اخرج يخرج معي
*[MSN]MHMD Posted March 30, 2015 Posted March 30, 2015 الفنكشات "onClientVehicleEnter" "onClientVehicleLeave" warpPedIntoVehicle removePedFromVehicle setPedControlState
The moVer Posted March 30, 2015 Author Posted March 30, 2015 انا اعرف الفنكشنات بس ما اعرف الكود الرجاء كتابة الكود انا بس ابي كيف ادخل السيارة ةيركب وكيف اخرج
#DRAGON!FIRE Posted March 30, 2015 Posted March 30, 2015 ** البيد ما تقدر تخليه يركب السيارة عن طريق المشي/الركض و فتح الباب و الركوب http://bugs.multitheftauto.com/view.php?id=8799
The moVer Posted March 31, 2015 Author Posted March 31, 2015 شباب انا بس ابي اعرف كيف بس اركب بسيارة يركب معي ولما اخرج يخرج
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