if I understood you right.
protectVehicles = { [470]=true }
function enterVehicle ( player, seat, jacked )
if ( protectVehicles[getElementModel(source)] ) and getTeamName(getPlayerTeam(player)) ~= "Military" and getTeamName(getPlayerTeam(player)) ~= "Naval" and ( seat == 0 ) then
cancelEvent()
outputChatBox ("You cannot enter this vehicle.", player)
end
end
addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ))