Would this work?


#1

Just wondering, would this work or would I have to do each vehicle in a array?

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)
		local currentVehicle = GetVehiclePedIsIn(GetPlayerPed(-1), false)
		while currentVehicle == "VC_SUPER" or "VC_SPORT" do
			Citizen.Wait(0)
			Do something cool
		end
	end
end)

#2

That gets the vehicle itself, not the vehicle class like “SUPER” or "SPORT"
Take a look at this:
http://runtime.fivem.net/doc/reference.html#_0x29439776AAA00A62

This wouldn’t work, if you want to check for both of those classes, while keeping the change from above in mind, try this:
while (currentVehicle == 7) or (currentVehicle == 6) do I’ve separated each check inside it’s own ( ) so you can see/understand it better :wink: