Leaderboard
Popular Content
Showing content with the highest reputation on 15/04/21 in all areas
-
SAMP MAP LOADER This resources adds the ability to load your favourite SA-MP maps into the MTA-SA! Screens Even works on this kinds of crazy map Resource Structure sampobj - provides the core functionality to load the samp.img, cols & texture materials. sampmap - SAMP Maploader, loads the map files either from specific format or SA-MP Texture-Studio file. Usage places the sampobj and sampmap into your mta-resrouces folder in sampmap resources, find a file nammed sampmap.lua , it already contains a example map made by samp texture-studio (special thanks to author Unu Alex for the creation of this hard work.), you can add your own map under this file. start the resources sampobj and sampmap & enjoy, you can check out /testmap command to teleport you to the sample example samp map. Exports sampobj createSAMPObject(model_id,x,y,z,rx,ry,rz) note the mode_id can be either sa stock object or an id from samp_model. setObjectMaterial(object,mat_index,model_id,lib_name,txd_name,color) Issues & todos in future Currently the material color is somehow bugged, especially the one contains the alpha materials. Drawdistance issue, due to the engine limitation the max distances viewdistance of a normal object is 300 unit, if your map contains the wide areas of custom samp objects, the far distances objects might not visible. Currently no SetObjectMaterialText Support, i'll do it in the furture, do check up my github ? High Memory Useage, due to the MTA current don't have the support of server-side defined object ids, therefore inorder to keep the original samp model id works i did a big mapping array to keep the mta-allocated ids & orignal samp ids in relation. however the down-side is the high RAM use, it might needs to takes some further optimzation in the furtue. Download & Github Due to the limitation 20MB of MTA-Commnity resources, I've upload the whole project into the github. https://github.com/gta191977649/MTA-SAMP-OBJ Happy Mapping & Hunting?4 points
-
Yup, it's working, I stopped everything else. Now I have to find out what is messing around, I guess this is where the fun begins. ? Thanks everyone!2 points
-
1 point
-
Exemplo de um config.xml: <config version="2.0"> <!-- É opcional ter parâmetros aqui. O nó principal não precisa ter o mesmo nome do arquivo.xml --> <info>Nó com parâmetro único.</info> <setting name="Nome qualquer" value="0"/> <!-- Nó com múltiplos parâmetros. --> <setting name="Outra configuração" value="true"/> </config> Como declarar este arquivo no meta.xml: <config src="config.xml" type="client"/> <!-- O tipo pode ser "client" ou "server". Não existe tipo "shared" --> Como obter os valores do config.xml no script: local configs = {} -- Uma table vazia que será usada para armazenar os valores das configurações no script, para não ser necessário ficar obtendo novamente do XML o tempo todo. addCommandHandler ("eae", function (cmd) -- Comando para ativar isso: /eae local rootNode = getResourceConfig ("config.xml") -- Obtém o nó principal do XML. local subNodes = xmlNodeGetChildren (rootNode) -- Obtém todos os nós que estão dentro do nó principal. No caso é o nó info e os nós setting. configs["version"] = xmlNodeGetAttribute(rootNode, "version") -- Obtém o valor do parâmetro version que está junto do nó principal. configs["information"] = xmlNodeGetValue (subNodes[0]) -- Obtém o valor do primeiro nó que está dentro do nó principal do XML, no caso o valor do nó info. Essa função só funciona para nós de atributo único. Se o nó tiver vários atributos, faça como abaixo. configs["conf01"] = { -- Você pode obter todos os parâmetros da configuração se achar necessário, incluindo o name dela. ["nome"] = xmlNodeGetAttribute(subNodes[1], "name") -- Obtém o parâmetro name do nó setting que vem logo abaixo do nó info. ["valor"] = xmlNodeGetAttribute(subNodes[1], "value") -- Mesma coisa só que com o parâmetro value. } configs["Outra configuração"] = xmlNodeGetAttribute(subNodes[2], "value") -- Se quiser ignorar o nome da configuração do XML, vc pode obter o value direto e declarar o nome no próprio script. outputChatBox ("Version: "..configs["version"]) -- Mostra no chat o valor de configs["version"] outputChatBox ("Info: "..configs["information"]) -- O mesmo com configs["information"] outputChatBox (configs["conf01"]["nome"]..": "..configs["conf01"]["valor"]) -- Mostra no chat o nome da primeira configuração seguido pelo seu valor. outputChatBox ("Outra configuração: "..configs["Outra configuração"]) -- Mostra no chat o valor da segunda configuração. end)1 point
-
I never tested it, but I don't think it would make any big difference. But unnecesarry to convert it, except if you want to do something with elements, etc...1 point
-
and that's because you disabled a whole group, you need to find the index. anyway, I have a code that disables most gunshots, M4/AK is still around here i think since i didn't want to disable the rustler/seasparrow sound...( but M4/AK sounds are not noticeable if it has a custom sound anyway.. unlike Deagle, etcs) what type of sounds do u want to disable? anyway here: local removedIDs = { 33, 4, 28, 21, 22, 23, 6, 7, 8, 29, 30, 17, 18, 26, 27, 52, 53, 5, 0, 1, 2, 12, 14, 15, 16, 11 } setWorldSoundEnabled ( 5, true) for i, sound in pairs(removedIDs) do setWorldSoundEnabled(5, sound, false) end Just play with it, see what IDs u wanna remove / add. It's all weapon sounds btw.1 point
-
I tested this script, it works. Can you try to test it the default MTA server?1 point
-
Em engineApplyShaderToWorldTexture você tem que inserir o 3° argumento targetElement1 point
-
setWorldSoundEnabled this is the correct function as mentioned in wiki https://wiki.multitheftauto.com/wiki/SetWorldSoundEnabled use it in client-side1 point
-
Não esqueça que você esta lidando com o lado servidor, por tanto muita atenção, prevejo problemas nesse seu código. @Perigoso Não se acostume: server-side local eventoAtivado = false -- Variável que vai informar se o evento esta ou não ativo (atualmente desativado). local saveAdmin -- Variável que vai guardar o admin que ativar o evento. function eventoStart (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount (thePlayer)), aclGetGroup ("Admin")) then -- Se o player que usar o comando for admin, então: if (eventoAtivado == false) then -- Se o evento não estiver ativado, então: blipEvento = createBlipAttachedTo (thePlayer, 0, 2, 0, 0, 255) -- Seta o blip no admin visível para todos (pois estamos no server então não precisa declarar visibleTo) saveAdmin = thePlayer -- Salva o playerSource na variável saveAdmin para poder cancelar o evento. eventoAtivado = true -- Seta a variável como true (evento ativado). setElementData (saveAdmin, "adminEventoStarted", true) -- Seta a data informando se o admin esta com evento ativo. clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#00FF00"..string.gsub(getPlayerName (thePlayer), "#%x%x%x%x%x%x", "").."#FFFFFF' começou o evento mate o admin.", root, 0, 255, 0, true) outputChatBox ("[INFO] #FFFFFFPara ver a localização do admin aperte a tecla #00FF00'F11' #FFFFFFo ponto azul representa a localização exata do admin.", root, 0, 255, 0, true) outputChatBox ("[OBS] #FFFFFFLembrando que o admin tem a opção de revidar a agressão.", root, 255, 50, 50, true) else -- senão: outputChatBox ("[INFO] #FFFFFFO evento já esta ativo para cancelar use #FF3232/estop", thePlayer, 255, 50, 50, true) end end end addCommandHandler ("estart", eventoStart) function eventoStop (thePlayer, cmd) if isObjectInACLGroup ("user."..getAccountName(getPlayerAccount (thePlayer)), aclGetGroup ("Admin")) then -- Se o player que usar o comando for admin, então: if (eventoAtivado == true) then -- Se o evento já estiver ativado, então: removeElementData (saveAdmin, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se existir o elemento blipEvento, então: destroyElement (blipEvento) -- Retira o blip do admin. end saveAdmin = nil -- Seta a variável como nil ficando inexistente. eventoAtivado = false -- Seta a variável como false (evento desativado). clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#FF3232"..string.gsub(getPlayerName (thePlayer), "#%x%x%x%x%x%x", "").."#FFFFFF' cancelou o evento.", root, 255, 50, 50, true) else outputChatBox ("[INFO] #FFFFFFO evento já esta desativado para ativar use #FF3232/estart", thePlayer, 255, 50, 50, true) end end end addCommandHandler ("estop", eventoStop) addEventHandler ("onPlayerWasted", root, function (ammo, attacker, damageType) if (attacker and attacker ~= source) and getElementData (source, "adminEventoStarted") then local killer = getKiller (attacker) -- Variável que chama a função que verifica se elemento é um veículo/player. if killer then -- Se o jogador matou o admin, então: clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[EVENTO] #FFFFFFO(A) jogador '#FF3232"..string.gsub(getPlayerName (killer), "#%x%x%x%x%x%x", "").."#FFFFFF' matou o admin '#FF3232"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' e ganhou o evento.", root, 255, 50, 50, true) clearChatBox (killer) -- Limpa o chat somente pra quem matou o admin. outputChatBox ("[EVENTO] #FFFFFFVocê matou o admin '#00FF00"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' e ganhou o evento.", killer, 0, 255, 0, true) removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se o elemento blipEvento existir, então: destroyElement (blipEvento) -- Retira o blip do jogador. end eventoAtivado = false -- Seta a variável como false (evento desativado). end end end) addEventHandler ("onPlayerQuit", root, function () if getElementData (source, "adminEventoStarted") then -- Se o admin estiver com o evento ativo, então: clearChatBox () -- Limpa o chat pra ser bem visível para todos. outputChatBox ("[INFO] #FFFFFFO(A) admin '#FF3232"..string.gsub(getPlayerName (source), "#%x%x%x%x%x%x", "").."#FFFFFF' saiu do servidor e o evento foi cancelado.", root, 255, 50, 50, true) removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. if isElement (blipEvento) then -- Se o elemento blipEvento existir, então: destroyElement (blipEvento) -- Retira o blip do jogador. end eventoAtivado = false -- Seta a variável como false (evento desativado). end end) addEventHandler ("onResouceStop", root, function () if getElementData (source, "adminEventoStarted") then -- Se o admin estiver com o evento ativo, então: removeElementData (source, "adminEventoStarted") -- Remove a data informando se o admin esta com evento ativo. end end) function getKiller (v) local player if getElementType (v) == "vehicle" then -- Se o elemento for um veículo, então: player = getVehicleController (v) -- Verifica o motorista do veículo. elseif getElementType(v) == "player" then -- Se o elemento for um jogador, então: player = v end return getElementType(player) == "player" and player or false -- Validar se é um jogador e retorna-lo. end1 point
-
1 point
-
1 point
-
Most gun sounds exist out of multiple small sounds. Maybe that is the issue?1 point
-
For those that missed it, hedit is now part of the official MTA resources package and therefore all bug reports, pull requests and suggestions can go to the official resources github tracker and yes, it would be nice to have some scripters contribute to improve and modernize it.. PR's are welcome. Btw, soon we will forcibly update the main post of this topic (including fixing all screenshots). Despite it now being part of the official resources, we will definately keep this topic as it's legendary for having 110,000 views and many posts & input. TL;DR - get the latest version of the handling editor from the hedit page on official resources repo, or your server\mods\deathmatch\resources\[gameplay]\hedit folder (if your package or MTA installation is up to date, otherwise update it first from https://mirror.multitheftauto.com/mtasa/resources/mtasa-resources-latest.zip)1 point
-
Looking forwards to play some MTA on the bus!1 point
-
السلام عليكم كيف الحال جميعاً , جميعنا أو الأغلب سمع بـ لغة برمجية تدعى "VB.NET" ولكن لا يعرف كيف تُستعمل أكوادها وهكذا.. أولاً: تعريف اللغة Visual Basic أو بما يعرف بـ: VB.NET هي لغة برمجة من شركة مايكروسوفت تستند إلى لغة بيسك الشهيرة وهي تنصف ضمن لغات البرمجة بالكائنات ، منذ أن بدأت شركة مايكروسوفت في إصدار الفيجيوال بيسك وهي تلاقي نجاحا باهراً وشعبية لا بأس بها بين المبرجين نظرا لـ سهولة الإستعمال في مقابل التعقيد الشديد الذي يواجهه أي مبرمج يسعى لبرمجة ويندوز بإستخدام لغة C# C++ ثانياً: مميزاتها • لغة سهلة وسريعة لإنشاء تطبيقات ويندوز • تدعم البرمجة الشيئية إلا أن ذلك ليس بشكل كامل • سهلة التعلم والفهم • سهولة إكتشاف الأخطاء فيها • عند كتابة أوامر صحيحة يقوم بإعطائك أمثلة ليؤكد لك على صحة كتابة الكود • تمكنك من تخطي بعض الأخطاء عند كتابة كود محدد ثالثاً: عيوبها ؟ لا شك أن كل اللغات البرمجية لها مميزات وعيوب: البرامج غير مجانية، أي أنك تحتاج غالبا للدفع لأجل الحصول على ملفات مفتوحة المصدر • • لا تترجم بشكل كامل إلى لغة الآلة • لا تدعم كافة أشكال البرمجة الشيئية • المترجم به بعض الشوائب والتي تظهر في البرنامج المكتوب حتى في حالة خلو البرنامج المصدر من الأخطاء • عيوب البرنامج من إمكانية تحميل برنامج حيث يحتوي على مربعات وأزرار بدائية ولكي تحصل على الشكل المطلوب لا بد من إضافة مظهر خارجي وأدوات أخرى --------------- المصدر: https://ar.wikipedia.org/wiki/فيجوال_بيسك1 point
