Leaderboard
Popular Content
Showing content with the highest reputation on 01/06/18 in all areas
-
السلام عليكم ورحمة الله وبركاته أقدم لكم اليوم أخر مشاريعي وأفضلها بالنسبة لي وأصعبها, حيث استغرق مني هذا العمل الضخم 20 يوم و 1600 سطر وهو عبارة عن لوحة أدمنية خارجية تمكنك من التحكم بالسيرفر بدون تشغيل اللعبة والدخول للسيرفر, وبالنسبة لي سيكون مفيد جداً وأسرع C# - LUA : لغات البرمجة : مقطع توضيحي للبرنامج : ملاحظات أولاً : لا تغير اسم السكربت ولا ما راح يشتغل البرنامج ثانياً : السكربت يحتاج صلاحيات ادمن ثالثاً : للتعديل على القروبات أو الصلاحيات راجع ملف الميتا التحميل : اضغط هنا للتبليغ عن الأخطاء أو الاقتراحات أو المشاكل تفضل بالأسفل أو الرسائل الخاصة مع تحياتي لكم5 points
-
اشتري البرنامج ذا من ستيم Wallpaper Engine شريته قبل سنه ونص تقريبا اتوقع ب5 دولار فيه مكتبه عملاقه من الخلفيات سواء انمي او اي شي خلفيات متحركه وبالنسبه لصاحب الموضوع اهنيك بطل وربي مجهود جبار ومثل ما قال Bangladsh ذي البدايه وكفوو4 points
-
Hello, today I'm honored to present you my latest, biggest and coolest project a program called mini admin which allows you to control your MTA directly just log in to your console account this project took from me 20 days, 1600 line of codes (LUA & C#). and have fun with the features, A tutorial video : Tips: 1. don't change the resource name. 2. give the resource admin permissions ( resource.miniadmin ). 3. If you want to edit the groups etc.. ( meta.xml ). 4. If you have a bug or an idea feel free to PM me. Download: http://www.mediafire.com/file/9x2k4dbzllejs0e/C%23.zip Have a nice day.2 points
-
2 points
-
2 points
-
if ( getPlayerName( source ):find ( "H.D" ) ) then outputChatBox( " الشعار موجود ", source, 0, 0, 0, true ) else outputChatBox( " حط الشعار ", source, 0, 0, 0, true ) end2 points
-
Hello there. I am John Smith, also known as ZoeN. Today, I am here to offer my scripting services. Will they cost money? Yes. How much? I'll talk about it soon in this topic. Some info about me: I am an 18 year old guy from Croatia who has a particular interest in scripting on Multi Theft Auto. I've firstly started off back in 2014, going from simple Hello World scripts, to what I am today. A fully experienced MTA scripter with lots of experience and knowledge on how to do scripts, ranging from smaller projects to even bigger projects such as whole gamemodes and multigamemodes. What can I do? Basically anything. I've already done lots of resources. Examples would be: Custom Race Gamemode Custom Freeroam Gamemode Custom Downloader (both for Freeroam and DM-like gamemodes) Map Loader Script Loader Multigamemode Login Panel Punishment System Userpanel and many more which I haven't mentioned while I favour working on developing new gamemodes, let's be realistic that most customers won't come to me for that; the center of my service are custom requests, which means you can ask me to script (or fix) anything you'd like, after which I will consider it and tell you if it's possible, and if so, suggest a price that can be further negotiated. I will start development, and you can test it out on my testserver before paying, so you can confirm it's in good working state and nothing from your requested features is missing. After the resource/code is sent, there'll be extended support for bugs that may appear after delivery, as I am pretty confident of my code's quality. How much do I charge? It really depends on lot of factors, such as complexity, time needed to do the job, and what you're asking me to do. For instance, smaller scripts would be in range of something like 5-10€, while bigger scripts would be in range of 10-30€, depending on their complexity. Finally, complete gamemodes (written from scratch) would be charged somewhat in this terms: Small Gamemodes -- 50€ Big Gamemodes -- 100€+ (for big gamemodes, that is a minimum price, however it may change to a higher one depending on what you're requesting, also based on complexity and time needed to complete the gamemode) Why are complete gamemodes so expensive? Well, because especially gamemodes takes some time, if not even a long time. Then, there's also the fact that the scripts which I'm creating are profesionally written and optimized, they're not amateur. Think of it as getting a tattoo on your body. You'd want the tattoo to be good and to still be fine even after years have passed right? You certainly don't want your tattoo to be made by an amateur and to have your tattoo fade away under 6 months. Any examples of my work? To be honest here, I haven't really made any public resources as I've always preferred to create private scripts (usually for my server(s)). I just have 1 public resource out there; https://community.multitheftauto.com/index.php?p=resources&s=details&id=14725 To give you a sense of my code, let me quickly share the core of that resource (open spoiler); However, I did make a video about one project of mine, 3 years ago. You may also notice that there's a Level System and HUD, both developed by me, also 3 years ago. I was pretty good at scripting even back then, but at the current moment, I'm a beast How can you contact me? Discord: ZoeN#4774 Private Message on this Forum Thank you for reading. If you have any questions regarding me and/or my services, contact me, and I'll reply to you as soon as I can. - John Smith (aka ZoeN)1 point
-
Hello, I am in a transition from SA:MP to MTA after I was blown out by MTA's advanced features. I am now trying to create a gamemode from scratch in order to learn lua, and I'm currently working on a deathmatch system. I have found a problem (for me), though: sometimes when I'm shooting a running target (and I hit them), the target doesn't always lose hp. Instead, I need to shoot behind that target (in a point where the target was positioned previously). I understand that this a sync issue, but is there a method to bypass this? Can I somehow trust the damager about the bullet sync, instead of the damaged player? Here's a video to prove this: In the video you can see how the targeted player makes the "damaged" animation, but he doesn't lose hp. P.S: I have increased the FPS cap from the default (36 i think) to 601 point
-
This code will help with the connection between IP.Board forum platform and your MTA server. In fact, when a player registers on the MTA server, this script will automatically create a forum account with the same username and password. All you need is PHP SDK (for more info, there is a tutorial in this section about PHP SDK), a IP Board forum and a MTA server. First step: download PHP SDK from the wiki or from the tutorial provided in this section Second step: create a new folder at this path ipb-forum-root/admin/sources/base/ called sdk and extract everything from php sdk archive to it Third step: create a new PHP file called mtaforum.php in ipb-forum-root/admin/sources/base/ and add this piece of code to the file: <?php //By QuantumZ require( "../../../initdata.php"); //we need to include this because ipsRegistry requires it include( "sdk/mta_sdk.php" ); //the sdk is a must require( "ipsRegistry.php" ); //this will give us the functions to modify things in the forum platform ipsRegistry::init(); $input = mta::getInput(); // $input[0] is username, $input[1] is password, $input[2] is e-mail mta::doReturn($input[0]); //$passSalt = IPSMember::generatePasswordSalt(5); //$passCompiled = IPSMember::generateCompiledPasshash($passSalt, md5($input[1])); $user = IPSMember::create( array( 'core' => array( 'email' => $input[2], 'password' => $input[1], 'name' => $input[0], 'members_display_name' => $input[0] ) ) ); ?> Fourth step: Now we finshed with the web-based things let's go to our MTA server and add this in our Register function: callRemote("http://FORUM ADRESS/admin/sources/base/mtaforum.php", inReturn,username, password, mail) Fifth step: Add this in the same .lua as the callRemote to ouput in console whenever somebody will create a forum account: function inReturn(name) outputDebugString("[FORUM] " ..tostring(name).. " registered.") end Sixth step: Profit.1 point
-
السلام عليكم ورحمة الله تعالى وبركاته, كيف الحال؟ إن شاء الله بخير اليوم معنا الفيديو الخاص بالسيرفر فخامة :- الاهدائات@Ahmed_Negm@Master_MTA@iiKhaled@!#NssoR_)@#ibrahim@*[email protected]@[email protected]@#StrOnG_,)@Abu-Solo@#Soking@The Killer@#[K]aTakuRI-,?@Sha67@Ahmed Ly@TAPL @MrKAREEM فأمان الله1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
خش علي mods deathmatch registry.db == > احفظه عندك وفرمت سيرفرك بعد ما تيجي تركب موداتك رجع الملف الي انت حملته عندك بس وكذا وجرب ..1 point
-
1 point
-
Você poderia ter lido a Wiki do GetDistanceBetweenPoints3D. Mas vou mostrá-lo no seu código. gate1 = createObject (2121, 2138.8000488281, 1454, 13.5) local gates1 = false function moveGate1 (thePlayer) local x, y, z = getElementPosition (thePlayer) if gates1 then moveObject (gate1, 1000, 2138.8000488281, 1454, 13.5) -- Fecha o portão. gates1 = false elseif getDistanceBetweenPoints3D (x, y, z, 2138.8000488281, 1454, 13.5) < 20 then -- Se a distância entre o player que usou o comando e o portão for menor que 20 metros, então: moveObject (gate1, 1000, 2138.8000488281, 1454, 4) -- Abre o portão. gates1 = true else outputChatBox ("Você precisa se aproximar mais do portão para abrí-lo.", thePlayer, 255, 0, 0) end end addCommandHandler ("123", moveGate1)1 point
-
1 point
-
Thank you, how did you got this link? Internet browser's dev tools (Ctrl+Shift+I) (Network logging, filtered by XHR, and just look through those listed there and check each's response data, one of 'em will have the song name (in this case, it's streamdata.php) (How it looks on macOS Safari, most browsers like Chrome should look very similar) Edit: After looking into this a little bit more, you can easily modify the URL I gave to collect the song name of any stream. http://player.181fm.com/streamdata.php?h=<host>&p=<port>&i=<file>1 point
-
الواحد ندم انو في يوم قرر يعمل سيرفر دلوقتي انا بايع لناس رتب في السيرفر ومرغوم اني افتحه ومعيش فلوس ارجعلهم فلوسهم اصلآ1 point
-
1 point
-
1 point
-
مالعب الا حرب عصابات وقليل هجولة ل معك باك ابات حرب ذذ ويعطيك العافية يستفيدوأ منة الناس بتتوفيق1 point
-
1 point
-
por algum motivo eu já havia dito isto porém não foi enviado em fim !! bom amigo vamos lá primeiramente da próxima vez utilize --> code para colar seu codigo isto ajuda ficar mais organizado e ajuda para leitura em segundo lugar você não me parece ser experiente parece mais que você pegou isto de um outro código e fez como achou melhor. bom deixe-me lhe explicar não é porque você tornou uma marker invisível ou visível para um determinado player que ele deixar de existir n ela esta ali porém invisível ! como resolver bom cria uma tabela para o player que esta realizando o trabalho e crie as markers dentro desta tabela do seu player assim ele terá sua própria marker e você apenas destro ira ela quando ele passar por cima ! Ex: suponhamos que seu player pegue o trabalho passando em um markador que é o mais comum ! Table = {} Marker_startJob = createMarker....... function StartJob(elementhit, dim) if dim then --> isto verifica se esta na mesma dimensão que a marker if not Table[elementhit] then --> este verifica se o player não tem uma tabela em seu nome Table[elementhit] = {} --> caso não haja tabela este cria uma para seu player end Table[elementhit]["Marker1"] = createMarker..... --> esta seria primeira marker ---> eu aconselho você criar a segunda marker dps de passar pela primeira mais vou seguir a maneira que você fez ! Table[elementhit]["Marker2"] = createMarker..... --> esta seria segunda Table[elementhit]["Marker3"] = createMarker..... --> esta a terceira e assim por diante como já falei é mais ordenado você fazer uma apos a outra ser destroida ! end addEventHandler("onMarkerHit", Marker_startJob, StartJob) --> esta maneira acompanha a maneira do seu codigo que não seria digamos que correto ! não vou me prolongar muito escrevendo uma maneira correta pois estou ocupado no momento mais espero que você entenda e tente melhorar seu codigo .. function HitInMarker(elementhit, dim) if dim and elementhit and isElement(elementhit) and getElementType(elementhit) == "player" and Table[elementhit] then if source == Table[elementhit]["Marker1"] or source == Table[elementhit]["Marker2"] or source == Table[elementhit]["Marker3"] then --> continue seu codigo por aqui .. --> no final você deverá destroir os markadores destroyElement(Table[elementhit]["Marker1"]) destroyElement(Table[elementhit]["Marker2"]) destroyElement(Table[elementhit]["Marker3"]) Table[elementhit] = nil --> por fim excluimos a tabela do player! end end end addEventHandler("onMarkerHit", resourceRoot, StartJob)1 point
-
O ideal é você usar esse código no lado cliente, então cada jogador terá a marker visível apenas para si. Já sobre as marcas anteriores, acho que o certo seria destruí-las quando tiver na próxima. Você pode criar uma tabelas da localizações e definir uma variável do índice da tabela e usar essa variável pra definir a próxima localização na tabela.1 point
-
Provavelmente deve ser algum bug ele não funcionar com decimais... Fiz um teste rápido aqui e se você deixar o conteúdo como string no guiGridListSetItemText (não definir o último argumento como true) a ordenação funciona! Lua assim como outras linguagens convertem strings numéricas em números para fazer a comparação: -- https://www.lua.org/cgi-bin/demo if ("2.333" < "2.5555") then print("ok") else print("fail") end1 point
-
وربي كفؤؤؤؤؤؤؤ ابحث عن مثل هذا الشي من زمان وما توقعت ان ينفع تسويه بس كيف سويتها انت مادري اهنيك بصراحة وكمل ابداعاتك1 point
-
1 point
-
بالنسبة للسجادة فال Texure من النت PNG المهم السجادة اصلا مجسم من اللعبة الاخ موست حطه بالماب وانا عدلت التكسد بحيث يكون سجادة يعني ما سويت مجسم ثري دي ولا شئ بس شكرا علي تعليقك وبالنسبة للمواتر بعرضها بعد شوي اصورهم بس1 point
-
1 point
-
Você pode usar setElementData para setar dados no jogador quando ele passar pelos markers. Dai crie uma condição com getElementData, se o jogador já possuir tal data, significa que ele já passou por aquele marker e dai não deve ativar novamente.1 point
-
أذا كذا مايحتاج قاعدة بيانات فقط كلنت و xml لكن لو هو يبي يسجل عشان يظهر له يستعمل كود @#Bangladsh اللي عدلته انا .1 point
-
Though I have never played any RP servers but I have seen some of them. Good Luck mate, this thing has got potential.1 point
-
1 point
-
1 point
-
ههههههههه شكلك معصب من امبارح بس والله حرام في اول المبارات كسروه لا حول ولا قوة الا بالله ماكمل نص ساعة بس والله حرام في اول المبارات كسروه لا حول ولا قوة الا بالله ماكمل نص ساعة رفع الثوب وسوا الجمباز ده1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
هلا والله بالشباب كل سنه وانتم طيبين الله يسعد ايامكم ويتقبل منكم صيامكم واعمالكم يا رب يطول باعماركم ويهديكم اخوكم محبكم Master_MTA1 point
-
Как я и обещал – публикую статью о некоторых возможностях шейдера и MTA. Речь пойдёт об изменении цвета нужных нам компонентов автомобиля (а точнее текстуры, которые наложены на полигоны этих компонентов) с помощью пиксельного и вершинного шейдеров. В качестве примера, я буду использовать стандартный автомобиль Sultan, а перекрашивать я ему буду диски на колёсах. На самом деле данный метод будет работать на любых объектах игры, будь-то это объекты ландшафта или же персонажи. Но так как сегодня мы будем работать с ZModeler 2, то их рассматривать мы не будем (так как ZM2 не умеет работать с костями персонажей и плохо экспортирует обычные объекты). Сразу оговорюсь – имеется ввиду, что вы уже владеете основами работы с ZModeler 2, поэтому детально рассматривать эту программу мы не будем. К счастью русскоязычных уроков по ZM2 очень много. Подготовка И так, мы имеем проект с уже готовым автомобилем, который без проблем работает в нашей любимой игре. Теперь можно приступать к делу. Для того чтобы MTA смогла найти с каким материалом ей работать — мы должны передать ей имя с помощью engineApplyShaderToWorldTexture. При экспорте модели из ZModeler 2 все материалы принимают название первой текстуры в самом материале. Т.е. если ваша текстура называется WHEELS.tga – то материал будет называться WHEELS. Это очень важно, так как если вы просто покрасите колёса и не установите текстуру (хотя бы в 1px), то материал в игре будет называться unnamed, как и все у которых нет текстур. Реализация Так уж случилось, что диски моего автомобиля имеют текстуру vehiclegeneric256, которая не является уникальной (ею окрашены ещё другие части автомобиля) – это не редкое явление. Чтобы решить эту проблему, придётся создать копию этой текстуры и назвать так как нам нужно. Далее мы создаём новый материал, называем его как нам удобно (я предпочитаю чтобы имена материалов и имена текстур совпадали), добавляем новую текстуру, выделяем нужные нам полигоны и применяем к ним наш материал. Экспортируем нашу модель.. и а этом наша работа с ZModeler2 закончена. Пишем шейдер Сам по себе шейдер будет очень простой, мы создадим одну переменную которой мы сможем задавать значения цвета из скрипта, все остальные данные нам предоставит MTA. Для загрузки шейдера я использовал следующий скрипт (он очень простой, поэтому отдельно его рассматривать мы не будем): addEventHandler( "onClientResourceStart", resourceRoot, function() local shader = dxCreateShader( "color.fx" ); if shader then dxSetShaderValue( shader, "color", { 1.0, 0.5, 0.0 } ); engineApplyShaderToWorldTexture( shader, "wheels256" ); end end ); Теперь займёмся написанием самого шейдера. Объявляем переменные: float4 color = 1; sampler Sampler0 : register( s0 ); В качестве цвета мы используем переменную color - её значение мы будем устанавливать с помощью engineApplyShaderToWorldTexture Теперь нам необходимо взять текущий цвет пикселя и «смешать» его с нашим цветом (color): struct PSInput { float2 TexCoord : TEXCOORD0; }; float4 PixelShaderFunction( PSInput PS ) : COLOR0 { float4 texColor = tex2D( Sampler0, PS.TexCoord ); texColor *= color; return texColor; } Всё что и делает этот шейдер – просто перекрашивает пиксели текстуры. Как видно мы не учитываем освещение из-за чего наши колёса будут светиться в темноте как огни. И тут на помощь к нам приходит mta-helper.fx написанный нашими любимыми The MTA Team =) Так же они для нас написали замечательную функцию которая просчитывает дифьюзный цвет автомобиля с учётом глобального затенения мира – MTACalcGTAVehicleDiffuse. Функция первым аргументом требует нормали вершин. Так как пиксельный шейдер работает непосредственно с изображением, информацию о нормалях мы не имеем. Для этого нам придётся написать вершинный шейдер. Исправленный код шейдера: #include "mta-helper.fx" float4 color = 1; sampler Sampler0 : register( s0 ); struct VSInput { float4 Position : POSITION0; float3 Normal : NORMAL0; float4 Diffuse : COLOR0; float2 TexCoord : TEXCOORD0; }; struct PSInput { float4 Position : POSITION0; float2 TexCoord : TEXCOORD0; float4 Diffuse : COLOR0; }; PSInput VertexShaderFunction( VSInput VS ) { PSInput PS = (PSInput)0; float4 worldPosition = mul( VS.Position, gWorld ); float4 viewPosition = mul( worldPosition, gView ); float4 position = mul( viewPosition, gProjection ); PS.Position = position; PS.TexCoord = VS.TexCoord; PS.Diffuse = MTACalcGTAVehicleDiffuse( VS.Normal, VS.Diffuse ); return PS; } float4 PixelShaderFunction( PSInput PS ) : COLOR0 { float4 texColor = tex2D( Sampler0, PS.TexCoord ); texColor *= PS.Diffuse * color; return texColor; } technique { pass P0 { VertexShader = compile vs_2_0 VertexShaderFunction(); PixelShader = compile ps_2_0 PixelShaderFunction(); } } В вершинном шейдере мы создаем новый объект типа PSInput, который будет подаваться на вход в нашу функцию PixelShaderFunction. Так как объект изначально не имеет никаких данных, наша задача передать их, как мы и сделали это с TexCoord, Diffuse и Position. Так как основной задачей вершинного шейдера является установка вершин, то он должен определить семантику POSITION для выходного параметра. В нашем случае это Position. Чтобы получить правильную позицию вершины для пиксельного шейдера, мы умножаем её на мировую матрицу объекта (gWorld), затем на матрицу вида камеры (gView), а затем и на матрицу проекции камеры (gProjection). Далее всё просто, с помощью функции написанной разработчиками MTA мы просчитываем новый цвет и передаём в Diffuse. В пиксельном шейдере мы просто умножаем полученный Diffuse на наш color, вот собственно вот и всё. Пишем скрипт для шейдера Скрипт который я использовал выше не подходит для работы на реальном сервере, так как не поддерживает работу с несколькими объектами, ибо шейдер глобальный, а значит цвет колёс у всех машин будет один. Для этого нам нужно для каждого автомобиля создавать новый объект шейдера, который будет иметь своё значение цвета. Хранить информацию о цвете колёс мы будем в ElementData в виде таблицы – это позволит устанавливать цвет с серверной стороны (для этого мы будем отслеживать событие onClientElementDataChange). Так же мы будем отслеживать события onClientElementStreamIn, onClientElementStreamOut и onClientElementDestroy. Событие onClientElementStreamIn необходимо нам для того чтобы создать шейдер когда автомобиль попадёт в стример клиента, остальные два – для удаления шейдера. Скрипт шейдера: local vehicles = {}; function CreateVehicleShader( vehicle ) local color = getElementData( vehicle, "WheelsColor" ); if color then local shader = dxCreateShader( "color.fx" ); if shader then vehicles[ vehicle ] = shader; dxSetShaderValue( shader, "color", color ); engineApplyShaderToWorldTexture( shader, "wheels256", vehicle ); return true; end end return false; end function CheckVehicleShader( element ) local vehicle = element or source; if vehicle and getElementType( vehicle ) == "vehicle" then if vehicles[ vehicle ] then return true; end return CreateVehicleShader( vehicle ); end return false; end function DestroyVehicleShader( element ) local vehicle = element or source; if vehicles[ vehicle ] then destroyElement( vehicles[ vehicle ] ); vehicles[ vehicle ] = NULL; end end addEventHandler( "onClientElementStreamIn", root, CheckVehicleShader ); addEventHandler( "onClientElementStreamOut", root, DestroyVehicleShader ); addEventHandler( "onClientElementDestroy", root, DestroyVehicleShader ); addEventHandler( "onClientElementDataChange", root, function( key, oldValue ) if key == "WheelsColor" and getElementType( source ) == "vehicle" and CheckVehicleShader( source ) then dxSetShaderValue( vehicle[ source ], "color", getElementData( source, "WheelsColor" ) ); end end ); addEventHandler( "onClientResourceStart", resourceRoot, function() for i, vehicle in ipairs( getElementsByType( "vehicle", root, true ) ) do CheckVehicleShader( vehicle ); end end ); Как можно было заметить, функция CreateVehicleShader создаёт шейдер для нашего автомобиля. В случае успеха возвращает true. Вызов функции происходит только из CheckVehicleShader - она проверяет наличие шейдера для автомобиля, если его нет - создаёт его. В случае успеха так же возвращает true. Так как при старте ресурса в стримере уже могут быть автомобили и они могут иметь информацию о цвете (WheelsColor), мы используем событие onClientResourceStart для проверки всех автомобилей, что находятся в стримере. onClientElementDataChange мы отслеживаем на случай изменения информации о цвете со стороны сервера. Так как изначально её может не быть, то шейдер не будет создан при старте ресурса или когда автомобиль попадёт в стример игрока - для этого у нас есть функция CheckVehicleShader.1 point
-
0 points
-
requestBrowserDomains https://wiki.multitheftauto.com/wiki/RequestBrowserDomains0 points