Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/01/21 in all areas

  1. Hi. With the most recent update we are now able to hijack vehicles and take npc peds out of vehicles. I took the opportunity to edit MTA's traffic resource and add a working traffic system to MTA! I'm planning on using it in my own server once it launches. What can we do with it? * How many traffic vehicles will spawn depends on the online player count. * Each player will add a few vehicles to global vehicle limit. * You can set a hard cap so that even if we have too many players, we won't exceed a certain vehicle count. * Vehicles will spawn in locations where there are players. * Vehicles will automatically despawn when there is nobody near them, and new ones will spawn. * You can hijack vehicles from driver peds. * You can enter the passenger seat, they will take you around San Andreas. * They work wonderfully with my NPC ped script and they'll be careful not to run over any peds, and my peds will get out of the way when there is a vehicle coming towards them. * Driver peds can be killed, there will be chaos though. * It can be a bit draining on the client side at times, but it won't cause server-side lag in any way. * More stuff that I'm too lazy to list The resource itself is quite impressive and those edits make it suitable for big and small servers alike. Also check out my NPC ped script which is quite detailed and even introduces civilians, gangs, mafia, cops and the swat: Here is a video which also shows my npc peds for a little bit: Cheers!
    1 point
  2. ItensNaoRemoviveis = { ["identidade"] = true, ["porte"] = true, ["cnh"] = true, ["ak47natal"] = true, } inventario = { {"hamburguer", 2}, {"suco", 3}, {"glock", 5}, {"kit_reparo", 2} } function teste() for i=#inventario,1,-1 do local item = inventario[i][1] if not ItensNaoRemoviveis[item] then table.remove(inventario,i) end end end addCommandHandler("test", teste) testa ae!
    1 point
  3. In the past I haven't had luck with vehicle upgrades, and I believe @Platin - xNikoXD had problems with vehicle upgrade shaders too. Perhaps if he sees this he may be able to weigh in
    1 point
  4. Try disabling anti-virus during install
    1 point
  5. Trabalhos = { {"Pescaria", 0, "Nenhuma"}, -- Emprego, Level, Habilitação {"Lixeiro", 0, "Nenhuma"}, -- Emprego, Level, Habilitação {"Carregador", 5, "Nenhuma"}, -- Emprego, Level, Habilitação {"Sedex", 10, "B"}, -- Emprego, Level, Habilitação {"Pizzaboy", 15, "A"}, -- Emprego, Level, Habilitação {"Uber", 20, "B"}, -- Emprego, Level, Habilitação {"Caminhoneiro", 25, "D"}, -- Emprego, Level, Habilitação {"Mecanico", 35, "C"}, {"Mineirador", 50, "Nenhuma"}, {"Detran", 70, "C"}, {"SAMU", 100, "C"}, {"PMESP", 200, "Nenhuma"}, {"PRF", 300, "Nenhuma"}, } Faltou vírgula depois do fecha chaves em todos os empregos abaixo do caminhoneiro
    1 point
  6. @Boechatmuito bem !. Mas deixarei um exemplo aqui usando o elemento 'player' no getElementsByType(). Vamos supor que desejamos puxar um player pelo seu ID, então faremos assim: print(getPlayerName(getPlayerFromID(23))) -- aqui daremos um print no nome do player que tem o id 23. function getPlayerFromID(ID) -- aqui é a function que puxa o player pelo ID v = false -- aqui criamos uma variavel que atribuimos o valor boolean 'false' for INDICE, VALOR in ipairs (getElementsByType('player')) do -- aqui iniciamos um loop de todos os players if getElementData(VALOR, "ID") == ID then -- aqui verificamos os players que tem o elementData 'ID' igual o que botamos no print acima v = VALOR -- aqui transformamos a variavel no player selecionado. break -- aqui quebramos o loop end end return v -- aqui retornamos para o 'print' o 'player or false' end
    1 point
  7. You can add this option to your meta.xml if you want to start a script earlier than the others: <download_priority_group>1</download_priority_group> Here is the explanation from the wiki: In the early starting script you can change the environment prior to the download of the other resources.
    1 point
×
×
  • Create New...