Leaderboard
Popular Content
Showing content with the highest reputation on 02/03/21 in all areas
-
Selam millet! Herkese iyi forumlar, kendimi kısaca tanıtayım. ismim Enes piyasada enesbayrktar kullanıcı adı ile tanınıyorum. Github profilim, Youtube kanalım ve Discord üzerinden benimle iletişim kurabilir, neler yaptım diye bir göz gezdirebilirsiniz. Normalde boş vakitlerimde Youtube kanalıma videolar oluşturmaktayım ancak şu sıralar özellikle yoğun olduğum için daha çok Discord üzerinden destek veriyorum, Foruma yeni başladım. Bu konunun altında da scripting sorularınızı elimden geldiğince yanıtlayabilirim. Böylelikle scripting'e yeni başlayan insanlara da destek vermiş oluruz. Bu konu altında cevaplar biriktikce birikir ve burası minik bir kütüphane halini alır. Bunun dışında ücretli olarak da sistem kodlamaktayım, aslen mesleğim Junior-backend Developer olarak geçiyor, Javascript (vue, express, nest, electron), PHP (laravel) ve C# (dotnet3, dotnet5) asıl uzmanlık alanlarım. MTA: San Andreas benim için daha çok hobi gibi sevdiğim bir ortam. Eğer benimle ücretli çalışmak isterseniz de Forum üzerinden özel mesaj yolu ile iletişime geçebilirsiniz. İyi Forumlar!1 point
-
This is not being maintained, but you still should try it Hey, people. In this topic I'm going to present you to a tool I've been working for a little while now. It's called MTA Build Tool. If you develop for the web you know there are tons of frameworks that automate and make the development experience satisfying. As you probably know, there's no such a thing to MTA resource development. This tool it's aimed to provide you a whole new experience of resource development. Current features At this point it features a built in development server, meaning it automatically downloads a MTA server for you to work on. The "repository" it's maintained by me and it's currently using MTA server version 1.5.8. Keeping on the development perspective, the tool comes with the ability to auto refresh your resources when some file in the resources directory changes. Another great thing is that it automatically generates a Meta.xml for all your resources. You won't need to bother with Meta.xml anymore (kind of). So, when developing new resources all you have to do is to create a directory and start writing .lua files into it. By the way, you need to follow the sugested resources directory structure where the naming of your directories does matter. Directories names surrounded by brackets will not be recognized as a resource directory. Now on the release side, it already comes with the ability to compile all your scripts. To compile, it uses the MTA Lua Compiler with obfuscation on level 3. It's, also, possible to compact all your resources to a .zip file. Future features I'm planning to give support to Typescript to Lua which is a hot project that make it possible to write lua scripts with Typescript. I think it would be cool to design a development environment that enforces great quality script development, but I'm not sure. Maybe it's beyond scope. Contributions Currently it's a private repository, but soon I'll open this project for contribution. I've never done open source before, so I'm not really sure how it goes. You can right now try this alpha alpha version by cloning this repository https://github.com/alvesvin/mtabt-template. This tool depends on NodeJS. If you've never worked with Node before you must install it in order to be possible to execute commands like npm run dev and npm run build.1 point
-
We all know high FPS limits cause various GTA bugs. But the most common annoyance, is that at FPS limits higher than 70, it becomes hard to move around while aiming a weapon (e.g start walking sidewards) which happens between 71-74 FPS, after which at extremely high FPS limits (80-100 FPS) it's no longer possible to strafe. For all server owners that have a reason to set high FPS limit but don't want to get this annoying bug, i wrote this scripted solution: local previousTask = false local defaultFpsLimit -- Store FPS limit on resource start to ensure its reliability (as server FPS limit) function getLimit() defaultFpsLimit = getFPSLimit() end addEventHandler("onClientResourceStart", resourceRoot, getLimit) local isAdded = false -- Just optimization for the render event to limit unnecesary execution function optimizeRender(prevSlot, curSlot) if not isAdded and (curSlot >= 2 and curSlot <= 6) then addEventHandler("onClientRender", getRootElement(), fixStrafing) isAdded = true elseif isAdded and (curSlot <= 1 or curSlot >= 7) then removeEventHandler("onClientRender", getRootElement(), fixStrafing) isAdded = false end end addEventHandler("onClientPlayerWeaponSwitch", localPlayer, optimizeRender) function fixStrafing() local weapon = getPedWeaponSlot(localPlayer) -- Don't execute if player isn't holding a (suitable) weapon -- This selects only weapons that are guns and suffer from strafing bug (slot 2, 3, 4, 5 and 6) -- Allowing other weapon types will bug the script as throwing/punch weapons don't support 'release' state of TASK_SIMPLE_USE_GUN if not (weapon >= 2 and weapon <= 6) then return end local newTask = getPedTask(localPlayer, "secondary", 0) if (previousTask ~= "TASK_SIMPLE_USE_GUN" or false) and (previousTask ~= newTask) then setFPSLimit(70) elseif (previousTask == "TASK_SIMPLE_USE_GUN") and (previousTask ~= newTask) then setFPSLimit(defaultFpsLimit) end previousTask = newTask end So basically it temporarily sets the player's local FPS limit to 70 (which fully supports walking sideways) only when you are aiming a weapon and restores it when they stop aiming down the sights. Now it works perfectly and seamlessly (player doesn't feel it) and it's also optimized. Again, if you have a reason to use high FPS limits.. this script only lifts the boundary (takes away the first serious GTA bug in line - moving while aiming) but when you reach the next boundary, you'll get a range of other FPS and physics related GTA bugs. But yeah, depending on your server, using this script may allow you to use even higher FPS limits than 70 / 74 by delaying the problems. Download link (community): TBA1 point
-
I'm currently designing an entire turf system for you in OOP, I will give it to you once its finished, free of charge. Just give me some time, thank you.1 point
-
I've looked for the correct subforum, if I made mistake, move it to the correct one then. The question is, is it possible to script in other language, such as NodeJS. I only found slipe/c# , is there any other1 point
-
1 point
-
Yes, you can change it to root. It won't trigger for everyone as long as you specify to which players to be triggered.1 point
-
Já tentou fazer server-side e especificar o jogador no primeiro parâmetro?1 point
-
1 point
-
I have added a useful function to the wiki, for positioning dx-effects: https://wiki.multitheftauto.com/wiki/GetScreenStartPositionFromBox Enjoy! ?1 point
-
Exemplo maroto de como seria construída a tabela: local tableMarota = {} -- Tabela vazia que será preenchida pelos jogadores e suas respectivas datas. Você pode fazer uma tabela separada por cada tipo ou então utilizar sub-tabelas dentro de uma tabela geral como esta. addCommandHandler ("preso", function (thePlayer, cmd) if (tableMarota[thePlayer]) then -- Se já existe este item na tabela, então: tableMarota[thePlayer] = nil -- Apaga este item da tabela. outputChatBox ("Você não está mais sendo considerado preso.", thePlayer) else -- Se não existe o item tableMarota[thePlayer] na tabela, então: tableMarota[thePlayer] = true -- Adiciona o item na tabela com valor true (poderia ser qualquer um exceto false e nil) outputChatBox ("Você agora está sendo considerado preso.", thePlayer) end end) Obs: Isso deve ser feito dentro do resource que usa essa data.1 point
-
Daria pra fazer com tabelas usando o jogador como índice. Seria bem mais leve. A única coisa é que se reiniciar o resource, perde a data. E tem que ter certeza de remover a data se o jogador sair do servidor.1 point
-
Essas elementDatas são temporárias? Ou vc salva elas quando os jogadores deslogam?1 point
-
Nadamo se da će se neki server početi raditi 2021 jer bi bilo vrijeme. Trenutno nas igra oko 10ak na FFSu. Ukoliko ima neki scripter i da se napokon nešto pokrene pišite na PM1 point
-
Hi! It's possible, but not a simple task. You have to do it for yourself with dxDrawPrimitive in your custom radar script.1 point