Leaderboard
Popular Content
Showing content with the highest reputation on 28/10/17 in all areas
-
OH lol, waaaaaahhh!! This is NO good, hell no. =/ local newLvl = false function newLvlFunction() if not newLvl then setTimer(function() newLvl = false end,5000,1) end newLvl = true end addEvent( "onClientLevelUp", true ) addEventHandler( "onClientLevelUp", localPlayer, newLvlFunction) addEventHandler("onClientRender", root, function () if newLvl == true then dxDrawRectangle(screenW * 0.4083, screenH * 0.9037, screenW * 0.1839, screenH * 0.0528, tocolor(0, 0, 0, 160), false) dxDrawImage(screenW * 0.4094, screenH * 0.9046, screenW * 0.0271, screenH * 0.0491, ":DayZ/tools/images/flags/join.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Congradulations! You have reached "..getElementData(getLocalPlayer(),"level").." Level!", screenW * 0.4385, screenH * 0.9046, screenW * 0.5901, screenH * 0.9537, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end end) @Emix3 points
-
A little bit dirty, but this might work: local newLvl = false function newLvl() newLvl = true end addEvent( "onClientLevelUp", true ) addEventHandler( "onClientLevelUp", localPlayer, newLvl) addEventHandler("onClientRender", root, function () if newLvl == true then dxDrawRectangle(screenW * 0.4083, screenH * 0.9037, screenW * 0.1839, screenH * 0.0528, tocolor(0, 0, 0, 160), false) dxDrawImage(screenW * 0.4094, screenH * 0.9046, screenW * 0.0271, screenH * 0.0491, ":DayZ/tools/images/flags/join.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Congradulations! You have reached "..getElementData(getLocalPlayer(),"level").." Level!", screenW * 0.4385, screenH * 0.9046, screenW * 0.5901, screenH * 0.9537, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) setTimer(function() newLvl = false end,5000,1) end end)2 points
-
الشرح هو شرح تكوين الشيء, شرح كل أمر وكيف يتم ربطه بـ أمر ثاني لـتكوين مايسمى بـ الكود لعمل شيء معين! شرحنا قبل شروحات وغلطنا, وغيرنا غلط بـ طريقة شرحه لاكن نستفيد ونعطيكم نصيحة لكل من يحب يسوي شرح جديد على أنه يشرح كل أمر وكيف ربطه بالأمر الثاني ووش الناتج منهم Thanks2 points
-
Can you point out the things you think are familiar to Dynasty Network so that we can make a change? Dynasty is not even out yet, how in the world are we going to get obsessed about it until we decide to waste our time copying it... besides that don't worry about your stuff being copied, unlike you and your former partner 'infinity' we have no intentions in using people's resources unless its legally released. What a drag...2 points
-
Memory problems https://forum.multitheftauto.com/topic/78081-32-bit-windows-crashing/2 points
-
بسم الله الرحمن الرحيم السلام عليكم اليوم جبتلكم سكربت صنع حماية ف اماكن معينة للهجولة - الاصدار الاول صورة اللوحة : طريقة فتح اللوحة لازم تضيف رتبة 'Hmaya' بالاسل وتعطي نفسك الرتبة وتكتب في اف 8 'حمايه' طبعا السكربت مشفر لحفظ الحقوق مميزات اللوحة : - وضع حجم الحماية - اماكنية اطفائها وتشغيلها بالمكان الي انت موجود فيه - عدم اخراج سلاح او الضرب او ادخال سيارة بداخل الحماية _________________________________________________________________________ رابط اللوحة : اضغط هنا _______________________________________________________________________ الاهدائات : @#Soking @MR.StoRm @Master_MTA @Default#^ @#_'Lu[F]Fy @*Sailor @Abdul KariM @Abu-Solo @iMr.WiFi..! @DABL @Source|> @iPrestege @MR.S3D @Aln3mani @#BrosS @Ahmed Ly @MR.SAMSUNG @Deativated @!#NssoR_) @Tete omar @Ahmed_Negm ---وكل الي يعلق ______________________________________________________________________________________________________ ترقبو الاصدار الثاني ويلا مع السلامة1 point
-
After years away from scripting I was craving to get back into Multi Theft Auto. I always thought it would have been cool if the cars radios were 3D so you could hear them as they drive by. After looking at the new features in MTA I noticed its now possible to have 3D radio. Then I found out the files aren't exactly listenable and needed to be scripted back together so here 4000 lines later I present to you KWK3DRadio This resource makes the car radio 3D so other players hear the music in your vehicle and you hear theirs. This resource uses every audio file in GTASA and patches them back together into realistic sounding random stations with dj babble, station ids and more. If your server runs a weather changing script then the dj might mention incoming weather. There is stuff you haven't heard since you played the game in single player It adds a few stations from the web as well !! Warning you must have the original sound files installed with the game for this resource to work properly. Keys: Press < or > to switch stations. Press ? for next/random track(GTA stations only). Press M to change SFX modes. Scroll Wheel or Press +/- for volume. Commands: Type /radio - for help. Type /radio all - for all stations plus extras. Type /radio gta - for only gta stations. Type /radio stations - for stations with no extras. Type /radio web - for only web stations. Type /radio fav - to favorite the current station. Type /radio unfav - to clear the favorite setting. Type /radio display - to toggle display off and on. Type /radio <url> - to use your own url. Type /headphones - for client side portable radio. click below to download or join KWKSRV in your MTA server browser to try it. https://community.multitheftauto.com/index.php?p=resources&s=details&id=127031 point
-
Working on a First Person Shooter gamemode, and i found a bug. The event onClientPreRender causes some delay at attachElements. Can somebody reproduce attachElements maths for me?1 point
-
اما عن طريق الوظيفة هذي isElementAttached او getAttachedElements getElementType > getElementModel1 point
-
1 point
-
1 point
-
I kinda disagree. A good original game is about atmosphere, story and overall feel. Has little to do with the code base behind it. You can bend existing code to serve your purpose and create a whole new experience. You just use the tools at your disposal. If you do it properly, players will never know that you're using e.g. same underlying algorythm for counting xp as some older server did, and it won't matter to them. The purpose of _all_ of this is still keeping players entertained, right?1 point
-
This resource has been updated to replace old dead web based stations and many bug fixes. I highly recommend trying it again if you had issues with it in the past. Happy Halloween1 point
-
i didn't mean dynasty. when it came to copying stuff, i just wanted to remind you of the servers you created using SAES's resources.1 point
-
+ As the pairs loop can iterate over all kinds of keys, it might not loop the items in order. local table = { "item1", "item2", "item3" } for key, data in pairs(table) do iprint(data) end The result could be: item2 item3 item11 point
-
Not really the same, pairs loop can iterate over unordered tables, so if you have something like local table = { ["item"] = val1, ["item2"] = val2, ["item3"] = val3 } Then you will be able to iterate over it only using pairs() for i,#table do can iterate only over tables like this: local table = { [1] = val1, [2] = val2, [3] = val3 }1 point
-
Hi there, yes this is written from scratch the User Control Panel is completely made by myself using PHP and SQL. Also, for the economy question we're still finalizing the Forums and finishing the Server, so more information on that will be available soon. Thank you for your feedback!1 point
-
User Control Panel (Preview): Hey there, it's been a while since we last updated this topic. Today, I'd like to introduce you our User Control Panel preview. It is still under construction and may not be visible to majority of the users except The Team and BETA Testers. We've tried to keep this as basic as possible, in order to increase the development time for the server. So as you can see, there's another section under the main account named User Control Panel. In this section of the Summary, you can view a live summary of your characters (Max. 3). It displays the main stats, the Cash, Faction and Last Seen Location in-game. Our More Details is still under development as we're still sketching ideas of possible things to add and ways to improve. To stay updated visit our forums - http://lc-rp.com Regards, Team Liberty1 point
-
addCommandHandler getPlayerFromName setElementData bindKey -- chat box getElementData outputChatBox1 point
-
تقدر تسوي setElementData ( player, "texts" , { "hi" , "hello" , "welcome" } ) local playerData = getElementData ( player , "texts" ) or { } print ( table.concat ( playerData, "," ) ) -- راح يجيبها بالتتابع او تقدر تستخدم الارقام او اللوب حق الارقام مثل print ( playerData [ 1 ] ) for i=1 , #playerData do print ( playerData [ i ] ) end1 point
-
"Community" Active players on average: 2 Highest player count: 6 Amount of active players is lower than staff count I am not sure if you can call this a community just yet? Speaking of staff, didn't you just apply for another server's staff position recently? Your attempt of making SAES (oops sorry, SARS) active is not going well1 point
-
وعليكم السلام table.insert هذا الفنكشن يضيف قيمة جديدة في الجدول الساينتكس : table.insert (table, [pos,] value) table = التيبل الي تبي تضيف اليه القيمة pos = طبعا هذا الأرقمنت اختياري وألي هو رقم القيمة اذا ماحطيته بيكون تلقائي اخر قيمة value = القيمة الي تبي تضيفها بعض الأمثلة : local myTable = { 'HI', 'OK', '!' }; print ( myTable [ #myTable ] ) table.insert ( myTable, 'Hello' ) print ( myTable [ #myTable ] ) --[[ ! Hello ]] هنا ما أستخدمنا الأرقمنت الثاني ف ضاف قيمة 'Hello' للجدول (القيمة الأخيرة) local myTable = { 'HI', 'OK', '!' }; print ( myTable [ 2 ] ) table.insert ( myTable, 2, 'Hello' ) print ( myTable [ 2 ] ) --[[ OK Hello ]] هنا استخدمنا الأرقمنت الثاني والي هو رقم القيمة string.find يستخدم للبحث عن كلمة في السترنق string.find (s, pattern [, init [, plain]]) الأرقمنتات المطلوبة s = السترنق الي تبي تبحث فيه pattern = الكلمة الي تبي عنها من السترنق الأرقمنتات الأختيارية init = يحدد من وين تبدأ البحث عن الكلمة (1)ء plain = يطفي البحث عن الأنماط (false) بعض الأمثلة : print ( string.find ( ' Hello', '%s%sHello' ) and 'true' or 'false' ) -- true print ( string.find ( ' Hello', '%s%sHello', 1, true ) and 'true' or 'false' ) -- false if ( string.find ( 'thisString..', '%p%p' ) ) then print ( ( { string.gsub ( 'thisString..', 'S', string.lower ) } ) [ 1 ] ) end -- thisstring.. string.format unpack بأختصار يفك الجدول مثلا عندي جدول كذا myTable = { 'a', b', 'c' } اذا سوينا كذا myTable = { 'a', 'b', 'c' ) a, b, c = unpack ( myTable ) -- 'a', 'b', 'c' اذا تبي تجرب الأمثلة من هنا1 point
-
Here use this one, I created it a month ago. (it does also have a rotation effect, which makes it more alive) P.s 20 lines =D function dxDrawCircle3D(x, y, z, radius, width, color) if type(x) ~= "number" or type(y) ~= "number" or type(z) ~= "number" then return false end local radius = radius or 1 local width = width or 1 local color = color or tocolor(255,255,255,150) local startRotation = (getTickCount() % 5000 / 5000) * 360 for i=1, 18 do local pR1 = (((i-1)*20 + startRotation) * 3.141592653 * 2)/360 local pR2 = ((i*20 + startRotation) * 3.141592653 * 2)/360 local startX, startY = x + math.cos(pR1) * radius, y + math.sin(pR1) * radius local endX, endY = x + math.cos(pR2) * radius, y + math.sin(pR2) * radius dxDrawLine3D(startX, startY, z, endX, endY, z, color, width) end return true end1 point
-
الله يعطيك العافية لكن طريقتك غلط في حذف الازرار راح تواجه بقات في الاكواد الأفضل تحط قيمة البول فولس مثال : aTab2.ResourceDelete = guiCreateButton ( 0.40, 0.25, 0.20, 0.04, "Delete", true, aTab2.Tab, "delete" ) — بعد ماعدلنا قيمة البول الى فولس aTab2.ResourceDelete = guiCreateButton ( 0.40, 0.25, 0.20, 0.04, "Delete", false, aTab2.Tab, "delete" ) ولا تنسو المود حقي https://forum.multitheftauto.com/topic/98643-سكربت-حماية-الأدمن/1 point
-
Simple solution, hire a cardboard scripter (me) for about 80 or so dollars/day.1 point
-
local's are faster, because they are only active inside of an area. Real world example: It is something similar as buying things online in your own country(can be done within 24-hour) or order them from another(takes more than a day). Note: default MTA default functions are as fast as if you declare them as a local. Thought I would only declare functions as local if they are ONLY used for the code below or in case of onClienRender. There are two variants and the main difference while using is this: iprint(type(exampleFunction)) -- nil local function exampleFunction () iprint(type(exampleFunction)) -- function end iprint(type(exampleFunction)) -- function iprint(type(exampleFunction)) -- nil local exampleFunction = function () iprint(type(exampleFunction)) -- nil end iprint(type(exampleFunction)) -- function Fix for this one: iprint(type(exampleFunction)) -- nil local exampleFunction iprint(type(exampleFunction)) -- nil exampleFunction = function () iprint(type(exampleFunction)) -- function end iprint(type(exampleFunction)) -- function For more information: https://www.lua.org/pil/6.2.html1 point
-
The second one is using the ipairs function: https://www.lua.org/pil/7.3.html Benefit of the ipairs: ipairs returns the value as wel as the index. (no need to index on the next line as with the normal for loop) ipairs stops if there is no item at a given index: (not always a benefit thought) table = { 1, nil, -- < stops here 3 } Benefits of the normal for loop: Faster because it isn't using a function to loop. (functions are relative slow in compare to the rest of the code.) Can loop through nil values if required. table = { 1, nil, -- < keeps going! 3 } Can loop with different steps: for i=2, 10, 2 do --[[ 2 4 6 8 10 ]] end Can loop invert: for i=10, 1, -1 do --[[ 10 9 8 7 6 5 4 3 2 1 ]] end With other words there is no reason to use ipairs in my opinion.1 point
-
1 point