diff --git a/automobiles_lib/init.lua b/automobiles_lib/init.lua index 62129f4..de96bea 100755 --- a/automobiles_lib/init.lua +++ b/automobiles_lib/init.lua @@ -186,11 +186,13 @@ function automobiles_lib.dettach_pax(self, player) end -- detach the player - player:set_detach() - player_api.player_attached[name] = nil - player_api.set_animation(player, "stand") - player:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0}) - --remove_physics_override(player, {speed=1,gravity=1,jump=1}) + if player then + player:set_detach() + player_api.player_attached[name] = nil + player_api.set_animation(player, "stand") + player:set_eye_offset({x=0,y=0,z=0},{x=0,y=0,z=0}) + --remove_physics_override(player, {speed=1,gravity=1,jump=1}) + end end function automobiles_lib.get_gauge_angle(value, initial_angle)