Jump to content

DNL291

Moderators
  • Posts

    3,875
  • Joined

  • Days Won

    67

Everything posted by DNL291

  1. Falta um parentese na função setElementData na linha 7. Além disso, tem um parentese após o 'end' na linha 15 que também causa erro na função.
  2. Tente isso: chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","Local") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","Local") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local playerTeam = getPlayerTeam(player) if playerTeam then local r,g,b = getTeamColor(playerTeam) for _,v in ipairs(getElementsByType("player")) do if ( getTeamName(getPlayerTeam(v)) == getTeamName(playerTeam) ) then if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(Local) "..nick..": "..msg,v,r,g,b,true) end end end end end addCommandHandler("Local",onChat)
  3. No description: https://community.multitheftauto.com/ind ... ls&id=6346 DONE
  4. A função que abre o janela está diretamente no command "window". Ele pode nomear a função para chamar com addCommandHandler & bindKey, isso seria mais simples. Mas como a função está diretamente em um comando, ele pode usar a função executeCommandHandler em bindKey, que também não tem problemas.
  5. You are using the 'get' function, that is a function of the MTA.
  6. Quer desativar os sons de tiros feito pelos jogadores ou efeitos de sons de tiros (não causado por jogadores) ?
  7. Logicamente vai funcionar porém, vai chamar a função muitas vezes se o F7 for pressionado diversas vezes. Para resolver isso, você pode verificar se a janela está aberta, caso esteja, use return.
  8. Car mod https://community.multitheftauto.com/ind ... ls&id=6327 DONE
  9. DNL291

    CJ Clothes

    How ?? viewtopic.php?f=91&t=44842&p=449606#p449606
  10. Acho que não deve ter para download. Você deve começar a aprender Lua para fazer por si mesmo ou pagar alguem.
  11. DNL291

    CJ Clothes

    Is possible using shader.
  12. setPedAnimation -- or setPedControlState ?
  13. De direitos ao recurso para poder registrar, adicione ele na ACL. Pelo painel Admin: Tab Resources > Manage ACL > Group Admin > Add object, na caixa de edição coloque, resource.NomeDoSeuRecurso (Nome do seu recurso de Login/Register).
  14. ----------- This Area Here. -------- function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x, y, z) warpPedIntoVehicle ( source, vehicles[source] ) setVehicleColor( vehicles[source], 0, 255, 0 ) addEventHandler("onVehicleStartEnter", root, function (player) if ( source == vehicles[player] ) then if (getTeamName(getPlayerTeam(player))=="Military")then cancelEvent() else triggerClientEvent(player,"message:addMessage",player,"You are not in the Military!",255, 0, 0) end end end ) end addEvent("CreVehice_group_military",true) addEventHandler("CreVehice_group_military", root, spawnVeh)
  15. Certamente um desses 2 não deve estar correto. Não estou com muito tempo para ficar online, senão eu poderia ajuda-lo.
  16. bindKey("F6", "down", function ( ) guiSetVisible( wnd, not guiGetVisible(wnd) ) guiSetVisible( bHealth, not guiGetVisible(bHealth) ) guiSetVisible( bDie, not guiGetVisible(bDie) ) showCursor( guiGetVisible(wnd) ) end )
  17. Só não confundam que eu disse que eles devem ler apenas tutoriais traduzidos, eu já li muitos tutoriais em inglês, e apesar de ainda estar aprendendo inglês, não sei muitas coisas. Mas mesmo assim eu lia até entender cada ponto. Quem quer aprender programar deve saber no minimo o básico de inglês, ou todos devem, pois é uma linguagem que todos usamos.
  18. Você já fez o procedimento pelo firewal certo? Você também já fez atraves do site do modem? Colocando o gateway padrão em seu navegador?
  19. Mas esse é o motivo de muitos brasileiros não querer ler tutoriais em inglês, por isso é importante ter tutoriais traduzidos em português. Pois ninguém terá motivos para dizer que não tem na linguagem portuguesa. Eu editei meu post e coloquei o link do MTA Wiki citado, em português.
  20. Aqui segue também 2 links: http://www.lua.org/manual/5.1/pt/manual.html http://www.lua.org/doc/wjogos04.pdf Pode ter partes mais complexas para entender, para isso você deve ter o nível básico de Lua ou experiência com outras linguagens como Lua. Edit: E é claro, MTA Wiki, como citado por Cadu12. Aqui está em português: https://wiki.multitheftauto.com/wiki/PT- ... _Scripting
  21. I think he's mean the MTA community resources.
  22. https://community.multitheftauto.com/ind ... ls&id=6260 DONE
×
×
  • Create New...