ArthurScr Posted May 15, 2020 Posted May 15, 2020 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
DNL291 Posted May 15, 2020 Posted May 15, 2020 Faça um loop pairs, nele, você terá a sub-tabela com o veículo e a chave, que está representada pelo ID do veículo.
ArthurScr Posted May 19, 2020 Author Posted May 19, 2020 On 15/05/2020 at 01:17, DNL291 said: Faça um loop pairs, nele, você terá a sub-tabela com o veículo e a chave, que está representada pelo ID do veículo. Eu não sei como funciona o pairs
DNL291 Posted May 19, 2020 Posted May 19, 2020 Recomendo assistir essa playlist: https://www.youtube.com/playlist?list=PLOgWUGOesjtSo8Hx7gucHfY4E3KwtnoZm loop for: https://www.youtube.com/watch?v=W_NgkjPyIck&list= 1
Blaack Posted May 19, 2020 Posted May 19, 2020 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 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now