ja
This commit is contained in:
@@ -17,7 +17,6 @@ using ReallifeGamemode.Server.Models;
|
||||
using ReallifeGamemode.Server.Job;
|
||||
using ReallifeGamemode.Server.Finance;
|
||||
using ReallifeGamemode.Server.Wanted;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
||||
@@ -2599,12 +2598,6 @@ namespace ReallifeGamemode.Server.Commands
|
||||
dbContext.Users.Where(u => u.Id == nearHouse.OwnerId).First().HouseId = null;
|
||||
}
|
||||
|
||||
foreach(HouseRental rental in dbContext.HouseRentals.Include(r => r.User).Where(r => r.HouseId == nearHouse.Id))
|
||||
{
|
||||
rental.User.Client?.SendChatMessage("Dein Mietvertrag wurde administrativ aufgelöst");
|
||||
dbContext.HouseRentals.Remove(rental);
|
||||
}
|
||||
|
||||
dbContext.Houses.Remove(nearHouse);
|
||||
dbContext.SaveChanges();
|
||||
|
||||
@@ -2906,10 +2899,31 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
}
|
||||
|
||||
[Command("blind", "~m~Benutzung: ~s~/blind")]
|
||||
public void CmdBlind(Client player, String name, int mode)
|
||||
{
|
||||
if (!player.IsLoggedIn()) return;
|
||||
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
Client target = ClientService.GetClientByNameOrId(name);
|
||||
|
||||
if (mode == 1)
|
||||
{
|
||||
player.TriggerEvent("toggleBlackScreen", true);
|
||||
} else if (mode == 0)
|
||||
{
|
||||
player.TriggerEvent("toggleBlackScreen", false);
|
||||
}
|
||||
}
|
||||
|
||||
[Command("makeadmin", "~m~Benutzung: ~s~/makeadmin [Name] [Adminlevel]")]
|
||||
public void CmdAdminSetadmin(Client player, string name, int rank)
|
||||
{
|
||||
if ((!player.GetUser()?.IsAdmin(AdminLevel.PROJEKTLEITUNG) ?? true))
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.PROJEKTLEITUNG) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
class UserCommands : Script
|
||||
{
|
||||
|
||||
[Command("dice", "~m~Benutzung: ~s~/dice")]
|
||||
public void CmdUserDice(Client player)
|
||||
{
|
||||
@@ -28,8 +27,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
if (!managedClient.IsLoggedIn()) return;
|
||||
ChatService.SendMessage(managedClient, "* " + player.Name + " hat eine " + number + " gewürfelt.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Command("car", "~m~Benutzung: ~s~/car")]
|
||||
public void CmdUserCar(Client player)
|
||||
|
||||
35
ReallifeGamemode.Server/Util/CheckPointHandle.cs
Normal file
35
ReallifeGamemode.Server/Util/CheckPointHandle.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Server.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Finance;
|
||||
using ReallifeGamemode.Server.Models;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using GTANetworkAPI;
|
||||
|
||||
namespace ReallifeGamemode.Server.Util
|
||||
{
|
||||
class CheckPointHandle : Script
|
||||
{
|
||||
[Command("cp", "~m~Benutzung: ~s~/cp")]
|
||||
public void CmdCp(Client player)
|
||||
{
|
||||
if (!player.IsLoggedIn()) return;
|
||||
|
||||
Vector3 cp = player.Position;
|
||||
|
||||
cp.X += 10;
|
||||
player.TriggerEvent("setCheckPoint", cp, player);
|
||||
}
|
||||
|
||||
[RemoteEvent("playerInCheckpoint")]
|
||||
public void enteredCheckpoints(Client user)
|
||||
{
|
||||
ChatService.SendMessage(user, "ja");
|
||||
Vector3 newCp = new Vector3(400, 680, 29);
|
||||
user.TriggerEvent("setCheckpoint", newCp, user);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user