Jump to content

setVehicleComponentVisible not work


iiv03

Recommended Posts

2 hours ago, JeViCo said:

On my opinion vehicle creation takes a little amount of time to manage it's data. Try to use setTimer


setTimer(setVehicleComponentVisible, 100, 1, vehicle, component, visible)

 

thx and i wanna loop only in vehicle infernus so do like this?

function test()
   for id, vehicle in ipairs(getElementsByType("vehicle")) do 
   if vehicle == 411 then
setTimer(setVehicleComponentVisible, 100, 1, vehicle, "blablabla", false)
		end
	end
end
addEventHandler("onClientResourceStart", resourceRoot, test)

edit: nvm i forget add
getElementModel

Edited by xFabel
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...