Add/Edit some commands, Death.cs, EnterVehicleAttempt.cs

This commit is contained in:
xSprite
2018-10-21 05:10:54 +02:00
parent cd24928da3
commit 49bd9fb343
3 changed files with 61 additions and 29 deletions

View File

@@ -6,6 +6,8 @@ using GTANetworkAPI;
using GTANetworkMethods;
using reallife_gamemode.Model;
using reallife_gamemode.Server.Extensions;
using reallife_gamemode.Server.Services;
using reallife_gamemode.Server.Util;
/**
* @overview Life of German Reallife - Events Death (Death.cs)
@@ -23,6 +25,9 @@ namespace reallife_gamemode.Server.Events
//TODO: Zum Full Release entfernen
NAPI.Chat.SendChatMessageToPlayer(player, "Du bist durch " + killer.Name + " gestorben: " + reason.ToString());
string message = "~y~[HINWEIS]: " + killer.Name + " hat " + player.Name + " getötet.("+NAPI.Player.GetPlayerCurrentWeapon(killer)+")";
ChatService.BroadcastAdmin(message, AdminLevel.ADMIN);
int? killerId;
float killerPosX;
float killerPosY;

View File

@@ -18,10 +18,9 @@ namespace reallife_gamemode.Server.Events
if((vehicle.GetData("factionId") != player.GetUser().FactionId) && seat == 0)
{
//TODO REWORK
//player.SetIntoVehicle(vehicle, 1);
//player.WarpOutOfVehicle();
player.Position = new Vector3(player.Position.X, player.Position.Y, player.Position.Z);
player.SendChatMessage("Du hast kein Recht in dieses Fahrzeug als Fahrer einzusteigen.");
player.SetIntoVehicle(vehicle, 1);
player.WarpOutOfVehicle();
player.SendNotification("~r~Du darfst dieses Fahrzeug nicht benutzen!", true);
return;
}
}