No, I only want it to run for players if in a car or not. The problem is that otherwise it is checking loads of player only things on the cars that get spawned within the col and cars that the player drives into the col that give warnings. I think I was right at first and must have just made a small mistake somewhere.
So this:
function aFunction( element,dim )
if getElementType ( element ) == "player" then -- check if player hit colshape
--Do something
end
end
addEventHandler ( "onColShapeLeave", aCol, aFunction )
Will only run the code if the element hitting the col is a player and it will work if he is in a car as well?
Thanks for the help guys, I really appreciate it.