fix postitioning of cuffs and delete cuffpoits on death
This commit is contained in:
@@ -8,7 +8,7 @@ export default function attachmentManager(game: IGame) {
|
||||
attachmentMngr.register("weapondeal", "ex_prop_crate_ammo_bc", "chassis_dummy", new mp.Vector3(0.08, -0.9, -0.2), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("weapondeal1", "ex_office_swag_guns02", "chassis_dummy", new mp.Vector3(0, 0.8, 0), new mp.Vector3(0, 0, 0));
|
||||
attachmentMngr.register("weapondeal2", "w_sg_pumpshotgun", "chassis_dummy", new mp.Vector3(0.4, 1.6, 0.62), new mp.Vector3(90, 0, 180));
|
||||
attachmentMngr.register("handcuffs", "p_cs_cuffs_02_s", 28422, new mp.Vector3(0, 0, 0), new mp.Vector3(0, 90, 0));
|
||||
attachmentMngr.register("handcuffs", "p_cs_cuffs_02_s", 28422, new mp.Vector3(-0.05, 0, 0), new mp.Vector3(90, 90, 0));
|
||||
});
|
||||
|
||||
const attachmentMngr =
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
public class Death : Script
|
||||
{
|
||||
[ServerEvent(Event.PlayerDeath)]
|
||||
public void OnPlayerDeath(Player player, Player killer, uint reason )
|
||||
public void OnPlayerDeath(Player player, Player killer, uint reason)
|
||||
{
|
||||
if (!player.IsLoggedIn())
|
||||
{
|
||||
@@ -33,8 +33,9 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
}
|
||||
|
||||
player.SetData("isDead", true);
|
||||
PositionManager.cuffPoints.Remove(player);
|
||||
|
||||
player.SetData("isDead", true);
|
||||
|
||||
using (var userDeath = new DatabaseContext())
|
||||
{
|
||||
@@ -44,7 +45,8 @@ namespace ReallifeGamemode.Server.Events
|
||||
}
|
||||
|
||||
//TODO: Zum Full Release entfernen
|
||||
if (player.HasData("togdeath")) {
|
||||
if (player.HasData("togdeath"))
|
||||
{
|
||||
ChatService.SendMessage(player, "Du bist durch " + (killer?.Name ?? "Niemanden") + " gestorben: " + reason.ToString());
|
||||
}
|
||||
int? killerId;
|
||||
@@ -109,8 +111,6 @@ namespace ReallifeGamemode.Server.Events
|
||||
ChatService.BroadcastFaction("~y~[MEDIC] ~w~" + player.Name + " ist soeben verstorben.", new List<int>() { 2 });
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (player.GetUser().IsAdmin(AdminLevel.ADMIN) == true)
|
||||
{
|
||||
player.TriggerEvent("startDeathTimer", true);
|
||||
|
||||
Reference in New Issue
Block a user