corvex letzte änderung hinzugefügt & luke dimension gefixt & add Waffen Pickups muss man testen
This commit is contained in:
@@ -19,6 +19,11 @@ export class vVehicleDamage
|
||||
|
||||
try
|
||||
{
|
||||
if(veh.getPedInSeat(-1) == 0)
|
||||
veh.setInvincible(true);
|
||||
else
|
||||
veh.setInvincible(false);
|
||||
|
||||
if(veh.getEngineHealth() < 0 || veh.getHealth() <= 250)
|
||||
{
|
||||
veh.setEngineHealth(0);
|
||||
|
||||
@@ -170,6 +170,30 @@ export default function weapondamageUtil(globalData: IGlobalData) {
|
||||
}
|
||||
});
|
||||
|
||||
mp.events.add("ADMIN:test", (weapon, pickuphash, weaponhash, ammo, x, y, z, ) => {
|
||||
mp.gui.chat.push("angekommen");
|
||||
//mp.game.object.createPickupRotate(0xE46E11B4, 100, 100 + 3, 80, 0, 0, 0, 512, 10, 0, true, 1834241177);
|
||||
|
||||
|
||||
let pickup = mp.game.object.createPickupRotate(pickuphash, x + 2, y, z, 0, 0, 0, 512, ammo, 0, true, weaponhash);
|
||||
|
||||
mp.events.add('render', () => {
|
||||
// Draw to screen.
|
||||
mp.game.graphics.drawText(weapon, [x + 2, y, z+ 0.5], {
|
||||
font: 7,
|
||||
color: [255, 255, 255, 185],
|
||||
scale: [0.4, 0.4],
|
||||
outline: true,
|
||||
centre: true
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
mp.game.object.setPickupRegenerationTime(pickup, 1);
|
||||
|
||||
mp.gui.chat.push("ausgeführt");
|
||||
});
|
||||
|
||||
/*mp.events.add('playerWeaponShot', (targetPosition, targetEntity) => {
|
||||
for (var x in this.weaponAmmo) {
|
||||
if (this.weaponAmmo[x].id != this.currentWeapon) {
|
||||
|
||||
@@ -444,9 +444,10 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
player.SafeTeleport(target.Position);
|
||||
player.Dimension = target.Dimension;
|
||||
ChatService.SendMessage(player, "~c~* Du hast dich teleportiert.");
|
||||
}
|
||||
|
||||
ChatService.SendMessage(player, "~c~* Du hast dich teleportiert.");
|
||||
|
||||
}
|
||||
|
||||
[Command("gh", "~m~Benutzung: ~s~/gh [Name]")]
|
||||
@@ -476,10 +477,11 @@ namespace ReallifeGamemode.Server.Commands
|
||||
{
|
||||
target.SafeTeleport(player.Position);
|
||||
target.Dimension = player.Dimension;
|
||||
}
|
||||
ChatService.SendMessage(target, "~c~* Du wurdest teleportiert.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Command("pm", "~m~Benutzung: ~s~/pm [Spieler] [Nachricht]", GreedyArg = true)]
|
||||
public void CmdAdminMsg(Player player, string name, string msg)
|
||||
{
|
||||
@@ -4031,6 +4033,40 @@ namespace ReallifeGamemode.Server.Commands
|
||||
ChatService.SendMessage(player, "~b~Du hast " + target.Name + " eine/n " + hash + " mit einer Munition von " + ammo + " gegeben.");
|
||||
}
|
||||
|
||||
[Command("setweaponpickup", "~m~Benutzung:~s~ /setweaponpickup [Waffe] [Munition] ", Alias = "swp")]
|
||||
public void SetWeaponPickUp(Player player, string weapon, int ammo)
|
||||
{
|
||||
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(player);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
weapon = weapon.ToLower();
|
||||
|
||||
|
||||
if (!uint.TryParse(weapon, out uint uHash))
|
||||
{
|
||||
if (weapon.Contains("mk2") && !weapon.Contains("_mk2")) weapon = weapon.Replace("mk2", "_mk2");
|
||||
uHash = NAPI.Util.GetHashKey($"weapon_{weapon}");
|
||||
}
|
||||
|
||||
if (!WeaponManager.IsValidHash(uHash))
|
||||
{
|
||||
ChatService.ErrorMessage(player, "Diese Waffe existiert nicht");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!uint.TryParse(weapon, out uint uPickupHash))
|
||||
{
|
||||
if (weapon.Contains("mk2") && !weapon.Contains("_mk2")) weapon = weapon.Replace("mk2", "_mk2");
|
||||
uPickupHash = NAPI.Util.GetHashKey($"PICKUP_WEAPON_{weapon}");
|
||||
}
|
||||
|
||||
player.TriggerEvent("ADMIN:test", weapon, (PickupHash)uPickupHash, (WeaponHash)uHash, ammo, player.Position.X, player.Position.Y, player.Position.Z);
|
||||
}
|
||||
|
||||
#endregion ALevel1337
|
||||
|
||||
#region ALevel1338
|
||||
|
||||
Reference in New Issue
Block a user