Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 15/01/22 in all areas

  1. 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
    2 points
  2. خطأ، مو مثلهم تختلف عنهم setElementData تحفظ قيمة معينة على كائن معين مؤقتًا وتقدر تزامنها للجانب الآخر كلاينت-سيرفر / سيرفر-كلاينت بحيث يمديك لو حطيت القيمة بالسيرفر تقدر تجيبها بالكلاينت مباشرة تقدر تشوف توضيح أكثر هنا خاصة عالمزامنة لأنها مهمة طبعًا يمديك تستخدم الجداول عشان تحفظ القيم مؤقتًا بدال الوظيفة يلي بالأعلى وهي الأفضل لأنها اسرع في الحصول فيه شرح اجنبي لو تعرف اللغة الإنجليزية جدًا ممتاز شرح الموضوع هذا setAccountData / SQL و وظائف قواعد البيانات كلاهما تحفظ القيم بقاعدة البيانات بحيث تقدر تجيبها بأي وقت حتى لو طلع الاعب لكن عيب قاعدة البيانات إنها سيرفر سايد فقط، وبطيئة في الحصول ف مفروض ماتستخدمها في شي يتكرر كل فترة يلي ذكرناها فوق element data على سبيل المثال عندك نقاط تبي تحفظها إذا سجل الاعب الدخول تحصل على النقاط من قاعدة البيانات وبعدها تحفظها مؤقتًا عليه عبر الجداول أو وإذا جيت تعدل النقاط تعدلهم عبرها، وتحفظهم في قاعدة البيانات عند الخروج طبعا وش الفرق بين setAccountData و SQL وظائف الـ؟ SQL اصلا تستخدم الـ account data element data وعيبها الوحيد إنها تستخدم المفاتيح مثل الـ بتكون لك حرية كاملة بتحديد الأشياء يلي تحتاج تحفظها SQL وظائف الـ setAccountData وفيه اشياء ملزم إنك تستخدمها مثلًا لو راح تسوي نظام حسابات خاص فيك ما راح يشتغل لأنه يشتغل على نظام الحسابات الإفتراضية فقط
    2 points
  3. Hello Community! Today i proudly present you the project I was working on for years: The probably most realistic competitive world war 2 server of all time for MTA! Maybe you remember the Brandenburger Gate image from mtasa.com or moddb? The time has come to live that dream! http://gta-saaw.blogspot.de/?m=1 FEATURES -2 teams, U.S. Army vs. German Wehrmacht -competitive, ticket based gamemode with stealth elements, up to 52 players -different map types: -TDM (small maps, infantry only) -WAR (big maps, everything allowed) -AIRSTRIKE (self explaining) -TANK WAR (large maps with masses of vehicles) -more planned! -22 different vehicles (Tiger tank, B-17G Bomber...) -Level/ability system -custom sounds, skins, effects and what not -shaders en masse, you can enable/disable them -improved physics, improved bullet sync -a lot of synced custom weapons -realistic weaponry for vehicles (Coaxial MGs, bombs...) -realistic damage model (front/rear armor) -supply system (trucks can deliver ammo to vehicles) -different ammo types (armor piercing, High explosive...) -custom mini-maps for radar -cockpit view for armored vehicles and aircraft -detailed LOD system for the big maps -many, many other smaller things More will come soon. A new addition currently in development are Warships - yes, you read that correct:
    1 point
  4. setElementData الداتا بكل بساطه بتحفظ عليها اي شي سواء نص أو أرقام بس لما تخرج من السيرفر بتنمسح تلقائي -- setAccountData و عندك داتا على الأكونت تقدر تحفظ عليها البيانات وهذه لو خرجت من السيرفر و تدخل ماراح يصير لها شي لأنها محفوظة على الأكونت بس لو رسترت المود راح تنمسح -- dbConnect في طريقة أحسن هي الداتا بيس أو قاعدة بيانات السيرفر هذه لو رسترت المود أو رسترت السيرفر هي موجودة و محفوظ عليها كل شي أتمنى تكون فهمت شرحي و شكراً .
    1 point
  5. استخدم getElementData في هذا الايفنت onClientPlayerWeaponSwitch عشان تشيك عليه هوا برا ولا داخل الدايره لو انت ما تبي تسحب كل اسلحته فاستخدم getElementData+ cancelEvent
    1 point
  6. يب انا هاذا يلي اقصده يا لايف تحياتي لك اخي الكريم
    1 point
  7. انته تقصد setElementData المعرف لها: تخزن هذه الوظيفة بيانات العنصر تحت مفتاح معين ، مرتبط بعنصر. ثم تتم مزامنة مجموعة بيانات العنصر ويلي يقصده بداته اداته يلي تحطها على الاعب لمن يدخل رح يحفض شي لي انته سويته مثلا يلي هي ريموف داته هي خاينه نقول بدزيل داته عرفت كيف
    1 point
  8. 1 point
  9. Hello Polak0,Unfortunately, you cannot create a rideable vehicle on the server side at the moment, but you can do it on the client side. local id_sultan addEventHandler("onClientResourceStart", resourceRoot, function() id_sultan = engineRequestModel("vehicle", 411) local txd = engineLoadTXD("sultan.txd") engineImportTXD(txd, id_sultan) local dff = engineLoadDFF("sultan.dff") engineReplaceModel(dff, id_sultan) outputDebugString("Custom sultan id: "..id_sultan) end ) addCommandHandler ("sultan", function () triggerServerEvent("requestCreateCustomSultan", root, id_sultan) end) addEvent("createCustomSultan", true) addEventHandler("createCustomSultan", root, function() createVehicle(id_sultan, 0, 0, 3) end ) this is sample code. server : addEvent("requestCreateCustomSultan", true) addEventHandler("requestCreateCustomSultan", root, function() triggerClientEvent(root, "createCustomSultan", root) end )
    1 point
  10. It should be working now. @ozulus I have added the large update for the airplane resource. NOTE: Both resources must be updated to the latest version. As promised, high performance after initializing and nearly zero latency. - Added a last minute fix for an unexpected error. 1.1.0 > 1.1.1 Note: Not all bugs have been fixed. Like for example, aircraft can still fly through mountains. But you can adjust that by adding the aircraft manually.
    1 point
  11. @BruXo Isso ocorreu pois você gerou conflito de variáveis. No seu setTimer, você passa o element por parâmetro e usa ele mesmo dentro da função, mas dentro da função ele não existe. Apenas utilize outra variável dentro do setTimer que não seja igual aquela que você está passando. setTimer(function(theElement) -- 2) local theElement = element setElementData(theElement, "zombieTimer", getElementData(theElement)) -- 3) Use o theElement dentro do setTimer. end, 40000, 1, element) -- 1) Passou o element por parâmetro aqui.
    1 point
  12. Dear MTA community, this resource renders mathematical formulas in scientific notation. It does solely contain internal Lua functions that should be used inside this resource. You are allowed to take the code from this resource into your own project without restrictions (if you do I would greatly appreciate a post in this thread with a link to the project you used my code in, maybe for further support). GitHub: quiret/lua_math_formulas: Math formulation renderer for MTA San Andreas written in Lua (github.com) Example commands: dt disfract dt fraction dt sqroot dt realdf dt realfract dt realexp dt realexpfract dt realrootfract dt realadd dt realaddcomplex dt realaddcomplex2 dt realaddcomplex3 dt realaddcomplex4 dt realdiv dt realdivcomplex dt realdivcomplex2 dt realdivcomplex3 dt realdivcomplex4 dt realdivcomplex5 dt off Public API: fraction createFraction( df counter, df divisor ) real createRealNumber( realvalue value ) number math_add( number a, number, b ) number math_sub( number a, number b ) number math_mul( number a, number b ) number math_div( number a, number b ) number math_pow( number a, number b ) number math_neg( number a ) number math_inv( number a ) number math_simple( number a ) bool math_eq( number a, number b ) bool math_lt( number a, number b ) bool math_le( number a, number b ) number is a regular Lua numeric value (1, 2, 3, 4, math.pi, math.exp(1), etc) any approximated value is not calculated-on in the math engine, you should stick to fractions which require natural numbers, zero or negative natural numbers (df type) objects returned by the math_ family of functions as well as createFraction or createRealNumber have the Lua operators +, -, /, *, ^, ==, <, <= overloaded to simplify usage real numbers such as math.pi or math.exp(1) are generarilly not specially implemented beyond visual representation; to simplify the implementation of real number comparison I have resorted to calculating the machine approximation and comparing based on that; improvement would require proven real number representation comparisons and their implementations; feel free to contribute any add-ons to the code in this topic which I might merge drawobj createDrawingFormula( number formula ) void drawobj.draw( float xoff, float yoff, float scale ) float(x), float(y) drawobj.getSize() Motivation: This resource should be used to get a mathematical result that is scientifically correct and is not based on a machine-accelerated approximated calculation. I created this code as part of a mathematical project I am working on that I will disclose at a later date. Noteworthy technology: A custom UI layout engine is being used to draw the formulas. Dependency graph logic is being used to perform node-based computation, reusing many results with efficiency in mind. Have fun!
    1 point
×
×
  • Create New...