added up down lt and rt
This commit is contained in:
@@ -62,7 +62,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
Vehicle v = NAPI.Vehicle.CreateVehicle(hash, player.Position, player.Rotation.Z, color1, color2);
|
||||
|
||||
player.SetIntoVehicle(v.Handle, -1);
|
||||
player.SendChatMessage("Maxspeed: + " +player.Vehicle.MaxSpeed + "");
|
||||
player.SendChatMessage("Maxspeed: + " + player.Vehicle.MaxSpeed + "");
|
||||
}
|
||||
|
||||
[Command("fv")]
|
||||
@@ -267,7 +267,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
}
|
||||
|
||||
target.GiveWeapon(wHash, ammo);
|
||||
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.");
|
||||
}
|
||||
|
||||
@@ -399,8 +399,8 @@ namespace reallife_gamemode.Server.Commands
|
||||
ChatService.ErrorMsg(player);
|
||||
return;
|
||||
}
|
||||
target.SendChatMessage("~y~PM von "+ player.Name + ": " + msg +" ");
|
||||
player.SendChatMessage("~y~PM an "+ target.Name + ": " + msg + " ");
|
||||
target.SendChatMessage("~y~PM von " + player.Name + ": " + msg + " ");
|
||||
player.SendChatMessage("~y~PM an " + target.Name + ": " + msg + " ");
|
||||
}
|
||||
|
||||
[Command("takeweapon", "~m~Benutzung: ~s~/takeweapon [Spieler]")]
|
||||
@@ -445,9 +445,9 @@ namespace reallife_gamemode.Server.Commands
|
||||
foreach (var managedClient in peopleInRange)
|
||||
{
|
||||
managedClient.Health = hp;
|
||||
managedClient.SendChatMessage("~b~Admin "+ player.Name + " hat im Radius von " + radius + " die HP auf " + hp + " gesetzt.");
|
||||
managedClient.SendChatMessage("~b~Admin " + player.Name + " hat im Radius von " + radius + " die HP auf " + hp + " gesetzt.");
|
||||
}
|
||||
player.SendChatMessage("~b~Das Leben von " + peopleInRange.Count + " Spielern wurde auf "+ hp + " gesetzt.");
|
||||
player.SendChatMessage("~b~Das Leben von " + peopleInRange.Count + " Spielern wurde auf " + hp + " gesetzt.");
|
||||
}
|
||||
|
||||
[Command("rsetarmor", "~m~Benutzung: ~s~/rsetarmor [Radius] (Armor)")]
|
||||
@@ -522,9 +522,9 @@ namespace reallife_gamemode.Server.Commands
|
||||
foreach (var managedClient in peopleInRange)
|
||||
{
|
||||
managedClient.GiveWeapon(wHash, munition);
|
||||
managedClient.SendChatMessage("~b~Admin " +player.Name + " hat im Radius von " + radius + " eine/n " + weapon +" mit " + munition +" Munition vergeben.");
|
||||
managedClient.SendChatMessage("~b~Admin " + player.Name + " hat im Radius von " + radius + " eine/n " + weapon + " mit " + munition + " Munition vergeben.");
|
||||
}
|
||||
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("save", "~m~Benutzung: ~s~/save [Typ = ~g~Blip, ~r~Marker, Ped, Pickup, TextLabel, ~g~Vehicle")]
|
||||
@@ -549,14 +549,14 @@ namespace reallife_gamemode.Server.Commands
|
||||
if (player.IsInVehicle)
|
||||
{
|
||||
Vehicle vehicle = player.Vehicle;
|
||||
SaveData.SaveVehicleData((VehicleHash) vehicle.Model, vehicle.Position, vehicle.Heading, vehicle.NumberPlate,
|
||||
SaveData.SaveVehicleData((VehicleHash)vehicle.Model, vehicle.Position, vehicle.Heading, vehicle.NumberPlate,
|
||||
Convert.ToByte(vehicle.PrimaryColor), Convert.ToByte(vehicle.SecondaryColor), vehicle.Locked, vehicle.EngineStatus, Convert.ToByte(vehicle.Dimension));
|
||||
}
|
||||
else player.SendChatMessage("~m~Du sitzt in keinem Fahrzeug!");
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
[Command("a", "~m~Benutzung: ~s~/a [Nachricht]")]
|
||||
@@ -569,7 +569,8 @@ namespace reallife_gamemode.Server.Commands
|
||||
}
|
||||
|
||||
List<Client> playerlist = NAPI.Pools.GetAllPlayers();
|
||||
foreach (Client currentPlayer in playerlist) {
|
||||
foreach (Client currentPlayer in playerlist)
|
||||
{
|
||||
if (currentPlayer.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? false)
|
||||
{
|
||||
NAPI.Chat.SendChatMessageToPlayer(currentPlayer, "~r~Admin " + NAPI.Player.GetPlayerName(player) + "~w~: " + message);
|
||||
@@ -595,30 +596,30 @@ namespace reallife_gamemode.Server.Commands
|
||||
if (currentPlayer.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? false)
|
||||
{
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "~w~" + NAPI.Player.GetPlayerName(currentPlayer));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Command("setweather", "~m~Benutzung: ~s~/setweather [WEATHER]")]
|
||||
public void CmdAdminSetweather(Client player, string weather)
|
||||
{
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Weather weatherBefore = NAPI.World.GetWeather();
|
||||
NAPI.World.SetWeather(weather);
|
||||
Weather weatherAfter = NAPI.World.GetWeather();
|
||||
|
||||
if (!weatherBefore.Equals(weatherAfter))
|
||||
{
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "~w~Weather changed to " + NAPI.World.GetWeather());
|
||||
} else
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "~w~Wetter geändert: " + NAPI.World.GetWeather());
|
||||
}
|
||||
else
|
||||
{
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "~w~Unable to change weather");
|
||||
NAPI.Chat.SendChatMessageToPlayer(player, "~w~Wetter konnte nicht geändert werden");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -630,7 +631,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Client target = ClientService.GetClientByName(targetname);
|
||||
if (target == null)
|
||||
{
|
||||
@@ -655,7 +656,7 @@ namespace reallife_gamemode.Server.Commands
|
||||
ChatService.PlayerNotFound(target);
|
||||
return;
|
||||
}
|
||||
target.Freeze(false);
|
||||
target.Freeze(false);
|
||||
}
|
||||
|
||||
[Command("kick", "~m~Benutzung: ~s~/kick [Player] [Grund]")]
|
||||
@@ -689,11 +690,100 @@ namespace reallife_gamemode.Server.Commands
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i=0; i<20; i++)
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
NAPI.Chat.SendChatMessageToAll("");
|
||||
}
|
||||
}
|
||||
|
||||
[Command("up", "~m~Benutzung: ~s~/up [Wert]")]
|
||||
public void CmdAdminUp(Client player, int value = 5)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y, player.Position.Z + value);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
|
||||
[Command("dn", "~m~Benutzung: ~s~/dn [Wert]")]
|
||||
public void CmdAdminDn(Client player, int value = 5)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y, player.Position.Z - value);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
|
||||
[Command("rt", "~m~Benutzung: ~s~/rt [Wert]")]
|
||||
public void CmdAdminRt(Client player, int value = 5)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
float playerHeading = player.Heading;
|
||||
|
||||
if (playerHeading < 45 || playerHeading >= 315)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X + value, player.Position.Y, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
|
||||
}
|
||||
else if (playerHeading < 315 && playerHeading >= 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y - value, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
else if (playerHeading >= 135 && playerHeading < 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X - value, player.Position.Y, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
else if (playerHeading >= 45 && playerHeading < 135)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y + value, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
}
|
||||
|
||||
[Command("lt", "~m~Benutzung: ~s~/lt [Wert]")]
|
||||
public void CmdAdminLt(Client player, int value = 5)
|
||||
{
|
||||
|
||||
float playerHeading = player.Heading;
|
||||
|
||||
if (playerHeading < 45 || playerHeading >= 315)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X - value, player.Position.Y, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
|
||||
}
|
||||
else if (playerHeading < 315 && playerHeading >= 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y + value, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
else if (playerHeading >= 135 && playerHeading < 225)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X + value, player.Position.Y, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
else if (playerHeading >= 45 && playerHeading < 135)
|
||||
{
|
||||
Vector3 playerPosition = new Vector3(player.Position.X, player.Position.Y - value, player.Position.Z);
|
||||
player.Position = playerPosition;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user