/// <summary> /// Sets whether the ped is over the alcohol limit or not. /// </summary> /// <param name="ped"></param> /// <param name="OverTheAlcoholLimit">If true, sets ped as over the limit. If false, sets ped as under the limit.</param> public static void SetPedAlcoholLevel(Ped ped, bool OverTheAlcoholLimit) { if (OverTheAlcoholLimit) { Breathalyzer.SetPedAlcoholLevels(ped, Breathalyzer.GetRandomOverTheLimitAlcoholLevel()); } else { Breathalyzer.SetPedAlcoholLevels(ped, Breathalyzer.GetRandomUnderTheLimitAlcoholLevel()); } }
/// <summary> /// Returns a random alcohol level that's under the limit. Higher alcohol limits have a lower chance of being returned. /// </summary> /// <returns></returns> public static AlcoholLevels GetRandomUnderTheLimitAlcoholLevel() { return(Breathalyzer.GetRandomUnderTheLimitAlcoholLevel()); }