Only if you are in/or able to be in posession of the keys. Me and some buddies were at a party in an apartment complex one night and we were all drunk so we just stayed in the car in the pool area instead of driving drunk since it was already really late. Well that morning a cop knocks on the glass and gives us a hard time saying we were trespassing and he could still give my buddy a DUI cause he had the keys in his pocket. He even said the keys could be in the trunk and still charge us. How that would have held up in court idk but its still the fact of jail time and shit.