Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 16/06/19 in all areas

  1. [TUT] Scaling DX The reason why I am creating this topic, is because there are a lot of people asking this question: And to be honest there is no best practice for. But here you have my recommendation as guidance for display them the ~s~a~m~e~ for all screen formats. There are two important factors while dealing with screen formats 1. Pixel density Indication: PPI(Pixels Per Inch) and some also use the term DPI(Dots Per Inch) They do not have to be the same while talking about printing stuff. This indication tells us about how many pixels are used per inch. Which more or less tells us how sharp/smooth things like text can be looking. PPI doesn't really play a big role, but to display something nicely you need enough pixels to display it. Else it will be either too small or too crispy. So be careful to not scale things (especially text) too small. 2. Display aspect ratio Wiki The difference between resolution X and resolution Y as a ratio. A list of common ratios: 4:3 5:4 3:2 16:10 16:9 So for example if we take: fHD: 1920x1080 Which has the ratio 16:9 that is calculated like this: 1920 / 16 = 120 120 * 9 = 1080 Scaling without ratio Before I am going to explain any of this, I am going to ask you an important question: Like this: (vertical) ▮ Or horizontal? ▅ I assume most people would agree to play MTA horizontal, else you are probably reading a book or document. p.s If you play MTA on a vertical screen, then we developers do not like you at all, sorry. So what does this tell us? You can assume that the X-resolution is never going to be smaller than the Y-resolution. Useful? You will figure it out. Doing the scaling Note: This part is ABOUT SCALING and not positioning. So what we are going to do is: Calculating a scale which can display the same DX on multiple screen formats > without messing with the ratio. Example: A computer runs MTA at a resolution of 1920 x 1080. Lets define that! local devScreenX = 1920 local devScreenY = 1080 If this code is used by a different pc, we also need to know on which resolution it is running: local screenX, screenY = guiGetScreenSize() For the next step we have to look at this screenshot: I have cut out of the wide-screen format a square. Squares have the ratio 1:1, which means that we have removed our ratio difference from this screen resolution. It is very easy to do, as our Y * Y resolution makes exactly that beautiful square! The next thing we have to do is creating our scaling value. This value is required for adjust our resolution values so that they match to every screen format. So to use our ratio 1:1, we use the Y resolution to achieve that: local scaleValue = screenY / devScreenY And as last we can create a rectangle shape that is displayed at the center of every screen format, perfectly! local devScreenX = 1920 local devScreenY = 1080 local screenX, screenY = guiGetScreenSize() local scaleValue = screenY / devScreenY addEventHandler("onClientRender", root, function () -- create a scaled size local sizeX = scaleValue * 300 -- 300px local sizeY = scaleValue * 50 -- 50px -- get the center of the screen local centerX = screenX / 2 local centerY = screenY / 2 -- calculate the starting point of the rectangle local startRectangleX = centerX - (sizeX / 2) local startRectangleY = centerY - (sizeY / 2) dxDrawRectangle ( startRectangleX, startRectangleY, sizeX, sizeY, tocolor ( 255, 255, 255, 255 ) ) end) Lower limit What if we have a resolution of 800x600? And the text is getting too small? Making sure that the pixel density is OK, is very important. So to counter that we have to make sure that the text is not getting too small. Our development Y resolution is 1080 pixels. And we are dealing with an Y resolution 600 pixels. The first thing we are going to look at, is what the scale is going to be at that point. 600 / 1080 = 0.55555555555555555555555555555556 It is not very nice to have your text scaled to 55.5% of the original size, when having low resolution already. But without scaling, the DX stuff might fill up the entire screen and that is just as bad. So what we now need is a limit, in this case a lower limit. scaleValue = math.max(scaleValue, 0.65) The math.max function returns the highest value of all the arguments you put in to it. In this case it contains the: scaleValue: 0.555 And the lower limit of: 0.65 This will make sure that the DX stuff is not getting smaller than 65%. This might make text read able for a 800x600 resolution. Positioning Do you want to place your dx-effects at a specific place on your screen? See the following useful function: https://wiki.multitheftauto.com/wiki/GetScreenStartPositionFromBox
    2 points
  2. About Orange Gaming is a roleplay server which initially started in late 2018, yet, sadly shutdown in November of 2018. However, the server is relaunching. Our goals at Orange Gaming are simple: bring immersive roleplay; whilst still allowing players to have fun. We aim to bring realistic roleplay & allow players to roleplay what they want—ranging from a courier to a cartel leader. We are currently looking for staff & are extending our game servers to other games—not just MTA. Features $20,000 bonus start Vehicle system Inventory system Licensing system Business / home system Texture system Custom mapping Custom weapon damage system And more! Information Currently, we are looking to phase into our closed beta. If you are interested in joining the server—do not hesitate to join our Discord. All information can be found there. https://discord.gg/RmFz9bE
    2 points
  3. Was really nice tutorial
    2 points
  4. [Edited] is a role play gaming server using the Multi Theft Auto multiplayer modification for Grand Theft Auto: San Andreas. Originally started in April of 2012 as [Edited] the server has grown to 190,000+ lines of code. Our server offers many unique aspects, Such as Custom Mapping for both Interior and Exterior properties, and many custom scripts to give players more things to do and achieve. IP: [Edited] Website: [Edited] The server has just re-opened and we're looking for players aswell as staff team and faction leaders, please do join and give the server a try if you like roleplaying servers, tons of fun.
    1 point
  5. Hello there! You found Dystopia: The Incident, an original sandbox post-apocalyptic RPG. Keep reading below and you’ll find out more... Test server: mtasa://46.105.109.59:22008 Discord: https://discord.gg/Zs5bWSX Current version: alpha 0.75, check out details here DOWNLOAD (0.75 alpha) Key concepts Food and water are scarce and you need to be on the move to stay alive. Inventory size is limited, forcing you to prioritize. Vehicles require constant maintenance. Faction camps, bases, shanty towns and other encounter zones all over San Andreas. Exploration is rewarded. World is densely populated with NPCs and who you choose to kill matters. Environment is harsh and punishes the weak and the dumb. Moral decisions to be made. End goal. Roleplay friendly. Designed to be also enjoyable as a single-player experience. Setting 2000: A series of catastrophic earthquakes smashed the cities and countryside of San Andreas. In the aftermath, the whole state found itself separated from mainland. Fear and selfishness roamed free, pushing society into chaos. In the heart of San Fierro, one of the largest cities of San Andreas, government-sponsored Zombotech Corporation was researching biological weapons in its underground facility. The labs were heavily damaged by the cataclysm and a deadly infectious agent escaped in the streets. While emergency services struggled to contain the disaster and minimize collateral damage, death was spreading unnoticed. 2001: The Establishment evacuated survivors of the outbreak in the barricaded city of Las Venturas but infection spread inside the fence. They nuked the city and placed San Andreas under strict military quarantine. Nobody gets in, nobody gets out. They dubbed the disaster ‘The Incident’ to minimize its amplitude, media soon went silent and survivors were forgotten. 2007: 6 years passed and things have not become better. Regular people picked things up from where the government left them and started to organize. This is a tough new world, populated with the full spectrum of humanity: resilient survivors, vicious bandits, cannibalistic raiders, oppressive military forces and the rest of the loons. No line between good and bad was ever so ill-defined. San Andreas is ruled with an iron hand by Governor Skinner, who took office only six days after the Incident. His armed forces fight to control the territory, herding men into the new Refugee Camp. Resources are scarce and many dropped the last remnants of morality when they faced starvation. Violent clans and factions fight over the remains, establishing turfs or just trying to stay alive. Militias fight for supremacy, idealists work to maintain civilization and everybody else just struggles to survive another day in an increasingly suffocating world. As it became evident that the government has no rescue plan for them, despair started to crumble the minds of the few sane left. All attempts to flee San Andreas are met with airstrikes. But there must be ways to escape this place... What you can experience right now Explore a detailed post-apocalyptic map with many encounter zones. Plenty of NPCs, both friendlies and baddies. Dynamic faction and spawn system. More than 40 missions already in the game. Detailed inventory with more than 100 items to be found and used. Basic needs, stamina, infection, various other modifiers like pain, bleeding, exhaustion or inebriation. Innovative looting mechanic. Four zombie types, with different behavior. Scavenge the world for materials to build settlements or to use simple crafting and cooking. Upgrade and drive rugged vehicles across the wasteland and engage in vehicular combat. Trade, recruit and discover parts of the story by chatting with NPCs. Experience dark humor and some strong themes (16+). Simple interface, consistent graphic style. What still needs to be done The current gamemode version is alpha 0.75. Required for beta: skills and abilities implementation, npc traffic, karma system and map completion (now >90%). Once the project hits beta and the core is completed we’ll start focusing exclusively on the missions and story. Seeking friends for the end of the world Want to jump onboard and take part in the development? Great, join our Discord server using the link on top (the recommended approach) or PM me here. We're always looking for like-minded developers. Wanted: scripters, mappers, storytellers, 3D artists and testers. However, keep in mind that we're not looking to monetize this project in any way. We’ve used the work of many MTA community members and the gamemode will be shared alike with the community when completed. You will gain full credit for your work but no other type of compensation. Share your thoughts We do love suggestions and implement all good fitting ones, so don’t be shy and tell us what you think about this project, using the channels highlighted above. The answer is guaranteed and we'll also give full credit for any original ideas. Media 100+ development screenshots here (I suppose this is what you were looking for from the beginning, instead of reading a wall of text) Thanks for reading! Watch this space for fresh information and media.
    1 point
  6. add (server type) to list search to be able to find A certain type from servers easily. types like role play or zombie or Rpg or another.. Here
    1 point
  7. إذا ماعندك شي تضيفه للموضوع لا تعلق على الموضوع لما يكون شخص متواصل معي بكل مكان منتدى خاص و ديسكورد وبعد ما اسوي له كل شي واضيع وقتي واعلمه ايش المطلوب بيتجاهل الكلام وبيحط موضوع هذا بيكون ردي
    1 point
  8. I haven't really made DX buttons so can't say for sure. My buttons and menus at my server are the default MTA ones (non-DX). I used my method to scale all DX rectangles & texts on the screen and it works quite well with those.
    1 point
  9. Welcome MTA Team The game in the past was beautiful and was entered by a large number of fans but now reduce the number dramatically and why what is the reason? The reason is not to update the game such as updating chat outside the servers and the addition of friends and private chat, etc. This is also the reason for the retirement of players because of the game updates and I asked many people about the reason for retirement through social networking sites, most of which is why I hope Update the game thank you Mr FouR
    1 point
  10. Its a good suggestion and very useful I like it
    1 point
  11. طارح لنا كود صحيح لاكن انت مستعمله بالطريقة الخطاء اطرح الكود كامل عشان نحل مشكلتك ياخوي !
    1 point
  12. مود جميل ورائع شكرا علي الاهداء واستمر موفق
    1 point
  13. الوظيفة ماعندها بارامتر اللاعب . . إستعمل RequestBrowserDomains
    1 point
  14. Olá @Sphynx, creio que já deve ter solucionado, nesse caso, como você quer desenvolver um Chat Local, o que você pode usar para "cancelar" o chat nativo é: onPlayerChat + cancelEvent Como vai funcionar: Quando um player usar o chat nativo(global), a mensagem será cancelada, sendo assim meio que anulado o mesmo; Daí é só você configurar o novo chat a seu gosto
    1 point
  15. كل كلامك غلط ماله علاقة على استضافة ولا على جهازك الخاص settings.xml مبرمج على انه ياخذ المعلومات من ملف mysql ومود settings.xml الأصل المعلومات تنحط في ملف mysql بس البعض من ابطال الديجتال الي مالهم اي خبره يحاولون يعدلون على ملفات مود get وطبعا بما انهم ابطال ديجتال (منوب) يروح يخرب الكود ويحط اليوزر داخل فنكشن username = get( "username" ) ? يسويه كذا ثم يجي يبكي لوحة التسجيل مو شغاله username = get( "root" ) البعض من ابطال الديجتال يكون شوي فاهم ويسويه كذا username = "root" على خادم لينكس ويتوقع ان السيرفر يشتغل .dll هذا غير ابطال الديجتال من بتاع تصنيف (سوبر منوب) الي يرفع ملفات ويندوز ? ثم يبكي السيرفر مو شغال كلمتني على الخاص وضبطت لك كل شي ماعدا شي واحد تحتاج تسويه بنفسك ما تبي تسويه شي راجع لك
    1 point
×
×
  • Create New...