Hi,
onClientPlayerVehicleEnter first paramater is theVehicle element you entered
addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(theVehicle)
You can get the model id of this vehicle using getElementModel(theVehicle) and check if the vehicule you entered is a valid model
It is faster to use a table with key as id of the vehicle and set a boolean true as value because it allows you to check by calling the table with the id of vehicule you entered as key instead of checking with a loop.
validModels = {
[124] = true,
[126] = true,
-- etc
}
addEventHandler("onClientPlayerVehicleEnter", localPlayer, function(theVehicle)
local id = getElementModel(theVehicle)
if (validModels[id]) then
-- your stuff
end
end)
Cya,