Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/04/19 in all areas

  1. السلام عليكم ورحمة الله وبركاته كيف حالكم رجعتلكم بمود جديد بدون مقدمات كل شي عن هذا المود تلقونه في هذا المقطع
    2 points
  2. ONLINE AND RUNNING GOOD TO JOIN 2/10/2019 JOIN MY DISCORD SERVER TO ADVERTISE YOUR MTA SERVER https://discord.gg/cugGVgR JOIN MY DISCORD SERVER TO ADVERTISE YOUR MTA SERVER https://discord.gg/cugGVgR Implicit gaming community - https://discord.gg/khx93Hj MTASERVER Welcome to the Implicit Introduction. We are a server that started in the begin of 2016 and is coming back in 04/19 Now we are almost alive for one year with ups and downs we came back in the game. - We want to bring back the roleplay as it was - Legal roleplay is very important in a roleplay server - ILLEGAL roleplay is important to but we are not a RPG server - We want to give everyone something to roleplay - We have an very nice administration team as they are ready to help everyone! - We allow everyone to come ingame as you speak english What do we offer you? We give you the experience to roleplay a good administration team working community and very friendly we offer everyone a faction wich need to have 3 faction members We want to give everyone something to roleplay with out faction or with a faction We have teamspeak almost up where you can communicate ------------------------------------------------------------------------------------------------------------------------------------------ We have new nice mappings we have an discord channel that you are free to join! [ Links below ] ⦁ 21-03-2019 ⦁ Roleplay ⦁ English ⦁ IP: mtasa://46.4.197.67:22003 ⦁ Discord: https://discord.gg/MC8jW7G ⦁ Find us on youtube YOUTUBE CHANNEL DJ set has been added to the script updated forums are up Forum and discord links ⦁ Discord: https://discord.gg/khx93Hj Forum is online: not online yet ⦁ Find us on youtube YOUTUBE CHANNEL JOIN MY DISCORD SERVER TO ADVERTISE YOUR MTA SERVER https://discord.gg/cugGVgR Greetingz from us all. Take a look ingame, any futher comments that will give us an bad reputation is being reported. JOIN MY DISCORD SERVER TO ADVERTISE YOUR MTA SERVER https://discord.gg/cugGVgR
    1 point
  3. Claro ué. O site é livre.
    1 point
  4. https://www.mta-resource.ru/load/resource/id/4721
    1 point
  5. Aqui na seção de Programação em Lua também pode mostrar seus scripts. Não é só para dúvidas. Mas é claro que postar também no community vai ajudar mais gente.
    1 point
  6. Boa, to bem feliz com sua evolução =D, porém aqui não é o lugar correto para postar, o certo seria postar na community.
    1 point
  7. ترا انا اعرف بالبرمجة بس هذا ماقدر اجيبه فـ نشرت هنا وبحل هذي المشكلة إن شاء الله لا ابي اسوي شيء عجبني جداً بسيرفر SAUR إنك لما تسوي الشخصية تجي السيارة توقف بمكان وينزل شخص الخ.
    1 point
  8. Copia e cola a linha de cima automaticamente.
    1 point
  9. Open console with F8, type start realdriveby and press enter.
    1 point
  10. For the items you can use the previous code. And this for attaching the data to elements: Instead of the enchanted table you can also use a regular table. But afaik it is a good match with your set-up. Note: this code works clientside as well as serverside. So keep in mind that you could write the system in a shared file. local elementDataCollection = {} function registerElement (element) local newTable = enchantedTable:create() elementDataCollection[element] = newTable end function getItemsFromElement (element) local thisTable = elementDataCollection[element] if thisTable then return thisTable:get() end return false end
    1 point
  11. ما افتح ولا بدي افتح ديسكور .~.
    1 point
  12. Don't use metatables just for simple table lookups, that's only asking for problems and will decrease performance. In your case (response to original post) an int loop would be faster: for i=1, #playerTable.playerItems do local v = playerTable.playerItems[i] outputChatBox("item: "..v[1]..", count: "..v[2]) -- item: Item, count: 1 end However I can imagine that with a list of 1000's of items you wouldn't really want to loop this table over and over. What you're doing is, you're inserting a new table for every item and there isn't really any way to get the "Item" from the table with a single lookup other than looping the entire thing. What you could do is change the structure of the table to something like this: -- a fixed table that contains all the item ids and information local items = { ['apple'] = {desc = 'A green apple', name = 'apple'} -- an item with id 'apple' } local myItems = { ['apple'] = {count = 10}, -- player has an item with id 'apple' and has 10 of them } Now you'd still have to loop it if you wanted to get all the items at once but if you want to get the count of a specific item you can access it according to the item id. -- say you know the item id, all you do is local item = myItems['apple'] if item then print(item.count) end -- for instance function takeItem(id, count) local item = myItems[id] if item then if item.count >= count then item.count = item.count - count end end end -- if you want to get all then you loop it for id, item in pairs(myItems) do print('ID:', id, 'Count:', item.count, 'Description:', items[id].desc) end Notice you don't have to loop it in the takeItem function which will help with performance. So instead of table.insert you keep a key table where the id's are fixed and don't change so that you can access them by their key/id. Hope this helps.
    1 point
  13. زي ماهو واضح بالعنوان في لعبة قديمة كنت العبها على البلايستيشن وكانت ممتعة نوعا ما ف الي حاب يفتح سيرفر ويتيمز بقيم مود جديد لعل وعسى يستفيد منه شرح مختصر تصادم سيارات طبعا فيه حلبات او مضمار سباق زي مانقول وتتسابق مع ناس تحاول انك تفوز او ماتخلي احد يصدمك wreckfest اللعبة اسمها طبعا الدمج بيكون على حسب السرعة الي تمشي فيها واللعبة فيها نظام تعديل يعني كفرات ضد الانزلاق ونيترو وتقدر تزود السيارة وتركب صدامات كل الي ذكرته قابل انك تسويه باللعبة بسهولة تامه , القيم سهل انك تسويه بس راح تحتاج مصمم مابات يصمم لك وتقدر تضيف غرف او بمعنى تخلي كل ماب منعزل عن الثاني طبعا راح تحتاج الدمنشن عشان تفرد الاعبين بمعنى اصح لو فيه 30 لاعب يلعبون بماب معين واللعبة بدأت وجا زيادة 5 لاعبين يحتاجون يلعبون في نفس الماب انت هنا تحط الماب والاعبين بدمنشن معين وتبدأ اللوبي تستخدم الوظيفة الي طرحتها سابقا عشان تجيب دمنشن فارغ وبس والله , طبعا انا كان ودي اسوي القيم بس قدر الله ماشاء فعل والي عنده زيادة على الفكرة او فكرة احسن يحطها عشان يستفيد الجميع وبالتوفيق ان شاء الله
    1 point
  14. I noticed that I haven't gave you an useful examples. @majqq Well here you have an example of: B In OOP. Not MTA OOP, which I do not like, but pure Lua OOP. And see how the magic does it's job. local newTable = enchantedTable:create() newTable:add({type = "yes", 1, 2, 3, 4}, {type = "no", 5, 6, 7, 8}, {type = "no", 5, 6, 7, 8}) -- add three items local collection = newTable:get() -- get the whole collection print(collection[1]) -- get the first print(collection[2]) -- get the second print(collection[3]) -- get the third -- Getting the result of the item records. print("all: ", newTable:count()) -- count all: 3 print("`yes`: ", newTable:count("yes")) -- count only type `yes`: 1 print("`no`: ", newTable:count("no")) -- count only type `no`: 2 newTable:remove(2) -- remove item 2. print("`no`: ", newTable:count("no")) -- count only type `no`: 1 When using this code you can easy extend functionality a long the way. Just adding methods to the methods-table and new functionality opens up to you. But remember, do not modify the collection (of the items) without using these functions, or the registration will not be able to get track of the item count.
    1 point
×
×
  • Create New...