HassoN Posted March 22, 2016 Share Posted March 22, 2016 ممكن فنكشن يكتب كلام فوق الشخصية +مثال على اي مود function function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 if (isLineOfSightClear(x, y, z, x2, y2, z2, true, false, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end -- كل الاكواد الي فوق هي مالك دعوة بها هذا يوسفل فنكشن --نبدا من هنا randomPed = createPed(285,2476.91406,-1665.31799,13.32435) -- هنا نسوي بيد (شخصية) addEventHandler("onClientRender", getRootElement(), -- نسوي الحدث function () dxDrawTextOnElement(randomPed,"Text",1,20,0,0,255,255,1,"pricedown") -- هنا نسوي النص فوق البيد randomPed end) --dxDrawTextOnElement اسم اليوسفل فنكشن حق حسون الكود قديم ، روح شوف الويكي حدثته وضفت له اشياء ثانية _____ طيب الكود جاهز اجربه؟؟سيرفر ولا كلنت الكود كلاينت ، لو تبي تفهم الارقمنتات وكل شي بالكود زور الصفحة حقته بالويكي dxDrawTextOnElement Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 حسون انا ما اعرف للدي اكس ممكن تعطيني اي كود جاهز لانه بجرب عليه شي Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 حسون انا ما اعرف للدي اكس ممكن تعطيني اي كود جاهز لانه بجرب عليه شي الكود هو اصلا جاهز روح لجهة كلنت ضيف الكود ذا function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end ثم حط الكود ذا اسم البيد حقك= createPed(285,2476.91406,-1665.31799,13.32435) addEventHandler("onClientRender", getRootElement(), function () dxDrawTextOnElement(اسم البيد حقك,"YOUR TEXT HERE",1,20,0,0,255,255,1,"pricedown") -- الواحد ذي لأرتفاع الخط عن رأس البيد ، ال20 مسافة الي يستيطع الاعب رؤوية الكلام منها ، ال 0 0 255 ذا كود الون ، ال1 كبر الخط والي بعدها هو نوع الخط end) Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 طيب كيف يمديني اجيب اسم خط عجبني؟ +كلام العربي يطلع معكوس ما في حل؟؟ Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 طيب كيف يمديني اجيب اسم خط عجبني؟+كلام العربي يطلع معكوس ما في حل؟؟ !!! ترا لو ضغطت على زر الرابط الي فوق مابيعضك الموقع كل شي مكتوب هناك "default": Tahoma "default-bold": Tahoma Bold "clear": Verdana "arial": Arial "sans": Microsoft Sans Serif "pricedown": Pricedown (GTA's theme text) "bankgothic": Bank Gothic Medium "diploma": Diploma Regular "beckett": Beckett Regular Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 طيب اللغة معكوسه ليه +ينفع اضيف غير هالخطوط؟ Link to comment
Me[Z]oO Posted March 22, 2016 Share Posted March 22, 2016 ممكن فنكشن يكتب كلام فوق الشخصية +مثال على اي مود function function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 if (isLineOfSightClear(x, y, z, x2, y2, z2, true, false, false, true)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end -- كل الاكواد الي فوق هي مالك دعوة بها هذا يوسفل فنكشن --نبدا من هنا randomPed = createPed(285,2476.91406,-1665.31799,13.32435) -- هنا نسوي بيد (شخصية) addEventHandler("onClientRender", getRootElement(), -- نسوي الحدث function () dxDrawTextOnElement(randomPed,"Text",1,20,0,0,255,255,1,"pricedown") -- هنا نسوي النص فوق البيد randomPed end) --dxDrawTextOnElement اسم اليوسفل فنكشن حق حسون الكود قديم ، روح شوف الويكي حدثته وضفت له اشياء ثانية _____ طيب الكود جاهز اجربه؟؟سيرفر ولا كلنت الكود كلاينت ، لو تبي تفهم الارقمنتات وكل شي بالكود زور الصفحة حقته بالويكي dxDrawTextOnElement اسف م كنت اعرف =) Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 طيب اللغة معكوسه ليه+ينفع اضيف غير هالخطوط؟ بالنسبة للغة المعكوسة ، الحين بجرب واشوف وش قصدك أما سالفة الخط dxCreateFont Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 ثم جرب "arial" ألي مخرب عليك العربي ومسويه مقلوب هو الخط ، سويه أنا جربته وطلعت لي النتيجة كذا Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 طيب الحين عندي خط عربي كيف اضيفه مشان يشتغل ممكن شرح او شي اخوي غلبتك معي Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 طيب الحين عندي خط عربي كيف اضيفه مشان يشتغل ممكن شرح او شي اخوي غلبتك معي ضيف سطر بالبداية local font = dxCreateFont("font.ttf") -- طبعا ذا اسم ملف الخط الي عندك ، لاتنسا تعرفه بالميتا ثم تروح للكود الي معطيه لك وتبدل "arial" font بـ وبس خلصنا ، Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 لا اقصد اخي عندي خط خارج الويكي استعمله للتصميم اقدر اجيبه+كيف Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 لا اقصد اخي عندي خط خارج الويكي استعمله للتصميم اقدر اجيبه+كيف اقراء كلامي كويس Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 احط ملف الخط مع المود؟ Link to comment
#|_oskar_|# Posted March 22, 2016 Share Posted March 22, 2016 احط ملف الخط مع المود؟ dxDrawTextOnElement(randomPed,"بسم الله",1,20,0,0,255,255,1,dxCreateFont("اسم الفونت.ttf",20 )) Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 احط ملف الخط مع المود؟ بالضبط كأنك تضيف صورة لمود ، بتضيفه لملف المود والميتا ثم تستدعيه بالكود السطر الي عطيته لك فوق Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 وش وظيفة الفنكشن ذا playSFX؟؟ Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 مو ضابط يتغير function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end sz = createPed(285,199.75499,1916.53015,17.64063) addEventHandler("onClientRender", getRootElement(), function () local ff = dxCreateFont("ff.ttf") dxDrawTextOnElement(sz,"shop",1.2,20,234,116,32,255,3,"ff") -- الواحد ذي لأرتفاع الخط عن رأس البيد ، ال20 مسافة الي يستيطع الاعب رؤوية الكلام منها ، ال 0 0 255 ذا كود الون ، ال1 كبر الخط والي بعدها هو نوع الخط end) Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 مو ضابط يتغير function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement) local x, y, z = getElementPosition(TheElement) local x2, y2, z2 = getElementPosition(localPlayer) local distance = distance or 20 local height = height or 1 local checkBuildings = checkBuildings or true local checkVehicles = checkVehicles or false local checkPeds = checkPeds or false local checkObjects = checkObjects or true local checkDummies = checkDummies or true local seeThroughStuff = seeThroughStuff or false local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false local ignoredElement = ignoredElement or nil if (isLineOfSightClear(x, y, z, x2, y2, z2, checkBuildings, checkVehicles, checkPeds , checkObjects,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)) then local sx, sy = getScreenFromWorldPosition(x, y, z+height) if(sx) and (sy) then local distanceBetweenPoints = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) if(distanceBetweenPoints < distance) then dxDrawText(text, sx+2, sy+2, sx, sy, tocolor(R or 255, G or 255, B or 255, alpha or 255), (size or 1)-(distanceBetweenPoints / distance), font or "arial", "center", "center") end end end end sz = createPed(285,199.75499,1916.53015,17.64063) addEventHandler("onClientRender", getRootElement(), function () local ff = dxCreateFont("ff.ttf") dxDrawTextOnElement(sz,"shop",1.2,20,234,116,32,255,3,"ff") -- الواحد ذي لأرتفاع الخط عن رأس البيد ، ال20 مسافة الي يستيطع الاعب رؤوية الكلام منها ، ال 0 0 255 ذا كود الون ، ال1 كبر الخط والي بعدها هو نوع الخط end) جرب local ff = dxCreateFont("ff.ttf") addEventHandler("onClientRender", getRootElement(), function () dxDrawTextOnElement(sz,"shop",1.2,20,234,116,32,255,3,ff) -- الواحد ذي لأرتفاع الخط عن رأس البيد ، ال20 مسافة الي يستيطع الاعب رؤوية الكلام منها ، ال 0 0 255 ذا كود الون ، ال1 كبر الخط والي بعدها هو نوع الخط end) Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 ما تغير شي اخوي تأكد من اسم الخط ttf تأكد انك ضفت الخط للميتا ، تأكد ان الامتداد حق الخط هو Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 تأكدت كله مضبوط وذا الميتا جرب انت شوف Link to comment
HassoN Posted March 22, 2016 Share Posted March 22, 2016 جرب ذا local ff = dxCreateFont("music/ff.ttf") addEventHandler("onClientRender", getRootElement(), function () dxDrawTextOnElement(sz,"shop",1.2,20,234,116,32,255,3,ff) -- الواحد ذي لأرتفاع الخط عن رأس البيد ، ال20 مسافة الي يستيطع الاعب رؤوية الكلام منها ، ال 0 0 255 ذا كود الون ، ال1 كبر الخط والي بعدها هو نوع الخط end) انت كنت غلطان بـ وضع المسار الصحيح للخط Link to comment
taha201100 Posted March 22, 2016 Author Share Posted March 22, 2016 ERROR: Couldn't find file music/ff.ttf for resource aa Loading of resource 'aa' failed خلاص انسى اخوي ممكن اخر سؤال playSound stopSound اخوي انا لما اركب اغنيه ويضغط زر تشتغل لكن اذا رجع ضغط عليها تتكرر ما في طريقه ما تتكرر اكثر من مره وبالنسبه لأيقاف الموسيقى مو راضي يقفل الموسيقى المود مسحته بس تعرف ليه اخوي؟؟ playSFX وش وظيفتة ذا وفي له مثال من عندك مع شرح خخفيف 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