Cleaned up admin commands

This commit is contained in:
hydrant
2018-10-28 17:37:22 +01:00
parent 580c34f32f
commit d2c52661fc

View File

@@ -39,6 +39,7 @@ namespace reallife_gamemode.Server.Commands
string publicMessage = "~b~(( " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + message + " ))"; string publicMessage = "~b~(( " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + message + " ))";
NAPI.Chat.SendChatMessageToAll(publicMessage); NAPI.Chat.SendChatMessageToAll(publicMessage);
} }
[Command("team", "~m~Benutzung: ~s~/team")] [Command("team", "~m~Benutzung: ~s~/team")]
public void CmdAdminTeam(Client player) public void CmdAdminTeam(Client player)
{ {
@@ -59,6 +60,7 @@ namespace reallife_gamemode.Server.Commands
} }
} }
} }
[Command("dimension")] [Command("dimension")]
public void CmdAdminDimension(Client player) public void CmdAdminDimension(Client player)
{ {
@@ -69,6 +71,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage("Deine Dimension ist ~g~" + player.Dimension); player.SendChatMessage("Deine Dimension ist ~g~" + player.Dimension);
} }
[Command("to", "~m~Benutzung: ~s~/to [Name]")] [Command("to", "~m~Benutzung: ~s~/to [Name]")]
public void CmdAdminGoto(Client player, string name) public void CmdAdminGoto(Client player, string name)
{ {
@@ -89,6 +92,7 @@ namespace reallife_gamemode.Server.Commands
if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = target.Position; if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = target.Position;
else player.Position = target.Position; else player.Position = target.Position;
} }
[Command("position")] [Command("position")]
public void CmdAdminShowPos(Client player) public void CmdAdminShowPos(Client player)
{ {
@@ -100,6 +104,7 @@ namespace reallife_gamemode.Server.Commands
player.SendChatMessage("Position: X Y Z: " + player.Position); player.SendChatMessage("Position: X Y Z: " + player.Position);
} }
[Command("gh", "~m~Benutzung: ~s~/gh [Name]")] [Command("gh", "~m~Benutzung: ~s~/gh [Name]")]
public void CmdAdminGethere(Client player, string name) public void CmdAdminGethere(Client player, string name)
{ {
@@ -121,6 +126,7 @@ namespace reallife_gamemode.Server.Commands
else target.Position = player.Position; else target.Position = player.Position;
target.SendChatMessage("Du wurdest von " + player.Name + " teleportiert."); target.SendChatMessage("Du wurdest von " + player.Name + " teleportiert.");
} }
[Command("aw", "~m~Benutzung: ~s~/aw [Spieler] [Nachricht]", GreedyArg = true)] [Command("aw", "~m~Benutzung: ~s~/aw [Spieler] [Nachricht]", GreedyArg = true)]
public void CmdAdminMsg(Client player, string name, string msg) public void CmdAdminMsg(Client player, string name, string msg)
{ {
@@ -146,6 +152,7 @@ namespace reallife_gamemode.Server.Commands
string Message = "~y~PM von " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + msg + ""; string Message = "~y~PM von " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + msg + "";
NAPI.Chat.SendChatMessageToPlayer(target, Message); NAPI.Chat.SendChatMessageToPlayer(target, Message);
} }
[Command("factionlist", "~m~Benutzung: ~s~/factionlist")] [Command("factionlist", "~m~Benutzung: ~s~/factionlist")]
public void CmdAdminFactionlist(Client player) public void CmdAdminFactionlist(Client player)
{ {
@@ -179,6 +186,7 @@ namespace reallife_gamemode.Server.Commands
ChatService.BroadcastAdmin("~r~[ADMINCHAT]: " + player.GetUser().AdminLevel.GetName() + " " + player.Name + "~w~: " + message, AdminLevel.ADMIN); ChatService.BroadcastAdmin("~r~[ADMINCHAT]: " + player.GetUser().AdminLevel.GetName() + " " + player.Name + "~w~: " + message, AdminLevel.ADMIN);
} }
[Command("freeze", "~m~Benutzung: ~s~/freeze [Spieler]")] [Command("freeze", "~m~Benutzung: ~s~/freeze [Spieler]")]
public void CmdAdminFreeze(Client player, string targetname) public void CmdAdminFreeze(Client player, string targetname)
{ {
@@ -198,6 +206,7 @@ namespace reallife_gamemode.Server.Commands
target.SendChatMessage("Du wurdest von ~y~" + player.Name + "~s~ gefreezed."); target.SendChatMessage("Du wurdest von ~y~" + player.Name + "~s~ gefreezed.");
target.Freeze(true); target.Freeze(true);
} }
[Command("unfreeze", "~m~Benutzung: ~s~/unfreeze [Spieler]")] [Command("unfreeze", "~m~Benutzung: ~s~/unfreeze [Spieler]")]
public void CmdAdminUnfreeze(Client player, string targetname) public void CmdAdminUnfreeze(Client player, string targetname)
{ {
@@ -217,6 +226,7 @@ namespace reallife_gamemode.Server.Commands
target.SendChatMessage("Du wurdest von ~y~" + player.Name + "~s~ unfreezed."); target.SendChatMessage("Du wurdest von ~y~" + player.Name + "~s~ unfreezed.");
target.Freeze(false); target.Freeze(false);
} }
[Command("gotolist")] //TODO Als Browser anzeigeN?? [Command("gotolist")] //TODO Als Browser anzeigeN??
public void CmdAdminGotoList(Client player) public void CmdAdminGotoList(Client player)
{ {
@@ -235,6 +245,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage(gotoString); player.SendChatMessage(gotoString);
} }
[Command("mark")] [Command("mark")]
public void CmdAdminMark(Client player) public void CmdAdminMark(Client player)
{ {
@@ -246,6 +257,7 @@ namespace reallife_gamemode.Server.Commands
player.SetData("mark", player.Position); player.SetData("mark", player.Position);
player.SendNotification("~y~Mark ~s~gespeichert", true); player.SendNotification("~y~Mark ~s~gespeichert", true);
} }
[Command("gotomark")] [Command("gotomark")]
public void CmdAdminGotoMark(Client player) public void CmdAdminGotoMark(Client player)
{ {
@@ -264,6 +276,7 @@ namespace reallife_gamemode.Server.Commands
if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = player.GetData("mark"); if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = player.GetData("mark");
else player.Position = player.GetData("mark"); else player.Position = player.GetData("mark");
} }
[Command("clearchat", "~m~Benutzung: ~s~/clearchat")] [Command("clearchat", "~m~Benutzung: ~s~/clearchat")]
public void CmdAdminClearchat(Client player) public void CmdAdminClearchat(Client player)
{ {
@@ -390,6 +403,7 @@ namespace reallife_gamemode.Server.Commands
else player.Position = playerPosition; else player.Position = playerPosition;
} }
} }
[Command("setdimension", "~m~Benutzung: ~s~/setdimension [Spieler] [Dimension]")] [Command("setdimension", "~m~Benutzung: ~s~/setdimension [Spieler] [Dimension]")]
public void CmdAdminSetDimension(Client player, string targetname, uint dimension) public void CmdAdminSetDimension(Client player, string targetname, uint dimension)
{ {
@@ -409,6 +423,7 @@ namespace reallife_gamemode.Server.Commands
target.SendChatMessage("~s~Deine Dimension wurde auf ~g~" + dimension + "~s~ geändert."); target.SendChatMessage("~s~Deine Dimension wurde auf ~g~" + dimension + "~s~ geändert.");
player.SendChatMessage("~s~Die Dimension von ~y~" + target.Name + " ~s~wurde auf ~g~" + dimension + "~s~ geändert."); player.SendChatMessage("~s~Die Dimension von ~y~" + target.Name + " ~s~wurde auf ~g~" + dimension + "~s~ geändert.");
} }
[Command("kick", "~m~Benutzung: ~s~/kick [Player] [Grund]")] [Command("kick", "~m~Benutzung: ~s~/kick [Player] [Grund]")]
public void CmdAdminKick(Client player, string targetname, string reason) public void CmdAdminKick(Client player, string targetname, string reason)
{ {
@@ -432,6 +447,7 @@ namespace reallife_gamemode.Server.Commands
target.Kick(); target.Kick();
NAPI.Chat.SendChatMessageToAll("~y~INFO: ~w~" + targetPlayername + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason); NAPI.Chat.SendChatMessageToAll("~y~INFO: ~w~" + targetPlayername + " wurde von " + player.GetUser().AdminLevel.GetName() + " " + adminPlayername + " gekickt: " + reason);
} }
[Command("ip", "~m~Benutzung: ~s~/ip [Spieler]")] [Command("ip", "~m~Benutzung: ~s~/ip [Spieler]")]
public void CmdAdminIp(Client player, string targetname) public void CmdAdminIp(Client player, string targetname)
{ {
@@ -449,6 +465,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage("IP von ~y~" + NAPI.Player.GetPlayerName(target) + ": ~g~" + target.Address); player.SendChatMessage("IP von ~y~" + NAPI.Player.GetPlayerName(target) + ": ~g~" + target.Address);
} }
[Command("ban", "~m~Benutzung: ~s~/ban [User] [Zeit in Minuten(0 für Permanent)] [Grund] ", GreedyArg = true)] [Command("ban", "~m~Benutzung: ~s~/ban [User] [Zeit in Minuten(0 für Permanent)] [Grund] ", GreedyArg = true)]
public void CmdAdminBan(Client admin, string user, int mins, string reason) public void CmdAdminBan(Client admin, string user, int mins, string reason)
{ {
@@ -468,6 +485,7 @@ namespace reallife_gamemode.Server.Commands
target.GetUser().BanPlayer(admin, reason, mins); target.GetUser().BanPlayer(admin, reason, mins);
} }
[Command("unban", "~m~Benutzung: ~s~/unban [Name] ", GreedyArg = true)] [Command("unban", "~m~Benutzung: ~s~/unban [Name] ", GreedyArg = true)]
public void CmdAdminUnban(Client admin, string userName) public void CmdAdminUnban(Client admin, string userName)
{ {
@@ -520,6 +538,7 @@ namespace reallife_gamemode.Server.Commands
string message = "~y~INFO: ~s~Der Spieler ~y~" + user.Name + " ~s~wurde von ~y~" + admin.Name + " ~s~entbannt."; string message = "~y~INFO: ~s~Der Spieler ~y~" + user.Name + " ~s~wurde von ~y~" + admin.Name + " ~s~entbannt.";
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN); ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
} }
[Command("goto", "~m~Benutzung: ~s~/goto [Ort]")] [Command("goto", "~m~Benutzung: ~s~/goto [Ort]")]
public void CmdAdminGotoPoint(Client player, string location) public void CmdAdminGotoPoint(Client player, string location)
{ {
@@ -543,6 +562,7 @@ namespace reallife_gamemode.Server.Commands
} }
} }
[Command("spec", "~m~Benutzung: ~s~/spec [Player]")] [Command("spec", "~m~Benutzung: ~s~/spec [Player]")]
public void CmdAdminSpectate(Client player, string name) public void CmdAdminSpectate(Client player, string name)
{ {
@@ -577,6 +597,7 @@ namespace reallife_gamemode.Server.Commands
} }
} }
[Command("slap", "~m~Benutzung: ~s~/slap [Spieler] (Höhe)")] [Command("slap", "~m~Benutzung: ~s~/slap [Spieler] (Höhe)")]
public void CmdAdminSlap(Client player, string name, int wert = 5) public void CmdAdminSlap(Client player, string name, int wert = 5)
{ {
@@ -596,6 +617,7 @@ namespace reallife_gamemode.Server.Commands
target.Position = new Vector3(target.Position.X, target.Position.Y, target.Position.Z + wert); target.Position = new Vector3(target.Position.X, target.Position.Y, target.Position.Z + wert);
player.SendChatMessage("Du hast " + target.Name + " geslappt. Höhe: " + wert + ""); player.SendChatMessage("Du hast " + target.Name + " geslappt. Höhe: " + wert + "");
} }
[Command("takeweapon", "~m~Benutzung: ~s~/takeweapon [Spieler]")] [Command("takeweapon", "~m~Benutzung: ~s~/takeweapon [Spieler]")]
public void CmdAdminTakeWeapon(Client player, string name) public void CmdAdminTakeWeapon(Client player, string name)
{ {
@@ -638,6 +660,7 @@ namespace reallife_gamemode.Server.Commands
target.SendChatMessage("~b~Deine HP wurden von " + player.Name + " auf " + hp + " gesetzt."); target.SendChatMessage("~b~Deine HP wurden von " + player.Name + " auf " + hp + " gesetzt.");
player.SendChatMessage("~b~Du hast die HP von " + target.Name + " auf " + hp + " gesetzt."); player.SendChatMessage("~b~Du hast die HP von " + target.Name + " auf " + hp + " gesetzt.");
} }
[Command("clothes", "~m~Benutzung: ~s~/clothes [Spieler] [Slot] [Component ID] (Textur)")] [Command("clothes", "~m~Benutzung: ~s~/clothes [Spieler] [Slot] [Component ID] (Textur)")]
public void CmdAdminClothes(Client player, string name, int slot, int component, int texture = 0) public void CmdAdminClothes(Client player, string name, int slot, int component, int texture = 0)
{ {
@@ -656,6 +679,7 @@ namespace reallife_gamemode.Server.Commands
target.SetClothes(slot, component, texture); target.SetClothes(slot, component, texture);
} }
[Command("props", "~m~Benutzung: ~s~/props [Spieler] [Slot] [Component ID] (Textur)")] [Command("props", "~m~Benutzung: ~s~/props [Spieler] [Slot] [Component ID] (Textur)")]
public void CmdAdminProps(Client player, string name, int slot, int component, int texture = 0) public void CmdAdminProps(Client player, string name, int slot, int component, int texture = 0)
{ {
@@ -674,6 +698,7 @@ namespace reallife_gamemode.Server.Commands
target.SetAccessories(slot, component, texture); target.SetAccessories(slot, component, texture);
} }
[Command("gotox", "~m~Benutzung: ~s~/gotox [X] [Y] [Z]")] [Command("gotox", "~m~Benutzung: ~s~/gotox [X] [Y] [Z]")]
public void CmdAdminGotoxyz(Client player, float x, float y, float z) public void CmdAdminGotoxyz(Client player, float x, float y, float z)
{ {
@@ -685,7 +710,6 @@ namespace reallife_gamemode.Server.Commands
if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = new Vector3(x, y, z); if (player.IsInVehicle && player.VehicleSeat == -1) player.Vehicle.Position = new Vector3(x, y, z);
else player.Position = new Vector3(x, y, z); else player.Position = new Vector3(x, y, z);
} }
#endregion #endregion
@@ -725,6 +749,7 @@ namespace reallife_gamemode.Server.Commands
player.SetIntoVehicle(v.Handle, -1); player.SetIntoVehicle(v.Handle, -1);
} }
[Command("fv")] [Command("fv")]
public void CmdAdminFixveh(Client player) public void CmdAdminFixveh(Client player)
{ {
@@ -741,6 +766,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.Vehicle.Repair(); player.Vehicle.Repair();
} }
[Command("vdestroy")] [Command("vdestroy")]
public void CmdAdminDelveh(Client player) public void CmdAdminDelveh(Client player)
{ {
@@ -761,6 +787,7 @@ namespace reallife_gamemode.Server.Commands
player.Vehicle.Delete(); player.Vehicle.Delete();
} }
[Command("vcolor", "~m~Benutzung: ~s~/vcolor [Farb-ID1] [Farb-ID2]")] [Command("vcolor", "~m~Benutzung: ~s~/vcolor [Farb-ID1] [Farb-ID2]")]
public void CmdAdminColor(Client player, int color1, int color2) public void CmdAdminColor(Client player, int color1, int color2)
{ {
@@ -780,6 +807,7 @@ namespace reallife_gamemode.Server.Commands
player.Vehicle.SecondaryColor = color2; player.Vehicle.SecondaryColor = color2;
player.SendChatMessage("Farb-ID1 " + color1 + ", Farb-ID2 " + color2 + ""); player.SendChatMessage("Farb-ID1 " + color1 + ", Farb-ID2 " + color2 + "");
} }
[Command("giveweapon", "~m~Benutzung: ~s~/giveweapon [Spieler] [Waffe] [Munition]")] [Command("giveweapon", "~m~Benutzung: ~s~/giveweapon [Spieler] [Waffe] [Munition]")]
public void CmdAdminGiveweapon(Client player, string name, string weapon, int ammo) public void CmdAdminGiveweapon(Client player, string name, string weapon, int ammo)
{ {
@@ -814,6 +842,7 @@ namespace reallife_gamemode.Server.Commands
target.SendChatMessage("~b~Du hast von " + player.Name + " eine/n " + wHash + " mit einer Munition von " + ammo + " erhalten."); target.SendChatMessage("~b~Du hast von " + player.Name + " eine/n " + wHash + " mit einer Munition von " + ammo + " erhalten.");
player.SendChatMessage("~b~Du hast " + target.Name + " eine/n " + wHash + " mit einer Munition von " + ammo + " gegeben."); player.SendChatMessage("~b~Du hast " + target.Name + " eine/n " + wHash + " mit einer Munition von " + ammo + " gegeben.");
} }
[Command("arevive", "~m~Benutzung: ~s~/arevive [Spieler]")] [Command("arevive", "~m~Benutzung: ~s~/arevive [Spieler]")]
public void CmdAdminRevive(Client player, string name) public void CmdAdminRevive(Client player, string name)
{ {
@@ -840,6 +869,7 @@ namespace reallife_gamemode.Server.Commands
NAPI.Player.SpawnPlayer(target, target.Position); NAPI.Player.SpawnPlayer(target, target.Position);
target.Health = 100; target.Health = 100;
} }
[Command("setarmor", "~m~Benutzung: ~s~/setarmor [Spieler] (Armor)")] [Command("setarmor", "~m~Benutzung: ~s~/setarmor [Spieler] (Armor)")]
public void CmdAdminSetArmor(Client player, string name, int armor = 100) public void CmdAdminSetArmor(Client player, string name, int armor = 100)
{ {
@@ -883,8 +913,9 @@ namespace reallife_gamemode.Server.Commands
var skin = NAPI.Util.PedNameToModel(Skin); var skin = NAPI.Util.PedNameToModel(Skin);
target.SendChatMessage("~b~Dein Skin wurde von " + player.Name + " zu " + skin + " gesetzt."); target.SendChatMessage("~b~Dein Skin wurde von " + player.Name + " zu " + skin + " gesetzt.");
player.SendChatMessage("~b~Du hast den Skin von " + target.Name + " zu " + skin + " gesetzt."); player.SendChatMessage("~b~Du hast den Skin von " + target.Name + " zu " + skin + " gesetzt.");
target.SetSkin(NAPI.Util.PedNameToModel(Skin)); target.SetSkin(skin);
} }
[Command("vmod", "~m~Benutzung: ~s~/vmod [Slot] [Mod ID]")] [Command("vmod", "~m~Benutzung: ~s~/vmod [Slot] [Mod ID]")]
public void CmdAdminVmod(Client player, int slot, int mod) public void CmdAdminVmod(Client player, int slot, int mod)
{ {
@@ -903,6 +934,7 @@ namespace reallife_gamemode.Server.Commands
if (mod == -1) player.Vehicle.RemoveMod(slot); if (mod == -1) player.Vehicle.RemoveMod(slot);
else player.Vehicle.SetMod(slot, mod); else player.Vehicle.SetMod(slot, mod);
} }
[Command("aneon", "~m~Benutzung: ~s~/aneon [R][G][B]")] [Command("aneon", "~m~Benutzung: ~s~/aneon [R][G][B]")]
public void CmdAdminNeon(Client player, int r, int g, int b) public void CmdAdminNeon(Client player, int r, int g, int b)
{ {
@@ -941,6 +973,7 @@ namespace reallife_gamemode.Server.Commands
Vehicle veh = NAPI.Player.GetPlayerVehicle(player); Vehicle veh = NAPI.Player.GetPlayerVehicle(player);
NAPI.Vehicle.SetVehicleTyreSmokeColor(veh, new Color(r, g, b)); NAPI.Vehicle.SetVehicleTyreSmokeColor(veh, new Color(r, g, b));
} }
[Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")] [Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")]
public void CmdAdminIpl(Client player, string option, string name) public void CmdAdminIpl(Client player, string option, string name)
{ {
@@ -967,6 +1000,7 @@ namespace reallife_gamemode.Server.Commands
player.SendChatMessage("~m~Benutzung: ~s~/ipl [Load / Remove] [Name]"); player.SendChatMessage("~m~Benutzung: ~s~/ipl [Load / Remove] [Name]");
} }
} }
[Command("rsethp", "~m~Benutzung: ~s~/rsethp [Radius] (Leben)")] [Command("rsethp", "~m~Benutzung: ~s~/rsethp [Radius] (Leben)")]
public void CmdAdminRangeSetHP(Client player, float radius, int hp = 100) public void CmdAdminRangeSetHP(Client player, float radius, int hp = 100)
{ {
@@ -1017,6 +1051,7 @@ namespace reallife_gamemode.Server.Commands
managedClient.Health = 100; managedClient.Health = 100;
} }
} }
[Command("rsetarmor", "~m~Benutzung: ~s~/rsetarmor [Radius] (Armor)")] [Command("rsetarmor", "~m~Benutzung: ~s~/rsetarmor [Radius] (Armor)")]
public void CmdAdminRangeSetArmor(Client player, float radius, int Armor = 100) public void CmdAdminRangeSetArmor(Client player, float radius, int Armor = 100)
{ {
@@ -1035,6 +1070,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage("~b~Die Rüstung von " + peopleInRange.Count + " Spielern wurde auf " + Armor + " gesetzt."); player.SendChatMessage("~b~Die Rüstung von " + peopleInRange.Count + " Spielern wurde auf " + Armor + " gesetzt.");
} }
[Command("rgiveweapon", "~m~Benutzung: ~s~/rgiveweapon [Radius] [Waffe] [Munition]")] [Command("rgiveweapon", "~m~Benutzung: ~s~/rgiveweapon [Radius] [Waffe] [Munition]")]
public void CmdAdminRangeGiveWeapon(Client player, float radius, string weapon, int munition) public void CmdAdminRangeGiveWeapon(Client player, float radius, string weapon, int munition)
{ {
@@ -1062,6 +1098,7 @@ namespace reallife_gamemode.Server.Commands
} }
player.SendChatMessage("~b~Du hast " + peopleInRange.Count + " Spielern eine " + weapon + " mit " + munition + " Munition gegeben"); player.SendChatMessage("~b~Du hast " + peopleInRange.Count + " Spielern eine " + weapon + " mit " + munition + " Munition gegeben");
} }
[Command("time", "~m~Benutzung: ~s~/time [Stunde] (Minuten) (Sekunden)")] [Command("time", "~m~Benutzung: ~s~/time [Stunde] (Minuten) (Sekunden)")]
public void CmdAdminSetTime(Client player, int hour, int min = 0, int sec = 0) public void CmdAdminSetTime(Client player, int hour, int min = 0, int sec = 0)
{ {
@@ -1077,6 +1114,7 @@ namespace reallife_gamemode.Server.Commands
return; return;
} }
[Command("ainvite", "~m~Benutzung: ~s~/ainvite [Name] [Fraktion]")] [Command("ainvite", "~m~Benutzung: ~s~/ainvite [Name] [Fraktion]")]
public void CmdAdminAinvite(Client player, string name, int faction) public void CmdAdminAinvite(Client player, string name, int faction)
{ {
@@ -1127,6 +1165,7 @@ namespace reallife_gamemode.Server.Commands
dbContext.SaveChanges(); dbContext.SaveChanges();
} }
} }
[Command("makeleader", "~m~Benutzung: ~s~/makeleader [Name] [Fraktion]")] [Command("makeleader", "~m~Benutzung: ~s~/makeleader [Name] [Fraktion]")]
public void CmdAdminMakeleader(Client player, string name, int faction) public void CmdAdminMakeleader(Client player, string name, int faction)
{ {
@@ -1166,6 +1205,7 @@ namespace reallife_gamemode.Server.Commands
dbContext.SaveChanges(); dbContext.SaveChanges();
} }
} }
[Command("save", "~m~Benutzung: ~s~/save [Typ = ~g~Blip, Goto (X), ~r~Marker, Ped, Pickup, TextLabel, ~g~Vehicle, FVehicle, SVehicle] (Beschreibung) = (X)")] [Command("save", "~m~Benutzung: ~s~/save [Typ = ~g~Blip, Goto (X), ~r~Marker, Ped, Pickup, TextLabel, ~g~Vehicle, FVehicle, SVehicle] (Beschreibung) = (X)")]
public void CmdAdminSave(Client player, string typ, string description = null) public void CmdAdminSave(Client player, string typ, string description = null)
{ {
@@ -1249,6 +1289,7 @@ namespace reallife_gamemode.Server.Commands
} }
} }
#region loadCommand #region loadCommand
[Command("load", "~m~Benutzung: ~s~/load [Typ = OnlineBunkers, ArcadiusBusinessCentre, MazeBankBuilding, LomBank, MazeBankWest, ClubWareHouse, SpecialLocations, GRHYacht, DHYacht, PYacht, AircraftCarrier, BridgeTC, BridgeTN, NorthYankton, ONeilsFarmB, ONeilsFarm, Morgue")] [Command("load", "~m~Benutzung: ~s~/load [Typ = OnlineBunkers, ArcadiusBusinessCentre, MazeBankBuilding, LomBank, MazeBankWest, ClubWareHouse, SpecialLocations, GRHYacht, DHYacht, PYacht, AircraftCarrier, BridgeTC, BridgeTN, NorthYankton, ONeilsFarmB, ONeilsFarm, Morgue")]
public void CmdAdminloadlocation(Client player, string typ) public void CmdAdminloadlocation(Client player, string typ)
@@ -1475,6 +1516,7 @@ namespace reallife_gamemode.Server.Commands
} }
#endregion #endregion
// //
[Command("managefactionranks", "~m~Benutzung: ~s~/managefactionranks [Fraktions-ID]")] [Command("managefactionranks", "~m~Benutzung: ~s~/managefactionranks [Fraktions-ID]")]
public void CmdFactionManageFactionRanks(Client player, int factionID) public void CmdFactionManageFactionRanks(Client player, int factionID)
@@ -1774,31 +1816,5 @@ namespace reallife_gamemode.Server.Commands
{ {
SaveManager.SaveAllOnSave(); SaveManager.SaveAllOnSave();
} }
}
/*
[Command("restart")]
public void CmdAdminRestart(Client player)
{
if (ClientExtension.IsLoggedIn(player) == false)
{
ChatService.PlayerNotLoggedIn(player);
return;
}
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
{
ChatService.NotAuthorized(player);
return;
}
var users = NAPI.Pools.GetAllPlayers();
foreach(Client user in users)
{
user.SendChatMessage("~r~Server startet neu.~s~ Bitte verbinde dich über ~y~F1~s~ neu.");
user.Kick();
}
NAPI.Resource.StopResource("reallife-gamemode");
}*/
}
} }