Look at fpscontroller.lua. You will find example there.
--Use objects
if KeyHit(KEY_E)==1 then
pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,2.0),0,0)
if pick~=nil then
repeat
if pick.entity:GetClass()==ENTITY_MODEL then
break
end
pick.entity=pick.entity.parent
until pick.entity==nil
if pick.entity~=nil then
pick.entity:SendMessage("use",controller,0)
end
end
end