Added some adminlevels, added admin level to /o

This commit is contained in:
Lennart Kampshoff
2018-10-28 02:08:25 +01:00
parent 2a39f71944
commit 30ef9b177d
3 changed files with 19 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ namespace reallife_gamemode.Server.Commands
return; return;
} }
string publicMessage = "~b~(( " + player.Name + ": " + message + " ))"; string publicMessage = "~b~(( " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + message + " ))";
NAPI.Chat.SendChatMessageToAll(publicMessage); NAPI.Chat.SendChatMessageToAll(publicMessage);
} }
#endregion #endregion

View File

@@ -8,12 +8,22 @@ namespace reallife_gamemode.Server.Extensions
{ {
public static class AdminLevelExtension public static class AdminLevelExtension
{ {
public static string ToString(this AdminLevel level) public static string GetName(this AdminLevel level)
{ {
switch(level) switch(level)
{ {
case SUPPORTER: case SUPPORTER:
return "Supporter"; return "Supporter";
case ADMIN:
case ADMIN2:
case ADMIN3:
return "Admin";
case HEADADMIN:
return "Headadmin";
case PROJEKTLEITUNG:
return "Projektleiter";
default:
return "Spieler";
} }
} }
} }

View File

@@ -12,8 +12,12 @@ namespace reallife_gamemode.Server.Util
{ {
public enum AdminLevel : int public enum AdminLevel : int
{ {
PLAYER, PLAYER = 0,
SUPPORTER, SUPPORTER = 1,
ADMIN ADMIN = 2,
ADMIN2 = 3,
ADMIN3 = 4,
HEADADMIN = 1337,
PROJEKTLEITUNG = 1338
} }
} }