Add changes
This commit is contained in:
@@ -20,6 +20,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Admin Commands (Admin.cs)
|
||||
@@ -31,7 +32,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
public class AdminCommands : Script
|
||||
{
|
||||
|
||||
|
||||
#region Todo
|
||||
[Command("eat", "~m~Benutzung: ~s~/eat [Item]")]
|
||||
public void CmdAdminEat(Player player, string item)
|
||||
@@ -137,35 +138,35 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (player.GetUser().AdminLevel)
|
||||
{
|
||||
case AdminLevel.MAPPING:
|
||||
switch (player.GetUser().AdminLevel)
|
||||
{
|
||||
case AdminLevel.MAPPING:
|
||||
ChatService.SendMessage(player, "~b~ " + "/team, /tc, /position");
|
||||
break;
|
||||
case AdminLevel.ENTWICKLUNG:
|
||||
case AdminLevel.ENTWICKLUNG:
|
||||
ChatService.SendMessage(player, "~b~ " + "/team, /tc, /position");
|
||||
break;
|
||||
case AdminLevel.SUPPORTER:
|
||||
case AdminLevel.SUPPORTER:
|
||||
ChatService.SendMessage(player, "~b~ " + "/tsupport, /showtickets, /rc, /rc quit, /o, /pm, /dimension, /to, /gh, /clearchat, /skick");
|
||||
break;
|
||||
case AdminLevel.ADMIN:
|
||||
case AdminLevel.ADMIN:
|
||||
ChatService.SendMessage(player, "~b~ " + "/a, /countdown, /freeze, /unfreeze, /mark, /gotmark, /gotox, /up, /setdimension, /spec, /warn, /ip, /kick, /ban /unban, /slap, /takeweapon, /tov, /ghv, /factionlist, /businesslist, /joblist");
|
||||
break;
|
||||
case AdminLevel.ADMIN2:
|
||||
case AdminLevel.ADMIN2:
|
||||
ChatService.SendMessage(player, "~b~ " + "/sethp, /setarmor, /arevive, /aunjail, /aclear, /clothes, /props,/aclear");
|
||||
break;
|
||||
case AdminLevel.ADMIN3:
|
||||
case AdminLevel.ADMIN3:
|
||||
ChatService.SendMessage(player, "~b~ " + "/adice, /settime, /setweather, /rsetarmor, /rgiveweapon, /giveweapon, /veh, /fv, /vfix, /vdestroy, /vlivery, /vcolor, /vehsmoke, /aneon, /mod, /showtuningmenu, /rvdestroy, /vsethp");
|
||||
break;
|
||||
case AdminLevel.HEADADMIN:
|
||||
case AdminLevel.HEADADMIN:
|
||||
ChatService.SendMessage(player, "~b~ " + "/aspeed, /set, /setmoney, /givemoney, /sethandmoney, /givehandmoney, /paydaydrop, /setwage, /freekh, /ainvite, /makeleader, /managefactionranks, /setweaponrack, /rmweaponrack, /setweaponrank, /giveitem, /inventory, /save, /remove, /house, /setbusinessbankbalance, /reloaddors, /interior, /editmode, /setbliptemplate, /ipl, /load, /quicksavemode, /createturf, /setturf, /cancleturf, /reloadturfs, /deleteturfs, /setturfpoint");
|
||||
break;
|
||||
case AdminLevel.PROJEKTLEITUNG:
|
||||
case AdminLevel.PROJEKTLEITUNG:
|
||||
ChatService.SendMessage(player, "~b~ " + "/makeadmin, /whitelist, /blind");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -264,7 +265,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Command("aduty", "~m~Benutzung: ~s~/aduty")]
|
||||
public void CmdAduty(Player player)
|
||||
{
|
||||
@@ -485,7 +486,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[Command("gotolist", "~m~Benutzung: ~s~/gotolist")] //TODO Als Browser anzeigeN??
|
||||
public void CmdAdminGotoList(Player player)
|
||||
@@ -826,7 +827,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
else player.Position = new Vector3(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Command("slap", "~m~Benutzung: ~s~/slap [Spieler] (Höhe)")]
|
||||
public void CmdAdminSlap(Player player, string name, int wert = 5)
|
||||
{
|
||||
@@ -990,7 +991,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if(name == null || component == null || drawable == null)
|
||||
if (name == null || component == null || drawable == null)
|
||||
{
|
||||
player.SendChatMessage("~m~Benutzung: ~s~/clothes [Spieler] [Component ID] [Drawable] (Textur)");
|
||||
return;
|
||||
@@ -2537,7 +2538,7 @@ namespace ReallifeGamemode.Server.Commands
|
||||
ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du hast das Geld von " + target.Name + " auf ~g~$" + amount + "~s~ gesetzt.");
|
||||
ChatService.SendMessage(target, "~b~[ADMIN]~s~ Dein Geld wurde von Admin " + player.Name + " auf ~g~$" + amount + "~s~ gesetzt.");
|
||||
}
|
||||
|
||||
|
||||
[Command("givemoney", "~m~Benutzung: ~s~/givemoney [Name] [Menge]")]
|
||||
public void GivePlayerMoney(Player player, string receiver, int amount)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Finance;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
@@ -4,6 +4,7 @@ using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Wanted;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Factions.Medic;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Wanted;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Login (Login.cs)
|
||||
|
||||
@@ -15,6 +15,7 @@ using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
using ReallifeGamemode.Server.DrivingSchool;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Key (Key.cs)
|
||||
* @author VegaZ
|
||||
@@ -326,11 +327,11 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
player.TriggerEvent("showElevatorMenu", JsonConvert.SerializeObject(stages.ToArray()));
|
||||
}
|
||||
if(nearestClotheShopPoint != null)
|
||||
if (nearestClotheShopPoint != null)
|
||||
{
|
||||
nearestClotheShopPoint.clotheShop.LoadShopNUI(player);
|
||||
}
|
||||
if(nearestItemShopPoint != null)
|
||||
if (nearestItemShopPoint != null)
|
||||
{
|
||||
nearestItemShopPoint.itemShop.LoadShopNUI(player);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ using ReallifeGamemode.Server.Services;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Server.Wanted;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Event Login (Login.cs)
|
||||
|
||||
@@ -3,6 +3,7 @@ using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using System;
|
||||
|
||||
@@ -105,7 +106,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(sV is JobVehicle)
|
||||
else if (sV is JobVehicle)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -124,7 +125,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
else if (!player.IsInVehicle)
|
||||
{
|
||||
GTANetworkAPI.Vehicle vehicle = null;
|
||||
foreach(var veh in NAPI.Pools.GetAllVehicles())
|
||||
foreach (var veh in NAPI.Pools.GetAllVehicles())
|
||||
{
|
||||
if (player.Position.DistanceTo(veh.Position) <= 3f)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using static ReallifeGamemode.Database.AdminLevel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using static ReallifeGamemode.Server.Types.AdminLevel;
|
||||
|
||||
namespace ReallifeGamemode.Server.Extensions
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@ using ReallifeGamemode.Server.Managers;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
namespace ReallifeGamemode.Server.Job
|
||||
{
|
||||
@@ -100,7 +101,7 @@ namespace ReallifeGamemode.Server.Job
|
||||
|
||||
private static void UpdateFare(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
foreach(var player in GetPlayerInJob())
|
||||
foreach (var player in GetPlayerInJob())
|
||||
{
|
||||
if (!player.HasData("hasPassager")) { player.SetData<bool>("hasPassager", false); continue; }
|
||||
int playerId = player.GetUser().Id;
|
||||
@@ -112,15 +113,15 @@ namespace ReallifeGamemode.Server.Job
|
||||
lastPositions[v.Handle] = v.Position;
|
||||
|
||||
double distance = lastPosition.DistanceTo(v.Position) / 1000.0;
|
||||
if (distance > 0.5) { ChatService.BroadcastAdmin($"Möglicher Cheater - {player.Name}", Database.AdminLevel.MAPPING); continue; }
|
||||
if (distance > 0.5) { ChatService.BroadcastAdmin($"Möglicher Cheater - {player.Name}", AdminLevel.MAPPING); continue; }
|
||||
if (!player.GetData<bool>("hasPassager")) continue;
|
||||
foreach (Player occupant in v.Occupants)
|
||||
{
|
||||
occupant.TriggerEvent("CLIENT:updateFare", JsonConvert.SerializeObject(distance));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
@@ -19,7 +20,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
public static void LoadCityHall()
|
||||
{
|
||||
NAPI.Marker.CreateMarker(MarkerType.VerticalCylinder, _cityHallPosition.Subtract(new Vector3(0, 0, 1.7)), new Vector3(), new Vector3(), 1.0f, new Color(255, 255, 255));
|
||||
NAPI.Marker.CreateMarker(GTANetworkAPI.MarkerType.VerticalCylinder, _cityHallPosition.Subtract(new Vector3(0, 0, 1.7)), new Vector3(), new Vector3(), 1.0f, new Color(255, 255, 255));
|
||||
NAPI.TextLabel.CreateTextLabel("~y~Stadthalle~s~\nDrücke ~o~E~s~, um das Menü zu öffnen", _cityHallPosition, 5.0f, 1f, 0, new Color(255, 255, 255));
|
||||
var colShape = NAPI.ColShape.CreateSphereColShape(_cityHallPosition, 1.0f);
|
||||
colShape.OnEntityEnterColShape += (s, c) =>
|
||||
|
||||
@@ -6,6 +6,7 @@ using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
/**
|
||||
* @overview Life of German Reallife - Managers BankManager (BankManager.cs)
|
||||
* @author VegaZ
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Managers Interaction (InteractionManager.cs)
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Services;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
|
||||
namespace ReallifeGamemode.Server.Report
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using ReallifeGamemode.Server.Extensions;
|
||||
using ReallifeGamemode.Server.Job;
|
||||
using ReallifeGamemode.Server.Types;
|
||||
using ReallifeGamemode.Server.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
Reference in New Issue
Block a user