Leaderboard

  1. Lord Henry

    Lord Henry

    Other Languages Moderators


    • Points

      57

    • Content Count

      2,325


  2. DNL291

    DNL291

    Moderators


    • Points

      56

    • Content Count

      3,211


  3. HassoN

    HassoN

    Members


    • Points

      36

    • Content Count

      637


  4. Tut

    Tut

    User Guide Contributor


    • Points

      33

    • Content Count

      49



Popular Content

Showing content with the highest reputation since 23/07/19 in all areas

  1. 2 points
    EngineLoadIFP - Carrega o IFP no MTA e cria um nome de bloco customizado para colocar as animações nele. SetPedAnimation - Coloca a animação no personagem, use o nome que vc customizou e o nome da animação que está dentro do arquivo IFP. engineReplaceAnimation - Caso você deseje substituir uma animação nativa do GTA por uma animação do seu arquivo IFP em vez de criar um bloco novo.
  2. 2 points
    السلام عليكم اول مره اطرح وظيفه ☺ الوظيفه هي اغلاق اللوحه مثل اللي بالجيو اديتور function CreateButtonClose( GuiElement , text,d) if getElementType(GuiElement) == 'gui-window' then local Text = '|'..text..' |' local Font = 'default-bold-small' local width = dxGetTextWidth(Text, 1, Font) local x = d == 'left' and guiGetSize(GuiElement, false)-50 or d == 'right' and 5 local ln = guiCreateLabel(x,2,width+5,15,Text, false,GuiElement) guiSetProperty(ln ,'ClippedByParent', 'False') guiSetProperty(ln ,'AlwaysOnTop', 'True') guiSetFont(ln , Font) guiLabelSetColor(ln ,150,150,150) guiLabelSetHorizontalAlign(ln , 'center', false) --- Events addEventHandler('onClientGUIClick',ln, function() guiSetVisible(GuiElement, false ) end,false) addEventHandler('onClientMouseEnter',ln, function() guiLabelSetColor(source ,255, 69, 59) end,false) addEventHandler('onClientMouseLeave',ln, function() guiLabelSetColor(source ,150,150,150) end,false) else print('This function is a static function the Window') end end --- Test Code window1 = guiCreateWindow(0.01, 0.04, 0.70, 0.70, "Window1", true) window2 = guiCreateWindow(0.43, 0.04, 0.38, 0.29, "Window2", true) for k,element in ipairs(getElementsByType('gui-window',getResourceGUIElement(getThisResource()))) do CreateButtonClose ( element,'Close','right' ) --CreateButtonClose ( element,'Close','left' ) end معلش مابعرف اشرح بس تقدرو تجربو الوظيفه واتمني ان تنال اعجابكم 😉
  3. 2 points
    local equipes = {} setTimer(function() if (#getElementsByType("team") > 0) then for _, team in ipairs(getElementsByType("team")) do table.insert(equipes,{nome = getTeamName(team),membros = countPlayersInTeam(team)}) end table.sort(equipes, function(a,b) return a.membros > b.membros end) if (equipes[1].membros > 0) then outputChatBox("Maior equipe: "..equipes[1].nome.." - "..equipes[1].membros.." membro(s)") end end end,5000,0)
  4. 2 points
    resourceRoot = للسكربت نفسه، كمثال لو سويت حدث ماركر وحطيتها، أي ماركر مسويه داخل السكربت بيتأثر من الحدث. يعني لو سويت ماركرين وحطيت حدث اذت أحد دخل الماركر تجيه فلوس مثلاً، يصير لو أحد دخل اي ماركر من الإثنين بياخذ فلوس. ومثال آخر لو سويت داتا بتكون للسكربت نفسه بمعنى مابتكون للاعب، يعني بتكون داتا واحده فقط. ومثال آخر لو بتستدعي وظيفة من السكربت مابتقدر لأن الوظيفة أنت خليتها للسكربت نفسه فقط. root = عكس الكلام اللي فوق مع الإمكانية انك تحدد الشي اللي تبغاه من خلال الشروط، كمثال الماركر تقدر تسوي شرط في الحدث انه اذا أحد دخل الماركر الأول فقط يتحقق الحدث. بخصوص البراميترز، هي متغيرات تكون بين قوسين الوظيفة، الأحداث أو الوظائف الجاهزة تبع اللعبة تجي معها البراميترز جاهزة ماتقدر تغير في ترتيبها أو نوع المدخلات والأمثلة ذكروها لك فوق. بخصوص انك تبغى تستخدم أكثر من حدث ووظيفة، تقدر تسوي اكثر من حدث للوظيفة الواحدة وتستخدم الشروط عشان تتحقق إذا الحدث الأول تحقق تستخدم البراميتر الأول مثلاً، وتهمل الثاني عادي مايأثر، والعكس صحيح. والمعذرة ما اقدر احط لك أمثلة من الجوال، الكتابة صعبة😁.
  5. 1 point
    Importando e substituindo a anim de segurar a arma.
  6. 1 point
    العمل يتستحق الاعجاب ..حبيته
  7. 1 point
    addEventHandler "onClientSoundStopped" if (reason == "finished") then -- play another song end
  8. 1 point
    شوف هادا , نفس طلبك تقريبا
  9. 1 point
    Sim. Use a seção Portuguese / Português @Lord _+[N]injA
  10. 1 point
    فيه اكثر من طريقة outputChatBox(table.concat(myTable[1], ", "), source, 255, 0, 0) outputChatBox(myTable[1][1]..", "..myTable[1][2], source, 255, 0, 0)
  11. 1 point
    You can not do that, elementData is temporary, what you can that about is using setAccountData (when the player leaves save elementData) and getAccountData (get the data saved by the account) Try this: -- load elementData function load(_, account) local name = getAccountData(account, "name") or "N/A" setElementData(source, "name", name) end addEventHandler("onPlayerLogin", getRootElement(), load) -- save elementData function save() local name = getElementData(source, "name") or "N/A" setAccountData(getPlayerAccount(source), "name", name) end addEventHandler("onPlayerQuit", getRootElement(), save) -- find elementAccount function find (source, cmd, playerAccount) if cmd and playerAccount then if getAccount(playerAccount) then local gName = getAccountData(getAccount(playerAccount), "name") outputChatBox("Name of "..playerAccount.." is #FFFFFF"..""..gName, source, 152, 95, 161, true) end end end addCommandHandler("find", find) EDIT: I do not tested!
  12. 1 point
    É uma variável interna do MTA que retorna o cliente que chamou o lado server. É útil também para verificação de segurança visto que o elemento cliente pode ser burlado em modificações do jogo, daí client sempre vai retornar o cliente válido.
  13. 1 point
    صراحة شغلك جميل و محترم اهنيك بالتوفيق لك
  14. 1 point
    أهااا فهمت عليك الحين يعني مشكلتك مع الدائره نفسها مو مع الكود المشكله اني ما اعرف للشادر وهو الشي الوحيد اللي معرقلني في اللعبه دور على كود شادر في المواقع وهذي كلمات دلاليه تساعدك في البحث HLSL, Shaders DirectX9 أدري صعب تفهمها بس مافيه شرح في الويكي للأسف وقليل تحصل ناس تفهم في الشادر
  15. 1 point
    الخطئ الاول والثاني يقولك انه screenX1 مب متعرفة وفعلاً انا مو شايفها فـ كودك الخطئ الثالث والرابع مو واضح بالصورة حقك لكن الي قاعد اشوفه انك مكرر اسم الفنكشن فـ كل مكان تقريباً وبالتالي الكود راح ياخذ اخر متغير بالاسم ذا وبذي الحالة هو MyCross = dxDrawImage(screenX1-(size/2), screenY1-(size/2), size, size, "images/"..GetCrossHair), tocolor(255,255,255,255) وليس الفنكشن انصحك تحط اسم مختلف لكل متغير بدل الي مسويه ذا
  16. 1 point
    local isClosed = false -- لاتلسمها local speed = 0.05 -- تحكم بسرعة تحرك ال dx function panel() if (progress < 1 or variable < 0) then progress = progress + variable end if (progress <= 0) then removeEventHandler("onClientRender", root, panel) progress = 0 end cX, cY, cX = interpolateBetween(0, 0, 0, 0, -30, 0, progress, "Linear") dxDrawRectangle(0, cY + 600, 1280, 155, tocolor(0, 0, 0, 171), false) end function test() if (isClosed == false) then progress = 0 variable = speed isClosed = true addEventHandler("onClientRender", root, panel) return true end if (isClosed == true) then variable = -speed isClosed = false return true end end bindKey("F2", "down", test)
  17. 1 point
  18. 1 point
    bom, como geralmente os id são salvos como "ID" use isso no chat: getElementData(source, "ID") Pode não funcionar com essa parâmetros dependendo de como está o seu sistema de ID e CHAT
  19. 1 point
    Utiliza el resource 'sql' de la versión original 1.0: https://github.com/mabako/mta-paradise
  20. 1 point
    https://wiki.multitheftauto.com/wiki/SetNearClipDistance
  21. 1 point
    What kind of object is it - vehicle? map object? Brightness depends on model settings such as vertex colors and materials. I know you're using ZM but it's very possible that the answer is found in the thread below. Please check #2 and #3 @enzoDs
  22. 1 point
    جرب ذا timeTaple = { }; addCommandHandler("cena", function (player, cmd, sound) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Donation")) then if isTimer( timeTaple[player] ) then outputChatBox('please wait', player) return end triggerClientEvent("onClientPlaySound", player, sound) outputChatBox("#66CC99[SOUNDS]#FFFFFF : "..getPlayerName(player).. "#FFFFFF AND HIS NAME IS CENAA!",getRootElement(),255,255,255, true) timeTaple[player] = setTimer( function() end, 3700, 1 ) end end )
  23. 1 point
    https://wiki.multitheftauto.com/wiki/IsPlayerInACL Use essa função ^ para obter todos jogadores do grupo, faça um loop com getElementsByType. Para a visibilidade você vai precisar o usar o último argumento de createBlipAttachedTo blip createBlipAttachedTo ( element elementToAttachTo [, int icon = 0, int size = 2, int r = 255, int g = 0, int b = 0, int a = 255, int ordering = 0, float visibleDistance = 16383.0, element visibleTo = getRootElement( ) ] ) setElementVisibleTo irá definir a visibilidade para o player. @function learnLua
  24. 1 point
    Vc não está achando algo estranho nessas linhas 4, 5 e 6? Principalmente se comparar às linhas 18, 19 e 20.
  25. 1 point
    To be honest I have no idea. I more or less just do some experiments and see what will happens. Including observing the context and possible situations. But not reading the source code, yes, shame on me. (Verification is not possible to implement in MTA, as that would mean that it would create de-sync or more network usage.) That conclusion is just based on conditional reasoning, which is also a bad habit of mine. Every message counts! if getElementData(root, ":O") ~= true then setElementData(root, ":O", true) end Would this wrapper make people think more about what it means to enable synchronize argument? Or creating more confusing? (lots of old resources will break after applying this...) do local setElementData_ = setElementData function setElementData(element, key, value, synchronize) if synchronize == nil then synchronize = false end return setElementData_(element, key, value, synchronize) end end Old syntax: bool setElementData ( element theElement, string key, var value [, bool synchronize = true ] ) New syntax: bool setElementData ( element theElement, string key, var value [, bool synchronize = false ] ) ohhh, stp t do local setElementData_ = setElementData function setElementData(element, key, value, synchronize) if synchronize == nil then synchronize = false end return getElementData(element, key) ~= value and setElementData_(element, key, value, synchronize) or false end end If we want to get rid of this whole issue: -- clientside setElementDataStreamEnabled(element, state) -- true < receiving elementdata updates from the server for this element. But it might be too late for applying something as big as that, in this stage of the development.
  26. 1 point
    At first yes you would expect that. But there is one thing that isn't taken in account. If one of the other clients does this: setElementData(root, ":O", false, false) In that case, even if the value doesn't change, the value of this specific client must be updated. With other words it does not matter if the value is the same. All clients their value must be forced to set to the last known value. I don't know if the event is fired or not. But it is just as bad for the network.
  27. 1 point
    الله يحييك , للاسف م اقدر ادخل لاني حذفت اللعبة ! لكن بتوفيقق
  28. 1 point
  29. 1 point
    Ele está dizendo que tentou usar uma função exportada do resource ex_system, mas esse resource está desligado ou inexistente.
  30. 1 point
    -- # Server function staffsonlyy ( player ) local accname = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user." .. ( accname ) , aclGetGroup ( "Admin" ) ) ) then triggerClientEvent ( player , "speakeronlystaffs" , player ) end end -- # Client function openOrCloseGUI ( ) if ( guiGetVisible ( mainWindow ) ) then guiSetVisible ( mainWindow , false ) guiSetVisible ( linkWindow , false ) showCursor ( false ) else guiSetVisible ( mainWindow , true ) showCursor ( true ) end end addEvent ( "speakeronlystaffs" , true ) addEventHandler ( "speakeronlystaffs" , root , openOrCloseGUI ) addCommandHandler ( "speaker" , openOrCloseGUI ) bindKey ( openKey , "down" , openOrCloseGUI )
  31. 1 point
    oldText = ( ( oldText ) .. "[" .. ( tostring ( hours ) ) .. "-" .. ( tostring ( minute ) ) .. "-" .. ( tostring ( second ) ) .. "]" .. ( getPlayerName ( localPlayer ) ) .. ": " .. ( newText ) )
  32. 1 point
    Essa sua função getPlayerFromID está errada. Não tem nada a ver com ID dos jogadores, apenas com o índice daquele loop. Dai é óbvio que não vai retornar o mesmo ID pro mesmo jogador. function getPlayerFromID (theID) if (tonumber (theID)) then theID = tonumber (theID) local players = getElementsByType ("player") for id, p in ipairs (players) do local accID = getAccountID (getPlayerAccount (p)) if (theID == accID) then return p end end return false else return false end end
  33. 1 point
    save the player serial in a table instead of element datas table[serial] = true table[serial] = nil
  34. 1 point
    Exatamente do jeito que eu queria! Grato @DNL291
  35. 1 point
    Leia: https://wiki.multitheftauto.com/wiki/PT-BR/Manual_do_Servidor https://wiki.multitheftauto.com/wiki/PT-BR/Recursos @Pedro mayeer
  36. 1 point
    @Mr. Maxilian Afaik yes, but you still need to (manually) debug it in order to figure out it is 100% working. As being a human I can overlook things after all.
  37. 1 point
    source não é o jogador no evento onResourceStart. Preste atenção na Wiki. local vZones = { {x = 190, y = -489, z = 980, width = 65, depth = 60, height = 1}, } local z = {} function initvZones() if vZones and #vZones ~= 0 then for _,v in ipairs (vZones) do if v then if v.x and v.y and v.z and v.width and v.depth and v.height then local c = createColCuboid (v.x, v.y, v.z, v.width, v.depth, v.height) if c then z[c] = true for _,thePlayer in ipairs (getElementsByType("player")) do if (getElementDimension (thePlayer) == 100) then -- Tentativa de verdade. if isElementWithinColShape (thePlayer, c) then killPed (thePlayer) end end addEventHandler ("onElementDestroy", c, function() -- Não recomendo fazer isso dentro de loops. if z[source] then z[source] = nil end end) addEventHandler ("onColShapeHit", c, function (h, d) -- Prefira usar nomes fáceis de identificar em vez de letras. if h and isElement(h) and getElementType (h) == "player" then killPed (h) end end) end end end end end end end addEventHandler ("onResourceStart", resourceRoot, initvZones)
  38. 1 point
    Assim: function Vehicle2 (hitPlayer) if getElementType(hitPlayer) == "player" then if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(hitPlayer)), aclGetGroup("Mecanico")) then local vehicle = getPedOccupiedVehicle(hitPlayer) if vehicle and veh[hitPlayer] and vehicle == veh[hitPlayer] then destroyElement(veh[hitPlayer]) veh[hitPlayer] = nil else outputChatBox("Você não esta em um veículo", hitPlayer, 0, 0, 0) end end end end addEventHandler("onMarkerHit", Marker2, Vehicle2) Na função Vehicle1 você deve trocar Veh1 por veh[hitPlayer].
  39. 1 point
    The first error (Expected vector3 at argument 4, got none) Line 99: dis2 = getDistanceBetweenPoints3D(x, y, z, x2, y2, z2) so variable x2 equals to none. You got x2, y2 and z2 variables right here: local x2, y2, z2 = getElementPosition(gates[key]["gate"]) So the problem is in your gates table A little advice: On the previous step you're making a loop: for key, value in ipairs(gates) do and you can replace gates[key]["gate"] with value.gate or value["gate"] and get the same result The second error is caused by previous one as the dis2 variable has no value.
  40. 1 point
    مشكورين كلكم منورين الموضوع ❤️ + فكره جميله جدا يا نصور بإذن الله رح اسويها بالمستقبل
  41. 1 point
    admin > client > gui > admin_report.Lua > line 42
  42. 1 point
  43. 1 point
    Hello, We, the eXo-Reallife team, would like to release a module that is also used on our server. It is a pathfinding module developed by Jusonex and StiviK. The module uses the A * algorithm. (https://en.wikipedia.org/wiki/A*_search_algorithm) We use this for our GPS: Why did we develop a module for this and did not simply write a script? This has a very simple reason. The module calculates the routes in your own threads, which has the advantage that it is much faster than a script, and secondly, you can calculate how much routes as you want side by side. This will not cause any lags etc.! What are the features of the module? The module can load several graphs / nodes side by side The module calculates the routes in its own threads Very useful API functions (such as findNodeAt or getNodeNeighbors) What are the main features? int loadPathGraph (String pathToGraphFile) This function loads the graph from the given file and returns a GraphId which you need for all other functions. If something does not work, false is returned. bool findShortestPathBetween (int graphId, float startX, float startY, float startZ, float endX, float endY, float endZ, function callback) This function finds the shortest route between the points. (Unfortunately, no vectors can be handed over!) The callback function is called when the calculation is finished. As an argument, either a table is returned that contains all nodes, or false if no route is found. bool unloadPathGraph (int graphId) You can use this function if you no longer need and want to unload the graph, it returns true if everything is fine, false if an error has occurred. You will find all the other functions that are included in our documentation. Why is the eXo team releasing all this? Well, that has the simple reason, we want to share our work with others and not just keep it for us! We hope we can enrich you with it and vlt. Even help! Where can I download the module? The whole module is open-source and can be viewed in our GitHub organization. It's released under the MIT License. GitHub organization: https://github.com/eXo-MTA Repository: https://github.com/eXo-MTA/ml_pathfind Download the module (Windows / Linux): https://github.com/eXo-MTA/ml_pathfind/releases Nodes of all roads in SA: https://github.com/eXo-MTA/ml_pathfind/blob/master/test/sa_nodes.json If you find any mistakes or suggestions, you can simply create a new issue and we will look into it. So now that's it, have fun with the module! - StiviK and the eXo-Reallife team (Original thread in German: https://www.mta-sa.org/thread/36365-release-mta-sa-pathfinding-module/?postID=407938#post407938)
  44. 1 point
    Dependendo do modelo da construção, a porta é separada e dai vc consegue tirar ela no editor de mapas do MTA. Sobre colocar o interior dentro da construção, vc vai precisar modificar o modelo do interior, pois eles geralmente não cabem dentro das construções. Você vai ter um trabalho absurdo que não vale a pena. Mais detalhes nesse outro tópico com mesmo assunto:
  45. 1 point
    عمل جيد , لكن زي ماقال نصور لو كانت بالشاشه كانت افضل , استمر
  46. 1 point
    ممكن تشتري دومين وتسوي موقع خاص فيك مثل Mosfata.com او تدور دومين وخادم مجاني وبيكون شي غريب زي mostafa.blabla.com بس بالحالتين تقدر
  47. 1 point
    Então cara, se vc é muito leigo com script, sugiro que vc comece a estudar lógica de programação antes de tentar fazer algo complexo. Sobre escrever um texto muito grande, isso não é problema nenhum, inclusive é recomendável que você deixe o máximo de detalhes possível pro pessoal não precisar ficar perguntando depois. Este tópico é mais relacionado a Programação em Lua, da próxima vez poste na seção correta. Regras do fórum neste tópico:
  48. 1 point
    Hello, just wanted to give a simple gift to many people who keep having a problem with the LS CityHall flag to either replace it, or delete it from the Map and make a new LS CityHall for MTA. or change the flag texture as the Map Editor doesn't detect it. the same as many other objects. so i am giving you a way to fix this problem. i can make a tutorial if you guys want on how to remove other undetected objects. Object name : LAcityhallTrans_LAn Object model : 4003 HOW TO : 1- go to the map file that has the CityHall Map usually at : C:\Program Files (x86)\MTA San Andreas 1.5\server\mods\deathmatch\resources\<MapName>\ 2- Enter the <MapName>.map file there with an editor like notepad ( there is only one file has an extension of *.map) 3- in the end of the file add this line : <removeWorldObject id="removeWorldObject (LAcityhallTrans_LAn) (1)" radius="96.110512" interior="0" model="4003" lodModel="4024" posX="1484.36389" posY="-1749.83789" posZ="30.61433" rotX="0" rotY="0" rotZ="0"></removeWorldObject> 4- if the map is already open in your local server, then please reopen the map <MapName> Enjoy
  49. 1 point
    Hi all, I own a 'vehicle-oriented' MTA:SA server, which was grounded a couple of years ago. Our team has grown up within the fun/gaming process in cases of ideas and modelling (there are about 10 stable 3D-modelling/-designing enthusiasts at the moment), so I personally had to go on with my scripting and 'thought-scaling' skills. It is also could be very familiar/close to many MTA-enthusiasts, that organizing/'management' (except coding) of such kind of team takes much time, attention and effort. Now I met that 'level' where all the ideas and large amount of routine became a kind of 'hardly storable' thing for my head being the only Lua-coding and 'general processing unit' in the project. The same trouble meets the project in general - many things which were released within the server updates could be not less useful in much bigger number of places worldwide, so the current project looks like a 'too small house for a too large family'. Here is an 'example'-(short)list of systems which were successfully released/resolutely begun by me and my teammates. More info could be presented personally to people who become interested in. Vehicle platform/base unification. At first, it looks like a simple 'setVehicleComponentVisible'-based tuning system, but it becomes much more complicated and interesting, when it goes about 'realistic' exterior-detailing, which needs a large work done not only by modellers, but also by a crew of general car enthusiasts, which look for and finally provide technical info about how every model/modification looks in real life and which parts should be modelled. All opening panels (doors, bonnets etc) DO have synchro, so they open/close such as the original GTA-components do. Vehicle-'damage' system with component movement and 'wrecking' HLSL-shaders (in progress). Photos possible for interested in cooperation by request. Custom corona-based vehicle lights system. In-game vehicle component positioning with synchro and 'cross-DFF' tuning system (allows to install parts from another vehicle model). Full-3D numberplates system. Even plates are UV-mapped so they could be painted/textured in any way. All the fonts are so 'realistic' as possible being in 3D. Wheel system with separate tire-/rim changing possibility + tire texture changing. Large amount of other vehicle and general gaming systems, which could be described for ages if needed. Who is clearly needed? I'm looking for person/people who is/are interested in 'automotive' projects. That could be experienced Lua-developers (PAID) who could generate and implement 'outstanding' ideas, and even other enthusiasts, who want to improve their skills. The main goal for the moment is optimizing the routine (please note that 'routine' is only the word, sometimes it could be more complicated and 'prestige' than it sounds), because 'management'-tasks are taking more and more attention. Thats why I will be glad to communicate with any kind of people with corresponding level of personal interest to such kind of projects. If 'it goes', any kind of cooperation could be discussed. Skills which are 'greatly welcomed' (but not obligatorily): DX GUI development experience HLSL (shaders) I speak English / Ich spreche Deutsch / Спілкуюся українською / Говорю по-русски Please PM me if interested.
  50. 1 point
    Remove the IP from the mtaserver.conf.