Jump to content

Frozen em Massa


Recommended Posts

Olá gostaria de sabe como Congelo todos os carros de uma tabela

local CorTabela = {[545] = {veiculo = createVehicle(545, 2118.9157714844, -1123.4334716797, 25.007574081421, 2.3390502929688, 359.8037109375, 271.84777832031)},
                   [517] = {veiculo = createVehicle(517, 2119.5053710938, -1127.46484375, 25.199220657349, 2.5054931640625, 0.4180908203125, 273.76586914063)}
                    }


for i = 1, #CorTabela do
local veiculos = (CorTabela[i]["veiculo"])
    if veiculos then
    setVehicleDamageProof(veiculos, true)
    setElementFrozen(veiculos, true)
    setVehicleColor(veiculos, 255, 255, 255, 255, 255, 255)
    end
end

 

Link to comment

Tente:

 

-- ID Carro, Posição X, Y, Z; Rotação RX, RY, RZ
local carrosasercriado = { 
	{492,2148.7,-1203.6,23.6,0,0,270},
	{402,2148.3999,-1199,23.8,0,0,270},
 } 
	  
veics = {}
	  for i=1 ,#carrosasercriado do veics[i] = createVehicle ( carrosasercriado[i][1], carrosasercriado[i][2], carrosasercriado[i][3], carrosasercriado[i] [4],carrosasercriado[i][5], carrosasercriado[i][6], carrosasercriado[i][7])
     setTimer(setElementFrozen,1500,1,veics[i], true)
     setVehicleDamageProof(veics[i], true)
     setVehicleColor(veics[i], 255, 255, 255, 255 )
	  end
  

 

  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...