Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 16/09/18 in all areas

  1. Multi Theft Auto: San Andreas 1.5.6 is released Today the MTA team is delighted to announce the release of MTA:SA 1.5.6. You will receive an automatic update soon, but if you don't have MTA installed, you can get it from the home page . There are many changes and improvements across the board, but one feature stands out as being especially exciting: custom animations! This has been a feature on our radar for many years, and @Saml1er was the one who decided to make what many have considered a dream, a reality. Take a quick look at this video of custom animations in action to get a glimpse of what's possible: Changes This release includes many additions, improvements, and fixes. Find the complete set of changes, and more information about the improvements listed below, in the 1.5.6 release notes. If you'd like to keep on top of all the things we're working on, why not watch or star our GitHub repository? Here is a heavily cut-down selection of features and fixes. Highlights: New features Ordered roughly by reverse chronological order New languages Bulgarian, Indonesian and Chinese (Traditional) (a3217) New server console feature for arrow command history (#274 by myonlake) New ACL property ModifyOtherObjects.resourceName for one resource only (6614d) New element functions getElementAngularVelocity, setElementAngularVelocity (#73 by lex128) New chat function clearChatBox (#215 by CrosRoad95) New vehicle functions getVehicleRespawnPosition, getVehicleRespawnRotation, setVehicleRespawnRotation (#334, #338 by l0nger) New goggle effect parameter "noiseEnabled" parameter to setCameraGoggleEffect (#324 by samr46) New drawing function dxDrawCircle (#266 by CrosRoad95, Saml1er) New jetpack functions setPedWearingJetpack, isPedWearingJetpack (#243 by Dezash) New element function getElementsWithinRange (de149) New GUI functions guiWindowIsMovable, guiWindowIsSizable, guiEditGetMaxLength, guiEditIsMasked (#272, #255 by FileEX) New fire function extinguishFire (#207 by CrosRoad95, #252 by myonlake, also 7838b) New world functions getPedsLODDistance, setPedsLODDistance, resetPedsLODDistance (#231 by CrosRoad95) New GUI scrollbar functions guiMemoSetVerticalScrollPosition, guiMemoGetVerticalScrollPosition (#248 by myonlake) New GUI functions guiMemoIsReadOnly, guiEditIsReadOnly (#236 by FileEx) New special property "underworldwarp" (#208 by CrosRoad95, #222 by myonlake) New vector support for collision functions (#217 by myonlake, #163 by Pawelo / 4O4) New animations functions setPedAnimationSpeed, engineLoadIFP, engineReplaceAnimation (Saml1er, with some help from Icensow, raw data loading courtesy of #247 by samr46) New colshape function isInsideColShape (#195 by tederis) New vehicle function for client-sided setVehicleHandling (#192 by Renkon) New world sound parameter to setWorldSoundEnabled to stop sound immediately (44844) New ped weapon function isPedReloadingWeapon (#149 by Neproify) New debug hooks pre/postEventFunction added to addDebugHook (#126) New event parameter "deleted" add to onResourceStop (98502) New vehicle function isVehicleWheelOnGround (#146 by ZReC) New command reloadacl (#131 by Timic) Enable switching camera view mode for trains (#125 by ZReC) New encode functions encodeString, decodeString (#184 by SDraw) New pickup events onPickupLeave & onPlayerPickupLeave (#176 by emre1702) New account functions getAccountIP, getAccountsByIP, getAccountsByData & setAccountName (#164 by emre1702) Highlights: Bug fixes and tweaks getChatboxLayout now works as advertised (#254 by myonlake) Return 2 vectors for ele:getBoundingBox (#305 by Pirulax, #332 by Addlibs) Fix inconsistencies in reading userdata in Player functions (#308 by Addlibs) Improve debug info for garbage collected files (#312 by Dezash) Fix crashes with account functions when using empty strings (faa57) Missing bShallow for server-side water (#240 by myonlake) Fix spawnPlayer rotation not working properly (#258 by myonlake) Fix false elements in getElementsWithinRange (#300 by Sergeanur) Removal of the /whowas command (0cffa) Improve connect to disconnect you less frequently (7fc29) Make connect port argument default to 22003 (d698b) Fix many bugs related to animations, jetpack and choking (#229 by myonlake) getVehicleType not being consistent server/client side (b08f3) Fix custom CEGUI skins accidentally breaking dxDrawRectangle (4e57a) Ignore colorcodes while tabbing in chatbox (#238 by Timic) Various bind tweaks, please tell us if something is broken (by emre1702) Fix empty string in getVehicleNameFromModel (instead of false) (#219 by emre1702) Weather blending improvements (#204 by emre1702) Fix 'stream_title' meta tag when the playback is started (#206 by Sergeanur) Fix problems when using a controller with more than 7 axes (382a3) Console no longer displays an error message when pressing the key of a disabled MTA control (23dad) Fix crash caused by calling client-side setPlayerNametagShowing with a ped (554a2) Fix server crash on server-window resize (becf0) Download This release is backwards compatible with the older 1.5.x releases (1.5.5, 1.5.4, all the way to 1.5). However, if you would like to take advantage of all of these useful changes, you will need to go and download the update! Servers: binaries are available, and don't forget to update your default resources. What's next? We're continually working on new features and fixes for MTA. If you're happy to report bugs and crashes do try out our Nightly release stream. You can do this by going into Settings -> Advanced -> Auto updater -> Update build type. Change to "nightly" and hit "Check for update now". Only do this if you like crashing and like filling out bug reports. We're also working on a brand new community: we want your suggestions, ideas and feedback! If you have any questions or would just like to chat with the community, do check out our official Discord server. We have channels for scripting, general support (bugs), mod development, and many more! Thank you! Thank you very much to the following community members for their work towards this release: Addlibs, ArranTuna, CrosRoad95, Dezash, Dutchman101, Einheit-101, emre1702, FileEX, forkerer, Icensow, jlillis, l0nger, lex128, lopezloo, MIKI785, myonlake, Neproify, Pawelo / 4O4, Pirulax, Renkon, samr46, SDraw, Sergeanur, tederis, Timic3, ZReC, and many others who helped document on the wiki, reported bugs, and helped out with issues. (If your name is missing or you want to change your entry above, please PM @qaisjp) You could be on this list! We're always on the lookout for new contributors. Contribute on GitHub, and chat with us on Discord. Finally, everyone, please give a ? to the newest maintainer of Multi Theft Auto: @Saml1er. Until next time, The MTA Team
    2 points
  2. لنا الله نسونا ولا ذكرونا عالعموم بالتوفيق لكم امواح
    2 points
  3. Welcome, Fellow Multi Theft Auto players Introduction: Screenshots about our server: Some of our server Features :
    1 point
  4. But you have it under if rank >= 2 then, so how can that work? Isn't it supposed to be for the first player? Ie. rank 1? There's another case where that event is triggered, so try it there: function DestructionDerby:handleFinishActivePlayer(player) local timePassed = self:getTimePassed() local rank = self:getPlayerRank(player) if rank >= 2 then triggerClientEvent("winnerMessage",resourceRoot,"Winner!!!", getPlayerNametagText(player)) triggerEvent("plusz1", player) end finishActivePlayer(player) if rank and rank > 1 then triggerEvent( "onPlayerFinishDD",player,tonumber( rank ) ) end local activePlayers = getActivePlayers() triggerEvent("onPlayerDeadInRace",getRootElement(),rank,player) if #activePlayers == 1 then if (not isMapDM()) then if getResourceState( getResourceFromName( "podium" )) ~= "running" then triggerClientEvent("winnerMessage",resourceRoot,"Winner!!!", getPlayerNametagText(activePlayers[1])) triggerEvent("plusz1", activePlayers[1]) --Here else triggerClientEvent("winnerMessage",resourceRoot,"","") setElementHealth(activePlayers[1],0) end end if getElementModel(getPedOccupiedVehicle(activePlayers[1])) == 425 then setElementHealth(activePlayers[1],0) end triggerEvent( "onPlayerWinDD",activePlayers[1] ) end end
    1 point
  5. هذا الكود راح يعمل ثقل كبير على الكلاينت ( يسبب لاق ) ء
    1 point
  6. Yes, use dxGetTexturePixels on s and then dxConvertPixels to get png/jpg data and then save it using for example fileWrite.
    1 point
  7. عاش يسطا ايوا كدة حبيبي اتمنالك كل خير
    1 point
  8. yeah, i've recently discovered that thing too. It appeares sometimes for no reason. Any time mate
    1 point
  9. Oh dude. Yes, that solved my problem, but i spent 5 minutes trying to notice what was i doing wrong because the debug script showed me this error "unexpected symbol near ' ", and it was pointing me to this line end) And when i was replying to you i noticed that you inserted ( by mistake i may guess ) a weird invisible character. Anyway, thank you for your kind help ^^ Have a nice day
    1 point
  10. i recommend you to use this instead of executing on each client: addEventHandler("onClientObjectDamage",root,function() if getElementData(source,"object:unbreakable") == true then cancelEvent() end end) And of course you should add this server-side setElementData(obj,"object:unbreakable",true) -- obj - your object variable or this client-side setElementData(obj,"object:unbreakable",true,true) -- obj - your object variable. Last argument allows to read this information server-side to make it everything work. Anyway let's analize your problem. The most common problem - you put server-side script above client-side script in meta.xml. Another problem - you have another errors in client-side script, so you can't use it. @JanKy
    1 point
  11. كلامك صحيح 100% لتحاتي الغالي بخصوص هالشي يكون بطل نفسك
    1 point
  12. What is the serial? 1) Start MTA 2) Press F8 3) Enter command: serial
    1 point
  13. ---IN THE SERVER I HAVE THIS ERROR HERE: getPlayerEXP = function(l_13_0) if not tonumber(getElementData(l_13_0, "exp")) then -- return not l_13_0 or type(l_13_0) ~= "userdata" or getElementType(l_13_0) ~= "player" or 0 -- do return end -- HERE end outputDebugString("Bad argument @ 'getPlayerEXP' [Expected player element at argument 1, got " .. tostring(l_13_0) .. "]", 2) return false end -- IN THE CUSTOMER I HAVE THIS ERROR HERE IN THE SAME LINES: getPlayerEXP = function(l_7_0) if not tonumber(getElementData(l_7_0, "exp")) then return not l_7_0 or type(l_7_0) ~= "userdata" or getElementType(l_7_0) ~= "player" or 0 do return end -- HERE end outputDebugString("Bad argument @ 'getPlayerEXP' [Expected player element at argument 1, got " .. tostring(l_7_0) .. "]", 2) return false end -- THE ERRORS ARE OF: `end`expected (to close `if` at line 197) near do -- any solution? ? :C
    1 point
  14. ليه رندر راح يصير لاق أستعمل حدث عند دخول اللاعب في السيارة بحيث يكون الكود كذا addEventHandler( 'onClientPlayerVehicleEnter' , root , function( ) if ( getPedOccupiedVehicle( localPlayer ) == false ) then return end for _ , vehicle in ipairs(getElementsByType( 'vehicle' ) ) do setElementCollidableWith ( vehicle , getPedOccupiedVehicle(localPlayer) , false ) end end )
    1 point
  15. We are not your selve there are resource at community site to download them
    1 point
  16. ---- Updates--- Police Computer. More to come! -------Updates------ Ammo transportation mission for Government
    1 point
  17. تحتاج عنصرين اول شي شريط التمرير والزر حق السحب كما في الصورة شريط التمرير راح يكون له اربع متغيرات اللي هي الاحداثيات والطول والعرض x, y, w, h راح يكون له متغيرين thumb وزر شريط التمرير اللي اسمه thumb_y اول شي احداثياته y بما اننا راح نسوي شريط تمرير عمودي راح نستخدم الاحداثي والعكس مع الافقي THUMB_S اما المتغير الثاني اللي هو حجمه بما اننا نستخدم ثوابت فالأفضل نستخدم اسم متغير بحجم كبير progress راح يكون عندنا متغير ثاني وهو نسبة المثوية للشريط تكون اسمها يكون كل شي بالجدول التالي SCROLLBAR = { x = 0, y = 0, -- احداثيات الشريط w = 13, h = 480 -- الطول والعرض thumb_y = 0, -- الاحداثيات للزر progress = 0, -- نسبة التقدم THUMB_SIZE = 27, -- حجم الزر hold = true, -- راح اشرحها بعدين } وبسطت المفهوم بصورة اما بالنسبة للعملية الحسابية عشان تحريك الزر الازرق بسيطة اول شي نحتاج نعرف مكان الماوس راح نستخدم مكان الماوس في عمليتين 1- التحقق من ان الماوس داخل المنطقة الرمادية عند الضغط 2- بما اننا نستخدم شريط تمرير عمودي y ننقل الزر الازرق لاحدثيات الماوس راح نستخدم وظيفتين getCursorPosition getKeyState - mouse1(زر الماوس الايسر) وتكون حسابات الطريقة كالآتي hold عند الضغط على المنطقة الرمادية بالزر الايسر بالماوس نسوي متغير لكن عند افلات زر الماوس نلغي المتغير طبعا نحن نريد يفلت زر الماوس باي منطقة شرط يكون ضغط في البداية على المنطقة الرمادي كالآتي hold يكون عملية تحويل المتغير function render() local cx, cy = getCursorPosition() -- نجلب احداثيات الماوس -- نتحقق ان احداثيات الماوس داخل المربع المادي local hovered = cx >= SCROLLBAR.x and cx <= SCROLLBAR.h and cy >= SCROLLBAR.y and cy <= SCROLLBAR.h if hovered and getKeyState "mouse1" then -- نتحقق كمان ان الماوس مضغوط SCROLLBAR.hold = true -- hold نفعل قيمة end if hold and not getKeyState "mouse1" then -- hold اذا الاعب افلت زر الماوس وكان متفعل متغير SCROLLBAR.hold = false -- نلغي المتغير end -- hold if SCROLLBAR.hold then -- اذا تحقق الشرط هذا كما شرحنا سابقا بامكاننا نجري حساباتنا SCROLLBAR.thumb = ... SCROLLBAR.progress = ... end end onClientClick طبعا في طرق كثيرة مثلا باستخدام حدث لكن اخترت هذي عشان يكون كل الحسابات في مكان واحد ننتقل الى المرحلة المعقدة وهي عن الضغط او السحب نريد نقل الزر الازرق الى الاحداثيات المطلوبة لكن في مشاكل الأولى قد يتعدى الزر الازرق المنطقة الرمادية يكون فوق المنطقة او تحتها y نحتاج نعمل الحد الأدنى للإحداثيات وراح يكون اقل حد هو احداثيات المنطقة الرمادية وننقصه من طول الزر الازرق y اما للحد الأقصى هو طول المنطقة الرمادية مجموعة مع احداثيات يكون y : الحد الأدنى y+h-THUMB_SIZE : الحد الأقصى صار كذا عندنا نطاق لمكان الشريط الازرق يوضع فيه راح نستخدم math.max, math.min كذا حلينا المشكلة الأولى اما المشكلة الثانية هي التوسيط لما ننقل الزر الازرق لاحداثيات الماوس تصير مشكلة كما في الصورة الحل بسيط ناخذ احداثيات الماوس وننقصها من نص حجم الزر الازرق كما في المعادلة التالية cy-(THUMB_SIZE/2) يصير كذا حلينا كل المشاكل اللي تتعلق بالنقل تصير المعادلة الحاسبية لاحداثيات الزر الازرق كالتالي --[[ نتأكد ان قيمة احداثيات الماوس الازرق اصغر من الحد الأقصى واكبر من الحد الأدنى لنضعها في نطاق محدد لاتخرح عنه math.min( math.max( احداثيات الزر الازرق, الحد الأدنى ), الحد الأقصى ) ]] SCROLLBAR.thumb_y = math.min(math.max(cy-(t/2), SCROLLBAR.y), SCROLLBAR.y+SCROLLBAR.h-SCROLLBAR.THUMB_SIZE) اما بالنسبة لحساب النسبة المئوية نحتاج نخليه احداثيات الزر الازرق بالنسبة لاحداثيات المنطقة الرمادية يعني لو كانت احداثيات المنطقة الرمادية هي 100 واحداثيات الزر الازرق هي 150 فتصير الاحداثيات 50 بالنسبة الى المنطقة الرمادية y بالمتغير thumb_y يعني نحتاج نطرح المتغير كذا اعطانا قيمة اولى لحساب النسبة المثوية لكن نحتاج الى قيمة قصوى ثابتة وهي طول المنطقة الرمادية منقوصة من حجم الزر الازرق تصير الحسبة كالتالي SCROLLBAR.progress = math.floor((SCROLLBAR.thumb_y-SCROLLBAR.y)/(SCROLLBAR.h-SCROLLBAR.THUMB_SIZE)*100) يكون الكود النهائي كالتالي -- اتجاه شريط التمرير راح يكون عمودي -- y ومتغيرات لاحداثي x يعني راح نستخدم ثوابث لاحداثي SCROLLBAR = { x = 0, y = 0, -- احداثيات الشريط w = 13, h = 480 -- الطول والعرض thumb_y = 0, -- الاحداثيات للزر الازرق progress = 0, -- النسبة المئوية THUMB_SIZE = 32, -- حجم الزر hold = false, -- راح اشرحها بعدين } function render() -- onClientRender local cx, cy = getCursorPosition() -- نجلب احداثيات الماوس -- نتحقق ان احداثيات الماوس داخل المربع المادي local hovered = cx >= SCROLLBAR.x and cx <= SCROLLBAR.h and cy >= SCROLLBAR.y and cy <= SCROLLBAR.h if hovered and getKeyState "mouse1" then -- نتحقق كمان ان الماوس مضغوط SCROLLBAR.hold = true -- hold نفعل قيمة end if hold and not getKeyState "mouse1" then -- hold اذا الاعب افلت زر الماوس وكان متفعل متغير SCROLLBAR.hold = false -- نلغي المتغير end -- hold if SCROLLBAR.hold then -- اذا تحقق الشرط هذا كما شرحنا سابقا بامكاننا نجري حساباتنا --[[ نتأكد ان قيمة احداثيات الماوس الازرق اصغر من الحد الأقصى واكبر من الحد الأدنى لنضعها في نطاق محدد لاتخرح عنه math.min( math.max( احداثيات الزر الازرق, الحد الأدنى ) الحد الأقصى ) ]] SCROLLBAR.thumb_y = math.min(math.max(cy-(t/2), SCROLLBAR.y), SCROLLBAR.y+SCROLLBAR.h-SCROLLBAR.THUMB_SIZE) -- current/max -- المعادلة ذي تعطينة نسبة لشيء بالنسبة لشيء -- current : هي قيمة احداثيات الزر الازرق منقوصة من احداثيات المنطقة الرمادي عشان تعطينا الاحداثيات بالنسبة للمنطقة الرمادية -- max : هي القيمة الثابتة اللي بنينا عليها النسبة المئوية -- يكون الناتج نضربه ب100 يعطينا النسبة المئوية -- math.floor يعطينا رقم بدون كسور SCROLLBAR.progress = math.floor((SCROLLBAR.thumb_y-SCROLLBAR.y)/(SCROLLBAR.h-SCROLLBAR.THUMB_SIZE)*100) end -- الزر الازرق dxDrawRectangle(SCROLLBAR.x, SCROLLBAR.thumb_y, SCROLLBAR.w, SCROLLBARTHUMB_SIZE, 0x03a9f4ff) -- شريط التمرير اللي هي المنطقة الرمادية dxDrawRectangle(SCROLLBAR.x, SCROLLBAR.y, SCROLLBAR.w, SCROLLBAR.h, 0xb3b3b3ff) -- النسبة المئوية dxDrawText(SCROLLBAR.progress, SCROLLBAR.x, SCROLLBAR.y, SCROLLBAR.x+w, SCROLLBAR.y+SCROLLBAR.h, 0xffffffff, 1, font, "center", "center") end
    1 point
  18. ---- Updates--- Profile Card Added- for applications. A Whole new login panel NOTE: i removed the lines and fixed the image As @RavenTFR Said, i will make new systems 100% better, just suggest some please
    1 point
  19. I Understand totally, this is just a start up, i will change all locations and systems. just a beta if i may say.
    1 point
  20. Great milestone for MTA (fun fact: if I'm not wrong, implementing custom animations required more than 3,000 lines of code! Huge props to you, Saml1er, for making this a reality). Good job to all the contributors! ??
    1 point
  21. Greetings Community. Today, i'v decided to make a tutorial about LUA tables. In this tutorial, you'll find the whole information about it. it's easy just try to follow my tutorial step by step. Tables are the only data structure available in Lua that helps us create different types like arrays and dictionaries. Lua uses associative arrays and which can be indexed with not only numbers but also with strings of corse except nil. Note: "Tables have no fixed size it can contain billions of rows "based on our need." Lua uses a constructor expression "{}" to create an empty table. An example is shown below mtaTable = {} -- simple table empty mtaTable[1]= "MTA:SA" --simple table value assignment There are in built functions for table manipulation. 1) table.concat (table [, sep [, i [, j]]]) : Concatenates the strings in the tables based on the parameters given. local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA)) -- concatenated string of table. === > [[output : 123456]] local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA,", ")) -- concatenate with a character. === > [[output : 1,2,3,4,5,6]] local MTA = {"1","2","3","4","5","6"} -- simple table contain numbers. outputChatBox(table.concat(MTA,", ", 2,3)) -- concatenate MTA (table) based on index. === > [[output : 2,3]] 2) table.insert (table, [pos,] value): Inserts a value into the table at specified position. -- Example 1: local MTA = {"Yellow","Blue","Red"} -- same table but this time contain some colors. table.insert(MTA,"Green") -- insert an other name at the end of the table. -- Result : MTA = {"Yellow","Blue","Red","Green"} outputChatBox("Last color added "..MTA[4]) -- Green -- Example 2: table.insert(MTA,2,"Black") -- insert new color at index 2 outputChatBox("Color at index 2 is "..MTA[2]) -- Black 3) table.remove (table [, pos]) : Removes the value from the table. table.remove(MTA) outputChatBox("The previous last element is "..MTA[5]) -- nil 4) table.sort (table [, comp]) : Sorts the table based on optional comparator argument. Sorting table is often required and the sort functions sort the elements in the table alphabetically. A sample for this shown below. local MTA = {"Yellow","Blue","Red","Green"} for k,v in ipairs(MTA) do outputChatBox("Index: "..k..", Value:"..v) end --[[ Result Index: 1, Value: Yellow Index: 2, Value: Blue Index: 3, Value: Red Index: 4, Value: Green]]-- table.sort(MTA) -- using table.sort for k,v in ipairs(MTA) do outputChatBox("Index: "..k..", Value:"..v) end --[[ Result Index: 1, Value: Blue Index: 2, Value: Green Index: 3, Value: Red Index: 4, Value: Yellow]]--
    1 point
  22. i've already gotten "jbib_diff_007_k_uni" from this function
    0 points
  23. بالويكي مكتوب (SQL injection is rendered impossible). وحسب ما فهمت انه مستحيل تستغل الثغرة ذي
    0 points
×
×
  • Create New...