Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/04/17 in all areas

  1. mySQL/SQLite/XML: "Long Life" Storage Method. elementData, tables: Streaming data method. It's not correct 100%, but it's useful to catch the difference between them. And about the use of elementData I totally discourage it's use with the purpose of syncing big amounts of data with the client or the server. I like to use Tables and Events instead of elementData ( little bit more difficult but it worth's it ).
    3 points
  2. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Welcome to the first Changelog after the forum wipe. As you already noticed we've changed our logo but that's not the reason i'm posting this. Yesterday was pretty chaotic and really a struggle to finish it. But now i'm proud to announce that our ingame chat has been connected with our discord chat. Ofcourse this is still in alpha stage, there aren't that much functions available yet but that may come later in future updates. Our team is planning to do an alpha test this weekend which is only for alpha testers. If the tests goes well i'll consider placing a release date on this topic but that's not sure yet. I know many of you expected this server earlier then this but i've encountered some bugs that I want to improve before releasing this to the public. Also i've got many suggestions on discord which will be added before the BETA release. So make sure you join our discord channel to keep yourself up to date. As Second i've added a fully working custom ranking system in the organisations.We are seriously leaving the mainstream RPG's with level based ranks. Now you can add ranks yourself with names and permissions. This is still in alpha stage so it's not the final concept we are using for this. Many changes will come within the next update. As third i've decided to release cars like Rockstar Games does within "Grand Theft Auto V". We start with 20 cars which isn't much, but i'm planning to do big thigns with the remaining cars. So stay tuned and wait till we announce the DLC release. Feel free to leave a like and maybe you'll get selected to be one of our "Special" Members. -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    3 points
  3. أستخدم الشادر ض1 , هو قصده أن شخصيه معينه , تكون لسريال او اكثر , بحيث ان محد يقدر يأخذها مأينفع TxD - setElementModel يستخدم وزيفه الشادر باي
    2 points
  4. I think you misunderstood the purpose of element data @NeXuS™ Element data should be only used to sync data between the server and players. Such as scoreboard columns data (a example) Except the bad security, element data has a bad impact on the server performance, as it is synced to all players. Using tables is a much better and faster way to store data.
    2 points
  5. You said it. Events. When you need the data, you request it. No reason to sync all possible data with all players on the server whenever it changes. Most data won't be needed clientside anyway. If you want to output it to the chat, you can do it serverside.
    2 points
  6. В первую очередь тема будет полезна всем, кто только что вошел в скриптинг. ВНИМАНИЕ! Изучение языка Lua должно быть первым шагом в MTASA скриптинге, а не вторым или третьим, поэтому в этой теме я буду в первую очередь делать упор на русские доки по Lua, и во вторую - на доки по MTASA скриптингу. Желающие могут делиться ссылками, которые потом будут добавлены в этот пост. У новичков, обычно, возникают вопросы по языку Lua и по его применению в MTASA скриптинге. Но литературы на русском языке на этот предмет не так уж и много. Все, что касается скриптинга, можно узнать из вики - https://wiki.multitheftauto.com/. Там есть и русские документы, но их все равно мало по сравнению с английской версией, поэтому непонятные моменты можно уточнить здесь на форуме. Ну а что касается самого языка LUA - читаем дальше. Итак начнем просматривать нашу онлайн библиотеку.. Ссылки от юзера MX_Master, т.е. мои рекомендации : --- http://lua.ru/ http://lua.ru/doc/ Вторая ссылка - перевод официального справочника по языку Lua на русский язык. Очень мало пояснительной инфы и перевод местами сильно косноязычный. Дешево и сердито. Помогает уловить общий смысл, но тестировать все придется самому, т.к. примеров немного. http://ilovelua.narod.ru/ http://ilovelua.narod.ru/about_lua.html http://ilovelua.wordpress.com/ Ресурсы одного и того же автора. Все объясняется в самой что ни на есть доступной форме. Даже первоклассник программирования сможет это понять (: Вторая ссылка дает практически 70% того, что должен знать MTASA скриптер по языку Lua. Рекомендую. http://w3d.wiki-site.com/index.php/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B_Lua Основы Lua. Простые и понятные примеры. Рекомендую. http://ru.wikipedia.org/wiki/Lua Куда же мы денемся без инфы в википедии. http://ltwood.wikidot.com/scripting:lua-lang Весьма понятный мануал. Примеров также много как и в официальном справочнике. http://steps3d.narod.ru/tutorials/lua-tutorial.html Мануальчик с небольшим игровым уклоном, в котором даже больше (вроде) инфы чем в официальном справочнике. Описания функций и примеры к особо непонятным функциям и конструкциям. http://netsago.org/ru/docs/1/4/ Введение в Lua. Небольшое. http://www.script-coding.com/Lua.html Введение. Общее инфо. Много простых примеров. http://xgm.ru/page/400 Немножко про LUA. http://luagml.ucoz.ru/doc/lua/lua.html Своеобразная копия http://lua.ru/doc/. Возможно, кому-то такой вид больше нравится. Cсылки от юзера Kenix : --- http://www.rldp.ru/mysql/mysqldev/glava04.htm - Нормальный перевод официального справочника на русский язык. Рекомендую. Примечание: в этом доке версия Lua 4.0, а не 5.1 как в МТА. Поэтому многие вещи могут отличаться. http://cortexcommandru.3dn.ru/forum/9-801-1 - В середине вся суть. http://progopedia.ru/language/lua/ http://big.vip-zone.su/doc/devel/lua.xml Cсылки от юзера CrazyDude : --- http://gta-rating.ru/forum/showthread.php?t=1370 Cсылки от юзера Kernell : --- Регулярные выражения в Lua http://www.lua.ru/forum/posts/list/57.page#408 Объектно-Ориентированное Программирование (ООП) в Lua http://mydc.ru/topic1429.html Основы декларативного программирования на Lua http://habrahabr.ru/blogs/development/77413/ Cсылки от юзера Elengar : --- Lua за 60 минут. http://zserge.wordpress.com/2012/02/23/lua Cсылки от юзера nikitafloy : --- http://www.cronos.ru/kb-cronospro-lua.html А еще у нас в подфоруме есть целый раздел с туторами по Lua/MTASA: viewforum.php?f=153
    1 point
  7. السلام عليكم و رحمة الله و بركاته دخلت من كم يوم سيرفر طاره و لقيت وظيفة طيران جديدة عجبتني سويت نسخة مصغرة منها ضض وهذه تعتبر BETA يعني ينشرها واصحح الاخطاء بعدين انشر النسخة النهائية وراح تكون اكبر و احلي واحتمال تكون دي اكس وللاسف احتمال يكون اخر سكربت انشره لاني بتفرغ لسيرفري الجديد ندخل ع الصور اللوحة الطائرة تيجي هنا في علامة حمراء علي الخريطة هذي المكان الي مفروض تروح له وتاخذ 5000$ كاش ض Ceated By MR.NaiF - Master_MTA - Killer Project ويوم تفوز ترجع المطار وتاخذ الفلوس المهمة في عالم وهمي 1999 الااهدائات @Master_MTA @Killer Project @MR.S3D @3NAD @#DABL @TAPL @Tete omar @!#NssoR_) @UAEpro @#Soking @Deativated @سعد الغامدي @iPrestege @[email protected] @Mr.Cor الرابط https://up.top4top.net/downloadf-455uacv41-zip.html
    1 point
  8. Palace Roleplay Ce este si cu acest server? Acest server detine un gamemod roleplay inceput de la 0 care face diferenta de celelalte servere de pe mta ul romanesc. Ce este diferit la acest server? Pai ne diferentiem prin sistemele unice,staff ul capabil si bine ales. Ce primesc de inceput? Nimeni nu o sa primeasca nimic la inceput deoarece este un server roleplay. Sunt locuri de munca de unde poti obtine bani. Ce economie este pe server? Serverul detine o economie realista de la locuri de munca pana la case,masini,afaceri. Cum o sa evolueze serverul si ce planuri aveti? Pai incercam sa avem o evolutie buna, constructiva care sa aduca jucatori pe MTA ul romanesc. Noi avem in plan sa pastram acest server intr-o maniera al anilor trecuti unde se facea roleplay. Serverul o sa porneasca cu 50 sloturi. Daca o sa aibe succes serverul o sa marim sloturile. Acestea au fost cateva intrebari care cred eu ca vor fi mai importante. Astept intrebari,etc.. Acest server are moduri low-poly(nu fac lag). Mapa este modificare. Nu garantam ca nu o sa fie bug uri la deschidere,problema de sisteme deoarece este creat de la zero si nu se stie cum o sa reactioneze la mai mult jucatori. Aici am facut un video de prezentare al serverului in cateva minute. Link catre video Lideri la factiuni o sa se aleaga la 3 zile de la deschidere. Admini o sa se aleaga in cazul in care este nevoie.
    1 point
  9. Here is a quick new video. A brand new way to load MTA. World premiere, using pefrmdllembed, the DLL to EXE injector. Not like it amounts to anything playable. You might enjoy this if you are a technological mind like me.
    1 point
  10. جزاك الله خير بس أنا ابي الطريقة على مود التاقات لان الاغلبية يكررون
    1 point
  11. you can not use 'destroyElement' to destroy/hide dx drawing function 'cause it's not an element. You have to use some kind of variable to know if that dx drawing need to be draw. Also don't use 'guiGetScreenSize' or 'showCursor' function in 'onClientRender' eventHandler. It's no need for that it will do fine if you call it once not constantly when player updates frames. local mX, mY = 1366, 768 local jX, jY = guiGetScreenSize() local showDxDrawing = false; function dxDraw() if (not showDxDrawing) then return; end hatter = dxDrawRectangle (jX/3.2, jY/4, 500, 350, tocolor(0, 0, 0, 150)) -- háttér hattertext = dxDrawText ("Csatlakozol?", jX/3.2+130, jY/4+75, _, _, _, 3, "sans", "left", "top") -- háttér szöveg igen = dxDrawRectangle (jX/3, jY-300, 150, 50, tocolor(0, 200, 0, 150)) -- igen igentext = dxDrawText ("Igen", jX/2-195, jY-300, _, _, _, 3, "sans", "left", "top") -- igen szöveg nem = dxDrawRectangle (jX/3+295, jY-300, 150, 50, tocolor(0, 200, 0, 150)) -- nem nemtext = dxDrawText ("Nem", jX/3+325, jY-297, _, _, _, 3, "sans", "left", "top") -- nem szöveg end addEventHandler ("onClientRender", getRootElement(), dxDraw) function nemclick() showDxDrawing = not showDxDrawing; showCursor(not isCursorShowing()) end addEventHandler("onClientGUIClick", nem, nemclick) EDIT: @rusztamas just noticed, you used GUI event handler to detect DX click. You CAN NOT use GUI events to detect DX 'cause DX is not same as GUI. You can use "useful function" from wiki 'isMouseInPosition' and event 'onClientKey' to detect dx click. correct code would be this local mX, mY = 1366, 768 local jX, jY = guiGetScreenSize() local showDxDrawing = false; function dxDraw() if (not showDxDrawing) then return; end dxDrawRectangle (jX/3.2, jY/4, 500, 350, tocolor(0, 0, 0, 150)) -- háttér dxDrawText ("Csatlakozol?", jX/3.2+130, jY/4+75, _, _, _, 3, "sans", "left", "top") -- háttér szöveg dxDrawRectangle (jX/3, jY-300, 150, 50, tocolor(0, 200, 0, 150)) -- igen dxDrawText ("Igen", jX/2-195, jY-300, _, _, _, 3, "sans", "left", "top") -- igen szöveg dxDrawRectangle (jX/3+295, jY-300, 150, 50, tocolor(0, 200, 0, 150)) -- nem dxDrawText ("Nem", jX/3+325, jY-297, _, _, _, 3, "sans", "left", "top") -- nem szöveg end addEventHandler ("onClientRender", getRootElement(), dxDraw) -- function from wiki.multitheftauto.com (not written by me) function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end function nemclick(button,press) if (isMouseInPosition(jX/3+295, jY-300, 150, 50)) then if (button == "mouse1" and press) then showDxDrawing = not showDxDrawing; showCursor(not isCursorShowing()); end end end addEventHandler("onClientKey", root, nemclick);
    1 point
  12. شوي وتقول خرطوش
    1 point
  13. كم مرة اقول م ابي اشوف حد يقول ما اعرف وجديد بالبرمجة خش الويكي وشف الفنشكن..... اففف سوي تايمر نوع 1 حط الوقت اللي ينتهي فيه الانترو مثلا ٦ ثواني وظهر لوحة التسجيل باستعمال setTimer guiSetVisible
    1 point
  14. https://wiki.multitheftauto.com/wiki/SetWeaponProperty
    1 point
  15. معلش أعرف ان الإفادة تمت بس أعطي طريقة ثانية TimeToFinish = getTickCount() + 5000 inCounting = true function StartCount() if inCounting then counting = math.ceil( (TimeToFinish - getTickCount()) /1000 ) dxDrawText(counting, ..............) if counting == 0 then inCounting = false TimeToFinish = getTickCount() end end end addEventHandler("onClientRender", root, StartCount) حط المتغيرات بالسطرين الأول تحت مكان تبي الوقت يبدا يمكن تضغط زر أو مدري رح يعد من 5 الى 0 أي خطأ نبهوني لأني جوال
    1 point
  16. I Do not know what is this problem ????!!! I re-installed mta but no effect , I took my friend acl ,but I still have the problem ?? Help me please. it is for all commands although I logged in sever ! but I cannot use most of help commands like refresh,start,restart,addaccount,logout ,whowas etc .. scripts that i create also do not work !
    1 point
  17. الله يسلمك بعد ماتحط داتا على البيانات تسوي ريتورن بالالمنت الي سويته coNdxLibCreateButton المفروض في الفنكشن عشان تقدر تجيب الداتا الي عليه اما كودك قبل ماكنت راجع بألمنت والباقي واضح
    1 point
  18. Modifier des loots, en ajouter ou en soustraire ce n'est pas modifier le script. Ajouter des coordonées dans une table pour ajouter des loots tout le monde peut le faire. Ce qu'il faut c'est trouver des systèmes inédits et les réaliser. Par exemple, je développe depuis plusieurs mois un GM de A à Z inspiré du principe de DayZ. J'ai fait un systèm de construction, un systèm de tourrelles, un système de forêt etc... Ce qu'il faut c'est se démarquer faire de l'inédit partiel. Pas un truc de totalement nouveau si tu n'en as pas l'inspiration, un truc qui change de l'ordinaire, un truc qu'on ne voit pas souvent.
    1 point
  19. Correct! Hope you enjoyed the show, Simple01. I really should switch the wallpaper, huh ^^ After all it is my default account I record on.
    1 point
  20. aScreen_ , aVarB = { guiGetScreenSize ( ) } , true function StartCounter ( ) if ( aVarB == true ) then aVarB , aNumber , aBoolean , aRender = false , 20 , true , function ( ) if ( aNumber > 0 ) then if ( aBoolean == true ) then aNumber , aBoolean = ( aNumber - 1 ) , false setTimer ( function ( ) aBoolean = true end , 1000 , 1 ) end else removeEventHandler ( 'onClientPreRender' , root , aRender ) aVarB = true end dxDrawText ( aNumber , ( aScreen_ [ 1 ] - 19 ) / 2 , ( aScreen_ [ 2 ] - 32 ) / 2 , ( ( aScreen_ [ 1 ] - 19 ) / 2 ) + 19 , ( ( aScreen_ [ 2 ] - 32 ) / 2 ) + 32 , tocolor ( 255 , 255 , 255 , 255 ), 1.00, 'pricedown' , 'left' , 'top', false, false, false, false, false) end addEventHandler ( 'onClientPreRender' , root , aRender ) end end
    1 point
  21. بـ المتغيرات dxDrawText or guiCreateLabel
    1 point
  22. You could have worked more on it, but nice release.
    1 point
  23. It's useless, I prefeer doing it with dirty code not with internet software and CMD. But like for showing to the community something new.
    1 point
  24. He's true about elementData, it's not safe to use due to security issues. The data of the element is synched between the client side and serverside which makes it even easier to change things in the serverside of the scripts.I wouldn't use this if it's about something that will be saved on quit, more like something with no value to the server.
    1 point
  25. Maybe you should read again what element data is and how it works. https://wiki.multitheftauto.com/wiki/SetElementData
    1 point
  26. Use getRealTime().timestamp this will return the current date of the client/server depending on which u run this function on as a UNIX timestamp. Google UNIX Timestamp converter to have a better understanding of what it is. Since we don't want players to adjust their time on their PC so they have infinite VIP we will make this function server sided. addEvent("addVIP",true) addEventHandler("addVIP",getRootElement(),function(source) local account = getPlayerAccount(source) local accName = getAccountName(account) aclGroupAddObject(aclGetGroup("VIP"),"user."..accName) -- This returns a table of the time including hour, minutes, seconds etc... -- we just need the timestamp in the table so we use ".timestamp" which is the current date in seconds (UNIX timestamp). local currentDate = getRealTime().timestamp -- now we must store that data (currentDate) into the player's account on a key called "VIPPurchaseDate". setAccountData("VIPPurchaseDate", currentDate) end) function checkPlayersVIP( ) -- Now we make a loop through all the players in the server. local plrs = getElementsByType'player' for i=1,#plrs do -- We get the player's account and their VIP purchase date. local account = getPlayerAccount( plrs[i] ) local purchaseDate = getAccountData( account, "VIPPurchaseDate" ) -- We now check if they have purchased vip on the account. if purchaseDate then -- We get the current time of the server, local currentDate = getRealTime().timestamp -- and minus the player's purchased date from it. 3600 seconds = 1 hour so we just multiply it by 24 to get a day. if currentDate - purchaseDate >= 3600*24 then -- If it is greater than or equals to 24 hours we remove the vip from the player's account. aclGroupRemoveObject( aclgaclGetGroup("VIP"), "user."..getAccountName(account) ) outputChatBox( "the message you may want to tell the player that his VIP has finished", plrs[i], 255, 100, 100 ) setAccountData("VIPPurchaseDate", false) end end end end -- we add a timer to check the players every minute of their VIP status setTimer( checkPlayersVIP, 60000, 0 ) P.S: Please use the code <> button when posting code. It just makes things much easier to read and identify.
    1 point
  27. function disableChat() local account = getPlayerAccount(source) if isGuestAccount(account) then cancelEvent() end end addEventHandler("onPlayerChat",root,disableChat)
    1 point
  28. @Fabervox Тебе в политику надо Серьезно, у тебя нереальный скилл отвечать не отвечая по существу ничего @obuhhh Тебе надо составить вектор из полученных глобальных угловых скоростей и скалярно перемножить его на вектор оси машины (его можно получить из матрицы элемента).
    1 point
  29. استمر ولا توقف ي قلبي ولا عليك من يقول تقليد و الخ .. لحظت فترات سابقا .. كانو ناس يزرفون يقلون زراف الخ .. اذا شخص قلد فكره قالو بعد زرف فكره اذا شخص سوا تقريبا نفس فكره قالو سرق فكره كلشي خلوها سرق .. مثال دخلت مطعم تقول له عطني كباب .. تروح مطعم ثاني تشوف عنده كباب تقول له مقلد مطعم فلان ي ** له سنين فاتح قبلك .. صارت نفس شي هنا من شخص يسوي نفس شي قالو سرقه او الخ .. فـ استمر ولا عليك من اي احد اهم شي انك تسوية بنفسك من 0 ~
    1 point
  30. NeXuS™ presents dxDrawScrollingText Introduction Do you want to make a scrolling text? It's easy with just a function. Status IN DEVELOPMENT It's still IN DEVELOPMENT but it's published. Screenshot Usage example exports.dxDrawScrollingText:dxCreateScrollingText(500, 400, 100, "Test scrolling text", 60) (This is shown on the screenshot.) Download MTA:SA Community Link Syntax nil dxCreateScrollingText ( float x, float y, float width, string text, int pixelPer60 ) Source code
    1 point
  31. Hey mates I'll like to share with you my personal works,so it's an map of "Jail interior" with an jail system script,i like to hear your opinions about that because it took alot of time to be done It's the "Version 1.0" the second version will be more developments than this one & with PD interior. Jail Interior v1.0: http://i.imgur.com/adDQIU4.jpg http://i.imgur.com/PNP77RY.jpg http://i.imgur.com/4lqLE7S.jpg http://i.imgur.com/ZSnxpfw.jpg http://i.imgur.com/ZOAHo1l.jpg http://i.imgur.com/H6uifrh.jpg
    1 point
×
×
  • Create New...