Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 31/05/17 in Posts

  1. @Master_MTA لا يأس مع الحياة @iMr.WiFi..! صغير سريع خير من كبير بطئ @#BrosS جرب قبل ما تقول خطأ @#Soking صفي النية بس @#_iMr.[E]coo زمان كانت وظيفتك في المنتدى تحطيم الناس @Abu-Solo ... no comment تعلمت البرمجة منهم = { -- Developer Ahmed زمان كان اسمي @a7zan , @Abdul KariM , @</Mr.Tn6eL> , -- من بداياتي في المنتدى -- طبعاً في اشخاص مب قادر اسوي لهم تاج بسبب ضعف الانتر نت و احتمال كبير التعليق ما يوصلكم -- نسور . دابل . تابل . وفيه تاني كبيرين لكن ما اتذكر لأن ذاكرتي لا تتذكر اي شئ قد مر عليه عام او اكثر } واخيراً هذا الشخص @Killer Project لا اعرف ما هي اهميته في هذا المنتدى صاير ما ادخل المنتدى بسبب مشاكل لا تنتهي في الانترنت عندي ..
    6 points
  2. السلام عليكم و رحمة الله وبركاتة جاتني فكرة مود خورافية تساعد علي البرمجة والمود يعتمد علي انك تكون كود و ممكن تسوي مود كامل من داخل السيرفر وبعدين تقدر تنسخ الكود وفكرته مب انه يعطيك اكواد جاهزة لا مثلا يجي جريد ليست فيه كل الايفنتات تختار مثلا onMarkerHit memoيجي في ال اول سطر الكود كامل بعدين فانشكن مثلا وهكذا الي معي يضغط لايك في الفكرة و ابدا اسويه والي شايف انها فكرة مب حلوة او ماتخلي اللاعب يعتمد علي نفسه من الويكي و كذا يحط رايه
    3 points
  3. Hi everyone! While it is very obvious that MTA has been carrying through a remarkable amount of success over the past few years, I think it lacks a rather important feature. Have you ever wanted to join a server with a large download size that would take a substantial amount of time to finish and at the same time you wanted to continue browsing the Internet without having most of your connection speed sucked up by MTA? Well, this could be possible if MTA added an option enabling you to control the amount of speed at which your in-game download will run. I believe having such option added to the client's UI would be a great improvement to MTA. It would be even better to, besides adding the option, add the relevant Lua functions such as isClientDownloadSpeedThrottled, getClientMaxDownloadSpeed and etc. Thank you for reading my suggestion, I hope it contributes to the development of MTA.
    3 points
  4. صراحة ماشوفها فكرة كويسة Wiki عندك الـ ماهو مقصر فيه كل شي وامثلة وكل صغيرة وكبيرة تحتاجها بالبرمجة ليش تروح تنكب نفسك بمود من داخل السيرفر وعفسه وقلق هيه سهله ليه تصعبها ع نفسك يعني سواء سويت مود من داخل السيرفر او مود من خارج السيرفر المحصله عندك رح تكون انتاج المود يعني ليه تصعب على نفسك وتورط نفسك بوجع راس على شان بالنهاية ترجع لنفس النقطة الي بديت منها وشكراً
    3 points
  5. Hi, I was curious when the garbage collector would clean something like this: function testFunction () local testVariable = 100 local function firstFunctionInBlock () print("first function, testVariable: " .. testVariable ) testVariable = testVariable + 1 end local function secondFunctionInBlock () print("second function, testVariable: " .. testVariable) testVariable = testVariable + 1 end return function () firstFunctionInBlock() secondFunctionInBlock () end end function testFunction () -------------------------- -- function block -- -------------------------- end Executed with: local newCreatedFunction = testFunction() newCreatedFunction() newCreatedFunction() newCreatedFunction() -- print("--") -- local newCreatedFunction2 = testFunction() newCreatedFunction2() newCreatedFunction2() newCreatedFunction2() Results: first function, testVariable: 100 second function, testVariable: 101 first function, testVariable: 102 second function, testVariable: 103 first function, testVariable: 104 second function, testVariable: 105 -- first function, testVariable: 100 second function, testVariable: 101 first function, testVariable: 102 second function, testVariable: 103 first function, testVariable: 104 second function, testVariable: 105 I assume when I nil the function that is active in the block. newCreatedFunction = nil It will clear the first created function block by the garbage collector. newCreatedFunction2 = nil Same goes for clearing the second created function block. I did like to hear your opinion about this matter!
    2 points
  6. نعم اخوي تضبط
    2 points
  7. 10/10 ماشاء الله عليك السكربتات رائعة و متعوب عليها كفو (: بالتوفيق لك ان شاء الله
    2 points
  8. Of course, he is working with me. He gave me the old KoG server and i'm rebuilding it with his help.
    2 points
  9. Well I just don't know what to answer, is it a question / suggestion or maybe both?
    2 points
  10. Debugging Do you know what debugging is? You might think you do, but unfortunately (in my opinion) only ~15% of the scripters in the community do know the full definition of it. Many people think that debugging code is the same as looking in to the Debug Console and waiting for warning + errors to show up. That's indeed debugging and yet it never provide all information you need to build your scripts. It only can say what goes wrong at a certain line. With other words, the Debug Console by default will only show a limited amount of mistakes you have made in your code. So what is next? You fixed all warnings and errors and yet it doesn't work. You start with making your code visible! I guess 70% would think: Making code visible? Ehhh how??? Let me write it down a little bit different: By using Debug Information making the behaviour of the code visible. I guess 50% would think: Eh what? behaviour of code????? Let me give you an example. Example: (1) outputDebugString("the script has started") -- < this is a debug line if true then outputDebugString("code works here") -- < this is a debug line else outputDebugString("code shouldn't be working here") -- < this is a debug line end Debug console "the script has started" "code works here" The debug console is NOT information for players, it is information for YOU developers! BTW this is a debug line outputDebugString("test") -- < this is a debug line In this case it is just a piece of code that shows information in the debug console. Example: (2) local playerName1 = "snake1" local playerName2 = "cow" if playerName1 == playerName2 then outputDebugString("players playerName1 and playerName2 do share the same name. Name: " .. tostring(playerName1)) -- < this is a debug line else outputDebugString("players playerName1 and playerName2 do NOT share the same name. playerName1: " .. tostring(playerName1) .. ", playerName2: " .. tostring(playerName2)) -- < this is a debug line end Debug console "players playerName1 and playerName2 do NOT share the same name. playerName1: snake1, playerName2: cow" Easy isn't? The concept behind this debug method is to see what the code does / doesn't execute. Is this method handy? It is actually the very basic of debugging, for code that doesn't contain any errors/warnings. I would say it is handy and it is a very powerful method too. It is also handy for people who do not know how to script. If you want people to help you with your code, but you do not know what is wrong with it. You can add those debug lines and point out to where the code stops working. This will make it more efficient for you and the scripter to work out the problem, because the scripter knows where to look. How much debug lines do you have to add to your script? 1? 10? 100? 1000? You could start with around 100 debug lines and as you learn how to script, you can reduce it to 10+ debug lines. Too much debug lines are not always good, because they will give you too much information and it will cost time to manually filter them. So I recommend you to remove some of them afterwards. When you are finished with the tested code, you can remove 90+% of them. Feel free to disable them instead of removing them, if you know that you are going to need them again. For complex code, I use around 25 debug lines, SO DON'T HOLD BACK! Render events It is strongly recommended to remove debug lines that are executed on onClientRender/render events when you are finished with your code. Because that can have influence on the smooth fps.(It will not drop much of the fps, but it can make it feel unsmooth) Clearing the debug console? /cleardebug Know your tools: outputDebugString -- Show a message on the Debug Console bool outputDebugString ( string text, [ int level=3, int red=255, int green=255, int blue=255 ] ) --- outputConsole -- Show a message on the F8 panel. bool outputConsole ( string text ) -- client bool outputConsole ( string text, [ element visibleTo=getRootElement() ] ) -- server --- inspect -- Convert one mixed value to a string. string inspect ( mixed var ) --- print -- Show a message on the terminal / serverwindow / Debug Console. bool print ( string var1[, string var2, string var3...] ) --- tostring() -- Convert a value in to a string. (but for objects/elements, inspect works better) --- iprint -- Show a message on the terminal / serverwindow / Debug Console (convert multiple mixed values automatic to string, no need for tostring or inspect) bool iprint ( mixed var1[, mixed var2, mixed var3...] ) --- outputChatBox -- You can also debug with outputChatBox (even though it is less efficient) bool outputChatBox ( string text [, int r=231, int g=217, int b=176, bool colorCoded=false ] ) -- client bool outputChatBox ( string text [, element visibleTo=getRootElement(), int r=231, int g=217, int b=176, bool colorCoded=false ] ) -- server Debug message levels 0: Custom message 1: Error message 2: Warning message 3: Information message (default) Addition by @Hale https://wiki.multitheftauto.com/wiki/OutputDebugString Advanced tools: local line = debug.getinfo(1).currentline -- get the line of the script where the code has been executed. 1 = current function. (can be useful if you want to get the line where this function has been called from) https://www.lua.org/pil/23.1.html WIKI MTA: WIKI MTA debugging tutorial/information. https://wiki.multitheftauto.com/wiki/Debugging
    1 point
  11. Thisdp's DirectX Graphical User Interface System ( MTASA 2D+3D DxLIB ) This dxlib provide dx gui functions and events to make it easier to use and alternative to change the style more flexibly. Features: 1. Update Check(DGS will notice you if there is a higher version, and you can choose to ignore it or disable it in the config file) Update Command: "updatedgs" 2. Dx GUI Types: Basic: Window Edit Box Button Grid List Image Scroll Bar Scroll Pane Text Label Tab Panel Detect Area Radio Button Combo Box Check Box Memo 3D Interface 3D Text Browser Switch Button Selector Plugin: Media Browser Color Picker Mask Remote Image QRCode Blur Box Rounded Rectangle Nine Slice Scaling Object Preview Support Canvas Scroll Pane's 3D Effect 3. Edit/Memo rewrite ( You can no longer find the problems in dgs, the problems which exist in cegui) 4. Detect Area is efficient when checking whether your cursor is in a complicated shape. 5. Debug Mode , Command: "debugdgs" 6. You can apply shader to the dxgui ( Compatible with some resources like Objec tPreview ). 7. Include CMD, Command: "dgscmd" ( For more help, please input "help" in the CMD ) 8. Memo/Edit rewritten. 9. Object Oriented Programming Class. 10. Render Target Failure Check ( Warns when there's no enough video memory to create render target ). 11. DGS resembles cegui, you can find the similar feeling when scripting with dgs. 12. 48-hour-response service, your suggestions and bug report will be dealt with in 48 hours ( or less, like 12 hours ? ) 13. Custom Style system 14. Built-in shader plugin 15. More properties 16. Built in multi-language support 17. Simple GUI To DGS (G2D) Notice:Do not close your server or stop the script when it is updating. Wiki: https://wiki.multitheftauto.com/wiki/Dgs ( Still Working In Process ) Auto Completion For N++ (Thanks To Ahmed Ly): http://www.mediafire.com/file/m6dm7815d5dihax/Lua.zip Discord Server: https://discord.gg/QEs8q6W Download DGS : https://github.com/thisdp/dgs Notice: Need acl rights to call fetchRemote/getPlayerIP. If you want to sell your script which involves DGS, please exclude DGS from your price. HurtWorld Backpack Panel(Example) DGS Network Monitor(Built-in)
    1 point
  12. Данный урок предполагает, что вы уже знаете, что такое MySQL, как это работает и зачем это нужно, если же нет - ознакомитесь с данным уроком и вернитесь сюда! Цель данного урока - донести до вас некоторые вещи, которые вы, возможно, не понимаете или даже не задумывались о них. Немного теории MySQL - свободная реляционная система управления базами данных. Для работы с базой используется язык структурированных запросов(он же SQL). Более подробную и интересующую Вас информацию об SQL, Вы сможете найти на просторах интернета. Мы же поговорим о ключевых моментах работы с MySQL. SQL имеет 4 основных оператора для манипуляции с данными. SELECT - выбор данных, удовлетворяющих заданные условия. INSERT - добавление новых данных. UPDATE - изменение существующих данных. DELETE - удаление указанных данных Я не буду рассказывать вам о существующих типах данных MySQL, как создавать или удалять таблицы, я лишь хочу поделиться с вами ключевыми вещами, которые помогут вам оптимизировать работу вашего сервера и уменьшить нагрузку на него. Рассмотрим на основе примера В качестве примера для данного урока будет использоваться таблица с названием players, имеющая следующие столбцы: `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `surname` varchar(255) NOT NULL, `age` tinyint(3) NOT NULL, `adminLevel` tinyint(3) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) Тут я думаю все понятно, никаких проблем быть не должно. Для примера рассмотрим несколько запросов. Получаем всех игроков: SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` Получаем игрока с конкретным id: SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` WHERE id=117 Получаем всех игроков, имя которых равно какому-то конкретному значению: SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` WHERE name="Bobby" Получаем первых 10 игроков, возраст которых равен 19 лет: SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` WHERE age=19 LIMIT 10 Получаем всех игроков, возраст которых больше или равен 18 годам: SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` WHERE age >= 18 Ну тут все просто, пришло время рассмотреть все на основе конкретных примеров и указать ключевые особенности. Неправильный выбор функции для формирования запроса Это первая и наиболее часто встречающаяся ошибка, которую я вижу в коде различных разработчиков. Для формирования запроса к MySQL в МТА существует 2 функции, а именно: dbExec и dbQuery. Обе функции выполняют запрос, но их главная особенность заключается в том, что dbQuery возвращает какой-либо результат и тем самым занимает оперативную память сервера, а dbExec нет. Очень часто разработчики забывают использовать dbFree после запроса, для создания, редактирования или удаления какой-то записи. Рассмотрим на основе простого примера создания нового пользователя: local Name = "Bobby" local Surname = "Raily" local Age = 23 dbExec(dbConnection, "INSERT INTO `players` (name, surname, age) VALUES(?, ?, ?)", Name, Surname, Age) Опять же, все просто, сформировали простой запрос, создали новую запись в таблице players с заданными значениями. Можно, конечно, реализовать это с помощью dbQuery, но обязательно не стоит забывать про dbFree! Казалось бы, а что такого? Но все дело в том, что если у вас на сервере зарегистрируется большое количество игроков, то это порядком забьет память ненужной ерундой, проще говоря мусором, который хранить на сервере нет никакой необходимости. local Name = "Bobby" local Surname = "Raily" local Age = 23 local Query = dbQuery(dbConnection, "INSERT INTO `players` (name, surname, age) VALUES(?, ?, ?)", Name, Surname, Age) dbFree(Query) Я надеюсь, что вы четко и ясно уяснили для себя этот пункт, на это стоит обратить особое внимание. Некорректное использование dbQuery для получения результата запроса Очень часто вам необходимо получить какие-то данные из базы данных. В этом нам помогают dbQuery и dbPoll. Если внимательно посмотреть на синтаксис функции dbQuery, то вы увидите, что в качестве первого необязательного аргумента она принимает callback функцию. Что же это такое и зачем это нужно? Я настоятельно рекомендую вам как можно внимательнее и ответственнее подойти к этому вопросу, т.к. многие разработчики до сих пор не до конца уловили суть данного аргумента и не понимают из-за чего происходят "фризы" во время работы того или иного скрипта. Предположим, что у нас зарегистрировано 100 000 уникальных игроков(для крупного проекта - вполне себе реально, но мы рассматриваем все в теории). Нам необходимо получить список всех имеющихся игроков. Вы должны понимать, что это не произойдет моментально, в любом случае на данную операцию будет затрачено какое-то количество времени. Рассмотрим два примера, использование запроса без callback функции и с ней соответственно: local Players = dbPoll(dbQuery(dbConnection, "SELECT * FROM `players`"), -1) for Index, PlayerData in ipairs(Players) do print(PlayerData.name) end function CallbackFunction(qh, tag, score) local Players = dbPoll(qh, 0) for Index, PlayerData in ipairs(Players) do print(PlayerData.name) end end dbQuery(CallbackFunction, dbConnection, "SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players`") Время, занявшее на выполнение данного запроса, составило 489 мс. Так в чем же характерная особенность между первым и вторым способом? Особенность заключается в том, что пока выполняется получение данных из базы первым способом, то работа нашего сервера приостановиться на время, которое необходимо для выполнения данного запроса, что может негативно повлиять на всех игроков, в результате могут возникнуть такие вещи как фризы, рассинхронизация и т.д. Поэтому вы четко должны понимать для себя нужно вам это или нет. Если же вам необходимо, чтобы работа сервера была приостановлена на время выполнения запроса - используйте первый вариант, если же нет - второй. Если же вы до этого имели опыт с другими ЯП, то вероятнее всего понимаете, что такое синхронное и асинхронное выполнение. Первый вариант - это синхронное выполнение, второй - асинхронное. Выполнение лишней работы посредством Lua Так же очень часто наблюдаю картину, когда многие разработчики выполняют лишнюю работу, а именно предпринимают лишние действия, которые можно было сформировать в результате SQL запроса. SQL существует довольно большое количество времени и за это время овладел всеми необходимыми функциями, операторами и прочими вещами для формирование корректного запроса. К примеру мы хотим получить id всех игроков, adminLevel которых выше или равен 2. Как видно из запроса - мы сразу же получаем список игроков, уровень которых равен или больше 2 function CallbackFunction(qh, tag, score) local Players = dbPoll(qh, 0) for Index, PlayerData in ipairs(Players) do print(PlayerData.id) end end dbQuery(CallbackFunction, dbConnection, "SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players` WHERE adminLevel >= 2") Но иногда мне приходится видеть, как некоторые разработчики получают список всех игроков и начинают проверь их adminLevel посредством Lua, что само по себе не имеет никакого смысла, т.к это выполнение лишней работы. function CallbackFunction(qh, tag, score) local Players = dbPoll(qh, 0) for Index, PlayerData in ipairs(Players) do if PlayerData.adminLevel >= 2 then print(PlayerData.id) end end end dbQuery(CallbackFunction, dbConnection, "SELECT `id`, `name`, `surname`, `age`, `adminLevel` FROM `players`") Заключение Надеюсь, что вы не зря потратили свое время и подчеркнули для себя какие-то полезные вещи, которые в последствии помогут вам при разработке собственного игрового режима или мода. Если же у вас остались какие то вопросы или вам что-то непонятно - вы можете оставлять свои вопросы в данной теме.
    1 point
  13. بسم الله الرحمن الرحيم وفينا السليم اما بعد : اقدم لكم سيرفري .. سيرفر هوامير الهجولة , السيرفر كله حصريات .. والسيرفر قيد التطوير والآن سوف اعرض بعض صور السيرفر .. [F1] - الوصف : فري روم جداً طبيعي .. [F2] - الوصف : فك قطع السيارات باحترافية وبسهولة .. فقط بنقر الشيء المراد فكه/تركيبة او تشغيله/اطفائه مرتان [F3] - الوصف جداً حصري من ناحية الهدرز : بحيث انه الهدرز يزداد قوة صوته بحسب سرعة سيارتك + يسمعه الاخرين من حولك [F4] - الوصف نوعاً ما حصري : بحيث انه يتم الربط بين اناشيد رمضان والقرآن بلوحة واحدة [F5] - الوصف نوعاً ما حصري : سبورت ستسم بحيث انه يمكنك اظهار الرسائل في الشات, ويمكنك ايقاف الشات عندك, واعطاء نقطة للمساعد بضغط كلك يمين عليه [F6] - الوصف حصري : بحيث عند الانتقال سوف تطير الى المكان وتختاره بنقر الزر على اختيار المكان [F7] - الوصف : شراء الرتب بساعات .. [F9] - الوصف حصري : بحيث انه يعدل على اعداداته ,من نواحي عديدة =============== هذا فقط المودات الموجودة + لكن القيم مود جداً حصري ولن تجده بأي سيرفر هذا عرض للسيرفر في اثناء الصيانة [ لا أحلل التقليد او سرقة الافكار ] ============= الاصحاب : @Dr.Marco @iMr.WiFi..! ========= وسلام خير الختامم <3 [ قيمو السيرفر من 10 .. لا يفوتكم القيم مود عند الافتتاح ]
    1 point
  14. روات جمع رو بس واي فاي ما يعرف يسولف عربي , عشان هيك
    1 point
  15. 1 point
  16. Hello to everybody ! I'm here today to announce the return of one of the oldests MTA DM/OS servers ! =KoG= DM/OS Servers are back ! It's been a while since the server closed and a lot of things happened. But today we announce that one of the oldest communities of MTA (since 2006) will come back as strong as it used to be ! We will get back the =KoG= clan and only the best players will be able to join us. Of course anyone can join our servers and try to beat the toptimes. We want this community to be as entertaining and competitive as it used to be ! We bring back the old server style, but with some new cool features as: - New login panel: - New user panel (Opens with F7) - Money and shop system - Ranking and achievement system INFORMATION: OS Server: mtasa://195.154.156.242:22004 DM Server: Not ready yet Website: http://mta.teamkog.com Don't be shy and come to our servers and say hi ! If you want to be part of the clan you will have to send a join request to the forum when it's ready ! See you all in-game !
    1 point
  17. كفوك + غير صورتك فضلا وليس امرا
    1 point
  18. addEventHandler ( 'onClientMouseEnter' , root , function ( ) if ( source == button ) then end end ( كمل الباقي
    1 point
  19. vehicles = {} -- Create 140 vehicles and set the color to red for i=1, 140 do local x = 1625+((i-1)*5) -- Create 5 point space of each vehicle local veh = createVehicle(451, x, 1831, 10.2, 0, 0, 0) setVehicleColor(veh, 255, 0, 0) table.insert(vehicles, veh) end -- Or if you want a separated function function setVehColor() for _, veh in pairs(vehicles) do setVehicleColor(veh, 255, 0, 0) end end
    1 point
  20. 'onClientMouseEnter' guiSetProperty
    1 point
  21. السلام عليكم و رحمة الله و بركاتة نبي ننظم القسم العربي شوي لانه صراحة اشوف فيه اشياء غريبة منها تكون مسوي موضوع ورد عليك مثلا مبرمج متمكن من اللغة بس قليل يدخل يجي واحد يساله سؤال في موضوعك وثاني شي تكتب كود يجي واحد يسويلك اقتباس للكود حقك بطول 1000 متر وثالث شي العنواين و يرجي الالتزام بموضوع الاخ كور طيب حل هذه المشاكل ؟ اول شي لا تسوي اقتباس لشخص كاتب كود و الكود طويل مرة لانه يخرب صفحة الموضوع وثاني شي نكتب الاكواد داخل Spolier مثال وبهذا الشكل يكون الموضوع منظم و نقدر نفيد بعض بدون ما تحس انك قرفان من الموضوع و مكسل تقرا كل ذا وكمان قلت مراجعة موضوع العنواين للاخ كور من هنا اتمني الالتزام بالموضوع ليصبح القسم العربي منظم اكثر و اكثر وطريقة عمل Spolier الضغط علي صورة العين ثم اختيار رمز <> وكتابة كودك وبديل الاقتباس اكتب @ ثم اسمه سويله منشن و بعدين قله الخطا في الكود
    1 point
  22. Ah, I see what you were saying now, so when you call the function multiple times you expected the variable to be 100 again (set to default). I wonder if that's intended though, who knows.
    1 point
  23. It is indeed a kinda unexpected/ yet expected that testVariable remains part of the scope per function. But the main reason why I posted this, is: function testFunction () local testVariable = 100 local function firstFunctionInBlock () print("first function, testVariable: " .. testVariable ) testVariable = testVariable + 1 end local function secondFunctionInBlock () print("second function, testVariable: " .. testVariable) testVariable = testVariable + 1 end return function () firstFunctionInBlock() secondFunctionInBlock () end end This new created function is created inside the function block and yet it is the reason why this block remains to exist. If this function is destroyed it should automatic clear the whole function block with the garbage collector: Which has been created when the testFunction is called: local newCreatedFunction = testFunction() function testFunction () local testVariable = 100 local function firstFunctionInBlock () print("first function, testVariable: " .. testVariable ) testVariable = testVariable + 1 end local function secondFunctionInBlock () print("second function, testVariable: " .. testVariable) testVariable = testVariable + 1 end return function () firstFunctionInBlock() secondFunctionInBlock () end end
    1 point
  24. Nice! That's actually really interesting. For some reason, I was hoping testVariable might go out of scope when testFunction returns but then saw the results you posted and it was kinda surprising to me that it was not garbage-collected and remained in memory stack otherwise firstFunctionInBlock and secondFunctionInBlock would have failed to increment it.
    1 point
  25. Hmm seems like an efficient method of using callbacks mate
    1 point
  26. جدولك خطأ لازم حروف أنجليزية ههههههههههههههههههههههههههههه امزح والله كلكم أخوياي
    1 point
  27. شكرا ع مساعدة يطلب اغلاق الموضوع
    1 point
  28. 1 point
  29. @Ismaeel_finer كودي لو سويته سيرفر بتظهر لكل اللاعبين لانه root
    1 point
  30. @Ismaeel_finer حياك الله باي وقت
    1 point
  31. لو حطيت جدول يحتوي القيمتين ذول بيرجع لك الجدول من بين القيم المرجعة
    1 point
  32. select Syntax : select (Index, ...) ترجع لك البارمترات الممررة بداية من Index مثال : print( select (1, "Number1", "Number2", "Number3", "Number4") ) -- نطبع -- Results : Number1 Number2 Number3 Number4 طلعت هذي النتيجة لاننا بدأنا من الرقم 1 فارجع كل البارمتراتبداية من نمبر 1 ل نمبر 4 ولو خلينا كذا print ( select (2, "Number1", "Number2", "Number3", "Number4") ) -- نطبع -- Results : Number2 Number3 Number4 بيطلع النتائج ذي لاننا بدأنا من الاندكس الثاني ولو خلينا الاندكس "#" Note : لازم تكون قيمة نصية بيطلع لك عدد البارمترات الممررة print ( select ("#", "A", "B", "C", "X", "Y", "Z") ) -- Results : 6 -- لان العدد القيم 6
    1 point
  33. الالوان الي مختارهن معجوقات عجق
    1 point
  34. Проблема решена, проблема была в установленных читах для CS, которые не могли давать возможность играть в МТА. Скриншот проблемы Решение проблемы: 1) Удаление Jads 2) Поиск и остановка процессов InjectorServiceProject.exe 1656 Services 0 12,692 KB Injector.exe 1228 Services 0 31,448 KB
    1 point
  35. ماشاء الله فيه ناس حية في هذا المنتدى
    1 point
  36. Since all the other DxGui libraries are outdated / abandoned, I think many people will decide to use yours. Are you sure you are not willing to make an English documentation? A wiki page like this: https://wiki.multitheftauto.com/wiki/Slothman/Slothbot
    1 point
  37. Hello I would like to propose an idea. My idea is that MTA's full source code gets documented on Wiki. It might be a hard job to document everything, but there's no rush, it could go little by little until someday the whole source code is explained on wiki. Also there could be an introduction page where is explained how to compile mta by yourself, and how to do your first function, and so on (Similar how scripting introduction page explains Lua scripting) The reason why I'm proposing this idea is because contributing to MTA's codebase seems a bit too hard, and not very explained in my opinion, especially for the newer people who'd like to contribute. Simply put, even by reading source code itself, sometimes we don't know what something does even if it's commented in the code. I think that by achieving this idea we could get people into easier understanding how everything works and how to contribute since everything would be explained on Wiki. This would equal more pull requests,bigger and faster progress, and perhaps some more developers in mta team haha. P.S Writing everything on Wiki might take a long time, but throughout say a year I think it could be fully documented (It wouldn't be just 1 guy writing wiki pages, anyone who knows the functions and how they operate could help out by writing a wiki page, hell I'd even help out make the pages, a dev would just need to explain to me how a function works and I'd make the page if they don't have time do so) Thank you for reading, please tell me what you think of this
    1 point
  38. Re-opening soon - http://raysmta.com Stay updated. And since some other company randomly purchased - http://raysmta.eu - I suggest you stay away from that since they sell paid products not 'FREE'. I'd recommend you get registered on our Forums, and our Hosting will be up soon.
    1 point
  39. Hello! i'm here to present my script called "Killcam" it's inspired by Sniper Elite V2 The script is very simple, when you make a lethal shot with a sniper rifle it shows with slow motion the path of the bullet. The resource is compiled, maybe i will upload an open source version in the future but first i want it to be known because if no one knows it someone could steal it. Usage: 1- Get a sniper rifle. 2- Aim to someone's chest, head or testicles. 3- Shoot! Download: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5362 Changelog: --Second Release: ---------------------------------------------- -Added Moving Kill, Moving Headshot and Moving Testicle shot (when you shoot to someone that is walking or running) -Fixed bullet direction (sometimes the bullet was pointing to any place but not the target player) -Added country rifle -Fixed bug when two player shooted at the same time. (it used to count the kill only for who shooted second, now it counts both) ----------------------------------------------- Video: HD: enjoy!
    1 point
  40. Uncompiled version: http://pastebin.com/8r0eDFuu http://pastebin.com/mUnWtgtL
    1 point
  41. well thats true but cant destroy a child's dream to make a server for him to play with his friends
    1 point
×
×
  • Create New...