Added /getincar Command
This commit is contained in:
@@ -1346,6 +1346,31 @@ namespace reallife_gamemode.Server.Commands
|
|||||||
player.Position = player.GetData("mark");
|
player.Position = player.GetData("mark");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Command("getincar", "~m~Benutzung: ~s~/getincar [Name]")]
|
||||||
|
public void CmdAdminGetincar(Client player, string name)
|
||||||
|
{
|
||||||
|
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||||
|
{
|
||||||
|
ChatService.NotAuthorized(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Client target = ClientService.GetClientByName(name);
|
||||||
|
if (target == null || !target.IsLoggedIn())
|
||||||
|
{
|
||||||
|
ChatService.PlayerNotFound(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!target.IsInVehicle)
|
||||||
|
{
|
||||||
|
player.SendChatMessage("~r~[FEHLER]~s~ Der Spieler ist nicht in einem Fahrzeug.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.SetIntoVehicle(target.Vehicle, -2);
|
||||||
|
}
|
||||||
|
|
||||||
[Command("saveall")]
|
[Command("saveall")]
|
||||||
public void SaveAll(Client player)
|
public void SaveAll(Client player)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user