Exemple #1
0
        /// <summary>
        /// Gets a list of scenarios that currently active in this ped
        /// </summary>
        /// <param name="ped"></param>
        /// <returns></returns>
        public static List <Scenario> GetActiveScenarios(this Ped ped)
        {
            var scenarios = Enum.GetValues(typeof(Scenario)).Cast <Scenario>();

            return(scenarios.Where(x => NativeWrappers.IsPedUsingScenario(ped, x.ToString())).ToList());
        }
Exemple #2
0
 /// <summary>
 /// Checks whether this ped is playing the specified scenario
 /// </summary>
 /// <param name="ped">The target <see cref="Ped"/></param>
 /// <param name="scenario">The scenario that want to be check</param>
 /// <returns><c>true</c> if this ped is playing the given <paramref name="scenario"/>, otherwise <c>false</c></returns>
 public static bool IsUsingScenario(this Ped ped, Scenario scenario) => NativeWrappers.IsPedUsingScenario(ped, scenario.ToString());