Add /gotoxyz Command, Add /ipl Command to manage IPLs
This commit is contained in:
@@ -105,5 +105,44 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("gotoxyz", "~m~Benutzung: ~s~/gotoxyz [X] [Y] [Z]")]
|
||||||
|
public void CmdAdminGotoxyz(Client player, float x, float y, float z)
|
||||||
|
{
|
||||||
|
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||||
|
{
|
||||||
|
ChatService.NotAuthorized(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.Position = new Vector3(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Command("ipl", "~m~Benutzung: ~s~/ipl [Load / Remove] [Name]")]
|
||||||
|
public void CmdAdminIpl(Client player, string option, string name)
|
||||||
|
{
|
||||||
|
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||||
|
{
|
||||||
|
ChatService.NotAuthorized(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
option = option.ToLower();
|
||||||
|
|
||||||
|
if(option == "load")
|
||||||
|
{
|
||||||
|
NAPI.World.RequestIpl(name);
|
||||||
|
player.SendChatMessage("~g~Das IPL ~s~" + name + " ~g~wurde erfolgreich geladen");
|
||||||
|
}
|
||||||
|
else if(option == "remove")
|
||||||
|
{
|
||||||
|
NAPI.World.RemoveIpl(name);
|
||||||
|
player.SendChatMessage("~g~Das IPL ~s~" + name + " ~g~wurde erfolgreich entladen");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.SendChatMessage("~m~Benutzung: ~s~/ipl [Load / Remove] [Name]");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user