/// <summary> /// Set the permissions for this client. /// </summary> /// <param name="dict"></param> public static void SetPermissions(dynamic dict) { // Loop through the dynamic object and get the keys and values. foreach (dynamic permission in dict) { // Add the new permission to the dictionary. PermissionsManager.SetPermission(permission.Key.ToString(), permission.Value); } Cf.Log(JsonConvert.SerializeObject(PermissionsManager.Permissions).ToString()); permissionsSetupDone = true; }
/// <summary> /// Set the permissions for this client. /// </summary> /// <param name="dict"></param> public static void SetPermissions(dynamic dict) { // Loop through the dynamic object and get the keys and values. foreach (dynamic permission in dict) { if (DebugMode) { Cf.Log($"{permission.Key.ToString()} = {permission.Value.ToString()}"); } // Add the new permission to the dictionary. PermissionsManager.SetPermission(permission.Key.ToString(), permission.Value); } permissionsSetupDone = true; }
/// <summary> /// Set the permissions for this client. /// </summary> /// <param name="dict"></param> public static void SetPermissions(dynamic dict) { // Loop through the dynamic object and get the keys and values. foreach (dynamic permission in dict) { // Add the new permission to the dictionary. PermissionsManager.SetPermission(permission.Key.ToString(), permission.Value); } Cf.Log(JsonConvert.SerializeObject(PermissionsManager.Permissions).ToString()); //permissionsSetupDone = true; VehicleSpawner.allowedCategories = new List <bool>() { Cf.IsAllowed(Permission.VSCompacts), Cf.IsAllowed(Permission.VSSedans), Cf.IsAllowed(Permission.VSSUVs), Cf.IsAllowed(Permission.VSCoupes), Cf.IsAllowed(Permission.VSMuscle), Cf.IsAllowed(Permission.VSSportsClassic), Cf.IsAllowed(Permission.VSSports), Cf.IsAllowed(Permission.VSSuper), Cf.IsAllowed(Permission.VSMotorcycles), Cf.IsAllowed(Permission.VSOffRoad), Cf.IsAllowed(Permission.VSIndustrial), Cf.IsAllowed(Permission.VSUtility), Cf.IsAllowed(Permission.VSVans), Cf.IsAllowed(Permission.VSCycles), Cf.IsAllowed(Permission.VSBoats), Cf.IsAllowed(Permission.VSHelicopters), Cf.IsAllowed(Permission.VSPlanes), Cf.IsAllowed(Permission.VSService), Cf.IsAllowed(Permission.VSEmergency), Cf.IsAllowed(Permission.VSMilitary), Cf.IsAllowed(Permission.VSCommercial), Cf.IsAllowed(Permission.VSTrains), }; }