Popular Content

Showing content with the highest reputation on 26/12/16 in all areas

  1. 3 points
    So I'm finally releasing the MTA Highlight extension that powers our syntax highlighting on the forums and on the wiki. This enables the blue and orange links you see that link to the Wiki for MTA functions. The highlighter is built off of Google's prettify library, so is only compatible with software that uses Google Prettify to highlight their code. Installation Usage is really simple, and it sits very well with Google's own prettify library. Note, that you'll need a version of JQuery for the functions to work. In your HTML HEAD includes, add the following: <!-- Add JQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <!-- Add Google Prettify library --> <script src="//cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script> <!-- Lua not added by default, add it--> <script src="//cdn.rawgit.com/google/code-prettify/master/src/lang-lua.js"></script> <!-- Get the latest function definitions from MTA Forums --> <script type='text/javascript' src='//forum.mtasa.com/uploads/javascript_syntax/luafuncs.js'></script> <script type='text/javascript' src='//forum.mtasa.com/uploads/javascript_syntax/mtafuncs.js'></script> <!-- Add MTA-prettify library --> <link rel="stylesheet" type="text/css" href="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.css"> <script type='text/javascript' src="//cdn.rawgit.com/darkdreamingdan/MTA-prettify/master/mtahighlight.min.js"></script> You'll then need some JavaScript to use Google's Prettify and apply MTA's markup: $(function () { // Perform Google Prettify PR.prettyPrint(); // Add MTA markup applyMTAMarkup(); }); Usage Usage is just like Google's own Prettify, but you'll need to add lang-lua as a class to your <pre/> snippets. For example: <pre class="prettyprint lang-lua"> function onWasted() if not( isGuestAccount (getPlayerAccount(source)) ) then local jailtime = getAccountData(getPlayerAccount(source), "Jailtime" ) or 0 local theWeapon = getPedWeapon (source) local weaponAmmo = getPedTotalAmmo (source) if tonumber(jailtime) == nil or 0 then outputChatBox ("1", root) fadeCamera (source, false) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) elseif tonumber(jailtime) > 0 then outputChatBox ("2", root) fadeCamera (source, false) setTimer (portjail, 1500, 1) setTimer (setElementHealth, 1500, 1, source, 10) setTimer (setCameraTarget, 1250, 1, source, source) setTimer (fadeCamera, 2000, 1, source, true) setTimer (giveWeapon, 2000, 1, source, theWeapon, weaponAmmo, true) end end end addEventHandler ("onPlayerWasted", getRootElement(), onWasted) </pre> Example An example JSFiddle is available here: https://jsfiddle.net/darkdreamingdan/0uvzbL1n/. Source code available here: https://github.com/darkdreamingdan/MTA-prettify . I'd really appreciate a GitHub star if you found this useful! Note: Usage may be different if installing on different CMS software. Typically, this is easily implemented by using your CMS/forum's Theme editor.
  2. 2 points
    Hi there. Oh, what is that? The holidays are here again? Yep, it looks like they are, so that means the usual stuff. We are going to give you guys & gals a heads up on what has been happening in MTA's world this whole year. And if you are one of those well informed types who does not need a recap, you still might want to give this post a read, as there will be more than that later on! 2016 in Recap Near the end of January, we released a bugfix release for MTA:SA 1.5.x - Multi Theft Auto: San Andreas 1.5.2. Among a few other things, that version had and improved the server app compatibility for Linux server hosters and fixed some desync issues. In July, we started offering a new way of promotion for server owners who wanted to gain more players quickly. Namely, one of the top positions in the ingame server browser for a week in an exchange for a small fee. We felt it was a good way to not only ensure that our Project's financial needs are balanced, but also to allow some smaller but ambitious servers to try and get the player base they were always seeking for. In August and September, we made significant changes to our forums, including a switch to a new forum software. There were a bunch of issues found afterwards (such as keeping the users login states), but we managed to fix most of them. Following that, we were featured in an article on the Rock Paper Shotgun, which was pondering the popularity of multiplayer mods for GTASA, even long after its original release. You can find the full article on the RPS website. And finally, on 20th of October, Multi Theft Auto: San Andreas 1.5.3 was released. This was a large release that could as well have been labelled as a next major release, but was not as it was still compatible with the 1.5 series. A bunch of interesting MTA:SA-related YouTube videos from this year Current player counts and version fragmentation statistics Type Amount of players Date / Time Recent peak number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Highest recorded number of concurrent unique players 27111 players 2016.12.23 (at 17.30 GMT) Recent number of daily unique players 124981 players 2016.12.23 (Friday) Highest recorded number of daily unique players 142785 players 2016.09.04 (Sunday) Recent number of monthly unique players 554757 players November, 2016 Highest recorded number of monthly unique players 626167 players August, 2016 Yes, to our surprise, there was a new concurrent unique player count record set literally on the day we were gathering these stats for you. MTA:SA Version or series Percentage of players using that version or series as of 23rd of December, 2016 1.5.3 95.20% 1.5.2 1.5.1 1.5 3.60% 0.09% 0.09% 1.4.x 0.67% 1.3.x 0.28% 1.0.x + 1.1.x + 1.2.x 0.07% It looks like more people decided to use newer versions of the mod than the last year. *** As for the future, we have been working on the next release, which will contain mostly bugfixes and compatibility tweaks. However, we did some work on new features as well, such as Custom Train Tracks, which we hope to be finished soon. We also want to look into improving streaming, raising the limits and making it possible to add new IDs for things, but this will be tricky. Nonetheless, it would be great to see those features working in MTA:SA one day as, for example, they would allow server owners to use bigger and better custom maps with new vehicles working correctly for all players. That's it for now. Happy Holidays and Best Wishes for 2017 from the MTA Team!
  3. 1 point
    Well im presenting a new dx library today it includes the following: Windows createWindow( id, x, y, w, h, color, text) Tabs createTab(id,x,y,w,h,text,active,parent,bord) bord = if u want the tab to be boredered Edits createEdit(id, x, y, w, h, text, parent) Checks createCheckBox(id,x,y,text,active,parent) Buttons createButton(id,x,y,w,h,text,parent,color,colorh) and there is some more things u can edit by using the class ex button = createButton(...) button.color = {0,0,0,255} thats all for now on TODO LIST: Gridlists (99.999999999%) download link? https://community.multitheftauto.com/in ... s&id=13635
  4. 1 point
    السلام عليكم شباب انا اريد موقع او خادم بيعطي سيرفرات مجانية بس بدي اكتر من اشتراك شهر
  5. 1 point
    السلام عليكم و رحمة الله و بركاته اليوم حسيت اني فاضي شوي و بما انو تاني يوم لي فلأجازة حبيت اسوي هاد السكربت لان صراحة ناس كتير شفتها تطلبو برا المود عبارة عن لوحة الحركات الصور : http://prnt.sc/b6oq3q الرابط : http://up.top4top.net/downloadf-141r9rm1-zip.html المميزات : 1 - ما تقدر تسوي حركة و انتا تموت 2 - تقدر تغير الحرف الي يفتحو من لوحة الأدمنية جوا اللعبة 3 - ما تقدر تسوي و انتا في سيارة الي عندو اقتراحات يقدمها هنا و ان شاء الله اسويها طبعا تقدر تضيف حركات من ملف Anim-Map.map الأهدائات 1 - دابل 2 - تنطيل 3 - ميزو 4 - كروس 5 - احزان 6 - #Bero 7 - justboy 8 - اي حد يدخل يشاهد الموضوع
  6. 1 point
    شكرا يا مستر جراند يحقلك كلمة مستر
  7. 1 point
    اولا اخي الكريم هو اللي يكلمني لو بغا انا ما اجبره يقبل بعرضي
  8. 1 point
    اسعار جميلة بس وش يضمن ان الاستضافة بتستمر
  9. 1 point
    نتمنى التسجيل والمشاركة من الجميع وهل تؤيدون افتتاح سيرفر هجولة جديد؟
  10. 1 point
    @[6ArH]#~Ecoo~ getPlayerTable يعني كذا سويتله حل ؟ وين باقي الوظيفه ؟
  11. 1 point
    جرب local screenW, screenH = guiGetScreenSize() WndColor = guiCreateWindow((screenW - 188) / 2, (screenH - 171) / 2, 188, 171, "لوحة تغيير لون الشات الخاص بك", false) guiWindowSetSizable(WndColor, false) guiSetVisible(WndColor,false) ColorEdit = guiCreateEdit(0.05, 0.22, 0.87, 0.18, "", true, WndColor) guiEditSetMaxLength(ColorEdit, 7) ColorSetBTN = guiCreateButton(0.05, 0.46, 0.86, 0.18, "تغيير اللون #", true, WndColor) Close_BTn = guiCreateButton(0.05, 0.85, 0.32, 0.09, "X", true, WndColor) local KEY="N" function OPEN() guiSetVisible(WndColor,true) showCursor(true) end bindKey(KEY,"down",OPEN) addEventHandler("onClientGUIClick",root,function() if source == Close_BTn then guiSetVisible(WndColor,false) showCursor(false) elseif source == ColorSetBTN then local color = guiGetText(ColorEdit) if color ~="" then triggerServerEvent("setData",localPlayer,color) else outputChatBox("pls write any thing" end end end ) ------------Server addEvent("setData",true) addEventHandler("setData",root,function(color) if not isGuestAccount ( getPlayerAccount(source) ) then setAccountData( getPlayerAccount(source),"colortag",color) else outputChatBox("you must login frist",source) end end ) addEventHandler("onPlayerChat", root,function ( ) if getAccountData ( getPlayerAccount(source), "colortag" ) then cancelEvent() local red, green, blue = getPlayerNametagColor(source) MsgColor = getAccountData ( getPlayerAccount(source), "colortag" ) if MsgColor then outputChatBox(getPlayerName(source)..":"..MsgColor..""..message, root, red, green, blue, true ) end end end ) outputChatBox("# #ccff00[ Dieputy Console ] ##ff6666" .. name .. ":#FFFFFF " .. text, root, 255, 255, 255, true) ":#FFFFFF " = هذا مكان لون الكلام تبع الاعب
  12. 1 point
    Maybe do some more calculation around text width, etc.. Or take a look at dxCreateRenderTarget. You can create one render target (including nametag and flag), then you'll only calculate and draw that render target as one dx element, so there will be no problems like this and you can easily add new things into this render target whenever you want. (There may be an easier way to do this, but this is best solution I can think of right now)
  13. 1 point
    getPlayerName(source) returns false, which means source isn't a player That being because the event is onResourceStart Quoting wiki's onResourceStart: Source The source of this event is the root element in the resource that started. source = the resource started (this isn't the player)
  14. 1 point
  15. 1 point
    * destroyElement (for clarity)
  16. 1 point
    سويت موضوع جديد ’ تصويري لـ البحرين .. http://www.mtaarabs.com/vb/showthread.php?p=7873#post7873 جميع الحقوق محفوظة : سعد الغامدي/ مجتمع العرب
  17. 1 point