Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/11/19 in all areas

  1. The resource which calls addAccount needs to have the correct permissions set up in ACL. Perhaps the easiest but also the most dangerous way to fix this issue is to add resource.[your resource name] object in the admin ACL group (but this grants way more permissions than just addAccount, so make sure you trust the code)
    2 points
  2. Sobre o primeiro problema: source deixa de existir dentro de uma função de setTimer. Para evitar isso, você precisa passar o source como parâmetro de função no setTimer. setTimer (function (theSource) -- theSource = source que foi passado como parâmetro. destroyElement (theSource) end, 30000, 1, source) -- Passa o source como parâmetro de função do setTimer. Sobre o segundo problema: Para respawnar um veículo, você pode simplesmente definir a posição de respawn dele com setVehicleRespawnPosition e depois respawná-lo com respawnVehicle.
    1 point
  3. local table = { {"1", "2", "3", "4"}, } function startInsert() for k=5,8 do table.insert(table,tostring(k)) end end startInsert()
    1 point
  4. A rotação é 0-360, o valor que você colocou é muito baixo.
    1 point
  5. 'playerSource' será sempre a referência para a qual foi definida, a menos que seja explicitamente alterada código, por exemplo: function elementType(playerSource) if getPedOccupiedVehicle(playerSource) then playerSource = getPedOccupiedVehicle(playerSource) -- playerSource aqui passa a ser o veículo do jogador local gET = getElementType(playerSource) outputChatBox("O seu tipo é:"..gET..".", playerSource, 255,255,255, true) end end addCommandHandler("tipo", elementType) Uma dica é sempre fazer outputs com os valores para entender a lógica e jamais faça o script tentando na sorte, você pode colocar um: iprint("playerSource", playerSource, "vehicle", getPedOccupiedVehicle(playerSource), "element type", getElementType(playerSource))
    1 point
  6. Here you have an example. Just try it.
    1 point
  7. Em vez de tentar apagar o fogo, só ir aumentando a vida dos carros até que o fogo suma.
    1 point
  8. Because table.insert inserts only 1 value to table. In your case you should use for loop and call table.insert per iteration. Please read Lua docs:
    1 point
  9. Como vc quer que saia vehicle se vc está obtendo o tipo do playerSource? function getMyVehType (thePlayer) if getPedOccupiedVehicle (thePlayer) then outputChatBox ("O seu tipo é: "..getElementType(getPedOccupiedVehicle (thePlayer))..".", thePlayer, 255,255,255) end end addCommandHandler ("tipo", getMyVehType)
    1 point
×
×
  • Create New...