Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 29/09/19 in all areas

  1. Esqueci de especificar o item, desculpe como o usuário acima colocou: local fala = getElementData(localPlayer,'falando') or false
    1 point
  2. Esqueceu de especificar o elemento local fala = getElementData(localPlayer, "falando") or false
    1 point
  3. Postou no lugar errado, próxima vez posta aqui por favor: https://forum.multitheftauto.com/forum/97-portuguese-português/ topic: setTimer outputChatBox @danielpaulino
    1 point
  4. Você já tinha criado outro tópico aqui: Que foi respondido @Deniel Por favor, use o local correto para postar, se postar em português, deve ser aqui: https://forum.multitheftauto.com/forum/97-portuguese-português/
    1 point
  5. The skill value is looked up in the SQL table weaponstats. Since you're already accounting for all the weapon skills possible, let's hypothetically say you want to add stamina stat to this. What you'd do is add a new column in the weaponstats SQL table called "stamina", and then edit this script's skills table by adding [22] = "stamina". The actual value for that stat will be in the SQL table. E.g. owner ak47 m4 ... stamina 23 1000 1000 ... 560 35 600 500 ... 600 So for player with charID 23, the poll[1]["stamina"] will be 560, for poll[1]["m4"] it will be 1000. For charID 35, these will be 600 and 500 respectively. When originally recommending that code, I didn't realise that all the skills were already added, which means you probably won't be adding or removing anything from it, but at least it's still a cleaner code design.
    1 point
  6. Depende. Ele cai no chão diferente dependendo de onde levou tiro. As vezes cai pra frente, as vezes pra trás. Tem todos esses, no bloco "ped": ko_shot_face ko_shot_front ko_shot_stom ko_skid_back ko_skid_front ko_spin_l ko_spin_r
    1 point
  7. No seu Freeroam, no arquivo fr_server.Lua, da linha 378 até 381 (talvez algumas linhas a mais ou a menos), substitua isso: Por isso: E nas linhas 477 até 480, substitua isso: Por isso: Depois vá nas settings do Freeoram (clique duas vezes nele pelo painel admin) e mude o tempo de vehicles/maxidletime para -1. E então reinicie o Freeroam. Dessa forma, os veículos criados pelo Freeroam não vão mais sumir. Você pode ativar novamente esta funcionalidade quando quiser, apenas mudando o tempo novamente para um valor positivo. Valores negativos desativarão esta funcionalidade.
    1 point
  8. -- Clientside addEventHandler("onClientRender",root, function() local fala = getElementData('falando') or false if fala == true then dxDrawText("Ativado", x*500, y*100, x*1132, y*37, tocolor(0, 255, 0, 221), 1.00, font, "left", "top", false, false, false, true, false) else dxDrawText("Desativado", x*500, y*100, x*1132, y*37, tocolor(255, 0, 0, 221), 1.00, font, "left", "top", false, false, false, true, false) end end ) addEventHandler ( "onClientPlayerVoiceStart", root, function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer == source then setElementData(source, "falando", true); end end ); addEventHandler ( "onClientPlayerVoiceStop", root,function() if (source and isElement(source) and getElementType(source) == "player") and localPlayer == source then setElementData(source, "falando", false); end end);
    1 point
  9. local skills = { --[skillID] = columnName [77] = "ak47", [78] = "m4", [69] = "pistol", [70] = "silencedpistol", [71] = "deagle", [72] = "shotgun", [73] = "sawnoff", [74] = "spas", [76] = "mp5", [79] = "sniper", } local owner = charID dbQuery( function(qh) local poll = dbPoll(qh,0) local row = poll[1] if not row then return false end -- don't continue if poll[1] is empty (no rows found in weaponstats for this owner) for skillID, columnName in pairs(skills) do -- iterate the table defined above whose key-value pairs are [skill ID] = table column name setPedStat(player, skillID, row[columnName]) end end, {},connection,"SELECT * FROM weaponstats WHERE owner=? LIMIT 1", owner ) This is a little cleaner and more maintainable design. If you add more columns in your weaponstats db-table, all you have to do is update the skills table.
    1 point
  10. Tem alguns tutoriais de Lua nesse tópico: https://forum.multitheftauto.com/topic/116681-informações-úteis-scriptingconfiguraçõestutoriais-para-o-mta/
    1 point
  11. Ta ae tudo que você precisa: Template:Drawing_functions
    1 point
  12. Só usar isso: guiSetInputEnabled (true) -- Todas as binds do MTA são desativadas. Para voltar ao normal, use false.
    1 point
  13. Apenas uma suposição: pode ser que esteja entrando nesses blocos depois de já ter entrado uma vez, e isso vai causar esses problemas inconvenientes. É mais seguro você definir uma variável uma vez que tal bloco for executado para evitar que seja executado 2x sem que você queira. Dependendo do acionamento do evento "onClientPlayerDamage" isso pode acontecer visto que o dano pode ser registrado mais de uma vez em um intervalo bem curto. O setElementData tem um tempo até ser setado, mesmo que seja no mesmo lado, daí acho mais seguro usar uma variável em conjunto, embora você recebesse aviso no debug, se um evento por exemplo, fosse adicionado novamente. Fora isso, percebi que o else pode executar o: removeEventHandler("onClientRender", root, notificao2) E isso sem nenhuma verificação se o evento de fato foi adicionado antes. Faça testes com outputs em cada trecho pois códigos que utilizam setTimer por si só precisam de verificação dentro do timer, pois o momento que você a chama é um, e o momento que executa é outro e isso pode gerar erros pois existem sempre variantes ao longo do intervalo. @czarsight
    1 point
  14. Sorry, the message above does not display the picture.
    1 point
  15. Main page Animation Homepage
    1 point
  16. Hey, i reworked mta community webpage. I apologize in advance for my bad english Russia power!
    1 point
×
×
  • Create New...