+ if(autocvar_g_vehicles_enter)
+ if(time > self.last_vehiclecheck)
+ if(IS_PLAYER(self))
+ if(!gameover)
+ if(!self.frozen)
+ if(!self.vehicle)
+ if(self.deadflag == DEAD_NO)
+ {
+ entity veh;
+ for(veh = world; (veh = findflags(veh, vehicle_flags, VHF_ISVEHICLE)); )
+ if(vlen(veh.origin - self.origin) < autocvar_g_vehicles_enter_radius)
+ if(veh.deadflag == DEAD_NO)
+ if(veh.takedamage != DAMAGE_NO)
+ if((veh.vehicle_flags & VHF_MULTISLOT) && SAME_TEAM(veh.owner, self))
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER_GUNNER);
+ else if(!veh.owner)
+ if(!veh.team || SAME_TEAM(self, veh))
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER);
+ else if(autocvar_g_vehicles_steal)
+ Send_Notification(NOTIF_ONE, self, MSG_CENTER, CENTER_VEHICLE_ENTER_STEAL);
+
+ self.last_vehiclecheck = time + 1;
+ }
+