private bool VerifyCarIsNotDead(IPlayer player, ModularCar car) { if (!car.IsDead()) { return(true); } ReplyToPlayer(player, "Error.CarDead"); return(false); }
public bool CanHaveALock() { object obj = Interface.CallHook("OnVehicleLockableCheck", this); if (obj != null) { if (!(obj is bool)) { return(false); } return((bool)obj); } if (!owner.IsDead()) { return(owner.HasDriverMountPoints()); } return(false); }
private CodeLock API_DeployCodeLock(ModularCar car, BasePlayer player) { if (car == null || car.IsDead() || DeployWasBlocked(car, player) || GetCarCodeLock(car) != null) { return(null); } if (player != null) { return(DeployCodeLockForPlayer(car, player, isFree: true)); } var driverModule = FindFirstDriverModule(car); if (driverModule == null) { return(null); } return(DeployCodeLock(car, driverModule)); }