Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 19/01/22 in Posts

  1. الأخ يلي فوق ممكن توضيحه كان ناقص شوي لكن خذها معلومة عامة ،الكلاينت(جهاز الاعب) ما يقدر يسوي أي تأثير لأي لاعب غير نفسه، الاعبين الآخرين موجودين في جانب الكلاينت ..لكن الاشياء يلي تقدر تسويها محدودة مثل جلب معلومات عنهم مثل الاسم، البنق، المكان إلخ .هل اقدر اسوي عليهم بعض الفنكشنات مثل تغيير السكن؟ أي طيب انت قلت الكلاينت يشغل وظائف لنفسه فقط؟ صحيح، تقدر تغير السكن حقهم لكن يلي راح يشوف التغيير فقط أنت الباقين راح يشوفونه مثل ما هو بالنسبة للسورس(المصدر) لازم تشوف كل حدث لأن كل حدث يختلف المصدر حقه على سبيل المثال onClientMarkerHit إذا تحسب المصدر حقه هنا الاعب أقولك خطأ لازم تشوف الويكي راح تلقى إن المصدر حقه هو كائن الماركر يلي دخله الكائن وليس الاعب نفسه حتى بعض الأحداث ماعندهم مصدر اساسًا يختلف على حسب الحدث، على سبيل المثال حدث دخول الماركر زي ما قلنا المصدر حقه هو الماركر يلي دخله الاعب، نعرف فنكشن الايفنت له ارقمنت ثاني لكن وش يفرق؟ addEventHandler("onClientMarkerHit",root,myFunction) -- راح يشتغل الحدث لجميع الماركرات addEventHandler("onClientMarkerHit",resourceRoot,myFunction) -- راح يشتغل الحدث لجميع الماركرات التي تم إنشاءها من قبل نفس السكربت addEventHandler("onClientMarkerHit",myMarker,myFunction) -- راح يشتغل الحدث للماركر المعين فقط لاحظ كيف الفرق؟ كلها في الارقمنت الثاني حق المصدر، هذي توضحها شجرة الكائنات لأن الاعب لا يتم إنشاءه من قبل سكربت، لو استخدمتها ما راح يشتغل الايفنت ،resourceRoot تحته كل شيء، ولاحظ إن الاعب مو ضمن root تقريبًا الصورة توضح كل شي (حدث إذا مات لاعب) onClientPlayerWasted وتقدر تستعمل الروت حتى في الكلاينت لبعض الأحداث على سبيل المثال طبعًا مو كل الأحداث يلي تخص الاعب أحيان تشتغل، تحتاج تشيك السورس والوصف حق الوظيفة على سبيل المثال الحدث يلي فوق مذكور إن يمديك تستخدمه وزي ما ذكرنا ما راح تقدر تسوي أي تأثير يشوفه الآخرين في جانب الكلاينت، راح يشتغل لك الحدث، لكن أي شي تسويه الاعبين الآخرين ما راح يشوفونه لأنه جانب الكلاينت جهازك فقط
    2 points
  2. Disclaimer: This is aimed at MTA open source contributors only. Hi devs! If you're looking for support regarding MTA C++/module/resource development, or you have some ideas or want to discuss about MTA development related matters, come and join our dedicated MTA development Discord server at https://discord.com/invite/GNN6PRtTnu where we have dedicated channels for various topics. The server is English only. Non-development chatter is prohibited. Please note that the MTA development server is only for development matters. If you need help with your MTA client/server or scripting, or you just want to chat and hang around, please use our official Discord server instead at https://discord.com/invite/mtasa
    1 point
  3. وربييييي كفوووو فهمت شرحك يدخل العقل بسرعة تسلم علي مجهودك كفو يالغالي علي المجهود فهمتك طب عندي اخر سؤال ياخي @,3ZF لو الروت بحدث الكلينت هيك وقت افتح اللوحة مثلا او يدخل اللاعب يوصل رسالة للكل ؟
    1 point
  4. I just uploaded a ped morphing resource that makes all players fat, you can check it out as example @long_gone https://community.multitheftauto.com/?p=resources&s=details&id=18647
    1 point
  5. ?. Are these files on the external and internal server the same? Do they have the same checksum?
    1 point
  6. I have received your resource files for full evaluation and have detected an alpha-based image configuration combined with append-layer based shader attachment. Based on the provided files, here is my defect report: By creating and attaching multiple shaders onto the same "head_diff_000_a_whi" texture of the player model you are inducing depth-fighting between the bart and the face textures. It looks like a coding error in your script due to COPY & PASTE. In order to focus your eyes for critical reading, take a look at line 348 of example.lua: engineApplyShaderToWorldTexture(shader,clothes_ID[7]["face"][1],thePlayer, true) In this line you are using the "face" texture. Are you meaning to use the "beard" texture instead? If you are, then you can fix easily fix this issue by chaging the string and making sure that each shader points to only one texture. In case you are not, there is a fundamental flaw in your design that is caused by misunderstanding how the GPU works and how MTA is utilizing it. By using append-layers and enabling depth-testing, the GPU is attempting to redraw the beard onto the original model BUT this is not stable because of mathematical inprecision. Your textures will start to flicker or one will hide another. So how to fix this defect? Instead of creating two shaders that draw onto one texture, I recommend you to off-screen combine the textures and then apply them to a shader. You can use the dxCreateRenderTarget, dxSetRenderTarget, dxCreateTexture and dxDrawImage functions to create a drawing surface (render target), layer the face + beard onto each other and then use the resulting render-target as texture in your shader. Do not forget to enable alpha for the render-target! Here is how a combine-stage of two textures might look like: local function renderCombinedTexture(tex1, tex2) local tex1w, tex1h = dxGetMaterialSize(tex1) local tex2w, tex2h = dxGetMaterialSize(tex2) local cw, ch = math.max(tex1w, tex2w), math.max(tex1h, tex2h) local rt = dxCreateRenderTarget(cw, ch, true) dxSetRenderTarget(rt) dxDrawImage(0, 0, tex1w, tex1h, tex1) dxDrawImage(0, 0, tex2w, tex2h, tex2) dxSetRenderTarget() return rt end You should use renderCombinedTexture in the onClientRender event handler to adhere to MTA's recommendations. If you have combined the textures and the combined texture does replace a predefined texture fully of the GTA SA DFF file, then I recommend you to set appendLayers to false instead. I was unsure how your system worked in my previous reply so I spearheaded a guess. But now with my actual analysis I recommend you to NOT use the appendLayers functionality. IMO it is a feature of MTA with very limited applicability. You seem to use weird global variables across your script. Take a look at the following line which repeats itself but seems to imply a contradiction: hat[thePlayer] = shader The global table is called "hat" but the function it is used in is called addFace or addBart. Could this be a variable misuse? I am looking forward to hearing back from you! ?
    1 point
×
×
  • Create New...