Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 31/07/18 in all areas

  1. Updated video. For some reason I can't post this into the original.
    2 points
  2. Google is smarter than me. https://stackoverflow.com/questions/45259879/how-do-i-remove-all-special-characters-punctuation-and-whitespaces-from-a-strin
    1 point
  3. تحتاج تستخدم : getVehicleMaxPassengers getVehicleOccupants
    1 point
  4. تقريبا , لكن الشخصيات مايمديها يسويها , يشتري شخصيات جاهزه , او يمديه ياخذ الشخصيات المجانيه , عالعموم يمديك تضيف اكثر من عنصر ليقتل الاعب , من فخوخ من اعداء الخ ,
    1 point
  5. In a bit I'll write a simple lua to .map convertor.
    1 point
  6. I really appreciated for you work this was really cool keep it up the story line you chosen was good
    1 point
  7. Codyjl creating new project for map editor you can check what will be new
    1 point
  8. like I posted on your other topic @Behnam; Also locking this topic, you can try again when you think you can post scripting questions in the appropiate fashion. Conduct guidelines - The Scripting section is not meant for those unwilling to learn, whose only intent is to try get others to finish the scripts they need, line by line. Don't lean back and wait for others to finish your script line-by-line, without any efforts of your own, because Scripting section isn't a free scripter service. *Note: any scripters writing something from scratch without the topicstarter's cooperation, are encouraging laziness and leading other beginner scripters to think this is acceptable, or even make it more likely that non-scripters will start posting here because they need something. You're not doing a valuable job by writing their code on demand in this section.
    1 point
  9. like I posted on your other topic @Behnam; Also locking this topic, you can try again when you think you can post scripting questions in the appropiate fashion. Conduct guidelines - The Scripting section is not meant for those unwilling to learn, whose only intent is to try get others to finish the scripts they need, line by line. Don't lean back and wait for others to finish your script line-by-line, without any efforts of your own, because Scripting section isn't a free scripter service.
    1 point
  10. Remind yourself of https://forum.multitheftauto.com/topic/94790-guidelines-and-formatting-for-this-section-read-before-posting/ Locked
    1 point
  11. ما اخدت بالي local kills = 0 addEventHandler("onClientPlayerWasted", root, function(killer) if killer and killer ~= source and getElementType(killer) == "player" then if killer == localPlayer then kills = kills + 1 if kills == 1 then addEventHandler("onClientRender", root, dxText) end killsTimer = setTimer(function() kills = kills - 1 if kills > 0 then resetTimer(killsTimer) else removeEventHandler("onClientRender", root, dxText) if kills < 0 then kills = 0 end end end, 3000, 1) end end end ) function dxText() dxDrawText("+1,000 $", 941, 325, 1145, 368, tocolor(22, 191, 14, 255), 1.20, "bankgothic", "left", "top", false, false, false, false, false) end
    1 point
  12. انا سألت بأحترام وأنت من المفترض انك ترد بأحترام او تسكت افضل
    1 point
  13. New map editor will fully support lua based maps. however it will be a while until it is ready.
    1 point
  14. على فكرة الفريق كان شغال من قبل على نفس الفكرة، ولكن لقلة اللاعبين + للإهتمام أكثر بهذا المشروع سحبوا عليه ثاني شيء ما اشوف انهم راح يضيفوا شيء افضل من الي قاعدين يسوونه حاليًا فريق فايف ام، لو يندمجوا مستقبلًا مع بعض أفضل ثالث شيء لعبة GTA SA ما انغرضت ولا راح تنغرض لسبب واحد وهو توافقها مع الاجهزة القديمة وبساطتها
    1 point
  15. OMG - Thanks you so much! I wish you +999999 Thanks buttons
    1 point
  16. Resolved by reinstalling the videocard driver.
    1 point
  17. https://wiki.multitheftauto.com/wiki/GetPlayersByData
    1 point
  18. ايه للاسف باقي عايش
    1 point
  19. موضوع وسواليف وفلسفه واخرتها تعتزلون ولا يشوفونكم الادارة حتى عاجبتني ثقتكم الزايده
    1 point
  20. Você alterou alguma coisa do freeroam? Se for só uma mensagem de erro irrelevante, você pode evitar ela assim (linha 21): if type(fn) == "function" then fn(...) end
    1 point
  21. Se for aquele erro no download de resources, abra a pasta C:\Program Files (x86)\MTA San Andreas 1.5\mods\deathmatch\resources e exclua os resources que estão mostrando erro ao baixar.
    1 point
  22. Pelo que eu entendi do código, o element-data "cl_enginestate" pertence ao veículo, então seria theVehicle.
    1 point
  23. addEvent ( string eventName [, bool allowRemoteTrigger = false ] ) O segundo argumento do evento está definido como false. Significa que o evento só vai poder ser chamado no próprio lado.
    1 point
  24. Hi, I've solved everything. I forgot what exactly caused the issues. Thanks.
    1 point
  25. processLineOfSight Acho que é possível com essa função.
    1 point
  26. Isso não seria um sistema de médico? Tente isto: addCommandHandler ("s", function (thePlayer, command, Jogador) local accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("SAMU")) then if Jogador then local targetPlayer = getPlayerFromName ( Jogador:gsub("#%x%x%x%x%x%x", "") ) else return outputChatBox ( "Sintaxe incorreta! /"..command.." <nome_do_jogador>", thePlayer ) end if targetPlayer then setElementHealth ( targetPlayer, getPedMaxHealth(targetPlayer) ) triggerClientEvent(thePlayer, "SAMU", thePlayer) setPedAnimation(thePlayer, "medic", "CPR") outputChatBox ( "Você foi curado por "..getPlayerName(thePlayer).." !", targetPlayer ) outputChatBox ( "Você curou o jogador "..getPlayerName(targetPlayer).." !", thePlayer ) else outputChatBox ( "Não há nenhum jogador chamado " .. Jogador .. "!", thePlayer ) end else outputChatBox ( "Você não pode usar este comando", thePlayer ) end end) function getPedMaxHealth(ped) -- Output an error and stop executing the function if the argument is not valid assert(isElement(ped) and (getElementType(ped) == "ped" or getElementType(ped) == "player"), "Bad argument @ 'getPedMaxHealth' [Expected ped/player at argument 1, got " .. tostring(ped) .. "]") -- Grab his player health stat. local stat = getPedStat(ped, 24) -- Do a linear interpolation to get how many health a ped can have. -- Assumes: 100 health = 569 stat, 200 health = 1000 stat. local maxhealth = 100 + (stat - 569) / 4.31 -- Return the max health. Make sure it can't be below 1 return math.max(1, maxhealth) end
    1 point
  27. Nome da função createMarker tá errado. Você não está criando a tabela 'veh' antes de indexá-la. E em algumas linhas do código, você escreveu 'sorce' em vez de source. Lembre-se sempre de usar /debugscript 3 quando for testar um script para depurar o código.
    1 point
  28. De onde você pegou? Você vai precisar do código .fx do shader pra funcionar. Se você quer apenas substituir as texturas do cj, você pode usar as funções do exemplo nesta página da Wiki: https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs
    1 point
  29. Neste tutorial, vou abordar sobre o uso da função guiGetScreenSize. E também aplicando-a com uma matemática simples para que os elementos da GUI (Interface Gráfica do Usuário) e DX possam caber na tela em todas as resoluções. Obtendo o tamanho da tela Esta função irá retornar dois valores que são float, estes dois contém a largura e altura da tela, respectivamente. Você pode verificar se a sua resolução está baixa ou não, com a largura e altura da tela que serão retornadas pela função. Por exemplo, se a largura for inferior a 640 e a altura inferior a 480, isso quer dizer que sua resolução está baixa. Você pode fazer o mesmo, se quiser verificar se a resolução da tela está maior ou menor do que você deseja. Ajustando elementos GUI e DX em todas resoluções com guiGetScreenSize() Valores relativos e absolutos Para ajustar um elemento GUI ou DX em todas as resoluções (gui neste caso), primeiramente, você deve saber se os valores dele são absolutos ou relativos, isso se aplica para um elemento gui. Isso significa que se for colocado true no argumento relative, os tamanhos e posições serão relativos, e portanto, os valores X, Y, largura e altura devem estar entre 0 e 1 num tipo de valor que é float. Ex: 0.555 ou 0.525 ou 0.5 ou 0.095 - Valor relativo. Desta forma, 0.5 representa o ponto do centro da tela, isto corresponde a 50% entre um canto e outro canto da tela. Isto se aplica tanto para os argumento X e Y, quanto para a largura e altura. Por exemplo, se o argumento width (largura), tiver um valor de 0.5, o element gui terá um tamanho da metade da largura da tela. Se for colocado false no argumento relative, isso significa que os tamanhos e posições serão absolutos. Os valores absolutos são calculados como o número total de pixels do canto superior esquerdo de seu elemento pai, se nenhum elemento pai for especificado, o pai neste caso é a própria tela. Numa resolução de tela de 1280x800 (1280 é a largura e 800 a altura), uma posição X de 640 representará o ponto central da tela. Assim como X sendo um valor de 320 (1/4 de 1280), representará 25% entre o canto esquerdo da tela e o ponto inicial do elemento GUI (ou outro). Você pode optar pelo uso de valores relativos e absolutos, colocando true ou false no argumento relative. Obviamente, colocando true estará usando valores relativos, e false valores absolutos. Você pode converter valores absolutos para relativos com esta função: E se quiser converter relativos para absolutos: Criando uma janela simples Neste exemplo, será escrito um código que criará uma janela na gui, numa resolução de 1280x800 usando posições absolutas, sem ajustá-la com a função guiGetScreenSize. addEventHandler("onClientResourceStart", resourceRoot, function() myWindow = guiCreateWindow(452, 212, 376, 375, "Janela Não ajustada para todas resoluções", false) end ) Ajustando a janela para caber em todas as resoluções Primeiramente, vamos criar duas variáveis que irão retornar os valores da função guiGetScreenSize. local sWidth, sHeight = guiGetScreenSize() sWidth = Largura da tela sHeight = Altura da tela Em seguida, iremos pegar o valor de X que é 452, e dividir por sWidth. O resultado será: 0.353. Assim como o X, vamos dividir o Y, mas agora pela variável sHeight. Sendo assim, ficará 212 dividido por sHeight. O resultado será: 0.265. A mesma coisa será feita com os valores width (largura) e height (altura). Eles serão divididos por sWidth e sHeight, respectivamente. Portanto, firará assim: 376 dividido por sWidth: 0.293. 375 dividido por sHeight: 0.468. Depois disso, vamos pegar as variáveis da função guiGetScreenSize (sWidth e sHeight) e os resultados dados pela divisão entre os valores e o tamanho da tela, e multiplicá-los. Iremos aplicar isso no código anterior, alterando-o para ajustar em todas as resoluções. Portanto, o código ficará assim: addEventHandler("onClientResourceStart", resourceRoot, function() local sWidth, sHeight = guiGetScreenSize() myWindow = guiCreateWindow(sWidth*0.353, sHeight*0.265, sWidth*0.293, sHeight*0.468, "Janela ajustada para todas resoluções", false) end ) Note que o terceiro e o quarto argumento também estão sendo ajustados para todas as resoluções. Neste caso, o tamanho da janela também será ajustado conforme a sua resolução. Feito tudo isso, sua janela já estará ajustada em todas as resoluções. Você também pode fazer isso com texto e retângulo DX e elementos da GUI. Além de usar a função guiGetScreenSize para verificar sua resolução, você pode ajustar qualquer coisa que esteja precisando (de ajustar) para todas as resoluções. Obs: Você pode ignorar os argumentos width e height se quiser manter o tamanho original do elemento da interface. Além disso, os elementos filhos de um elemento GUI, podem não ficarem visíveis se não tiverem a largura e altura adaptada junto à janela.
    1 point
×
×
  • Create New...