[+] Add Command for Admin /setweaponrack , /rmweaponrack and for Leader /setweaponrank
+ Add blip alpha channel for Players (set to 125) + Add blip color for Player with Wanted - Removed WeaponHash from DB entry FactionWeapons (Deprecated)
This commit is contained in:
@@ -206,6 +206,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
player.SendNotification("Du bist nun ~r~außer Dienst.");
|
||||
NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", false);
|
||||
player.NametagColor = new Color(255, 255, 255);
|
||||
player.SetSharedData("blipColor", 4);
|
||||
UpdateCharacterCloth.LoadCharacterDefaults(player);
|
||||
}
|
||||
}
|
||||
@@ -216,59 +217,34 @@ namespace ReallifeGamemode.Server.Events
|
||||
List<string> secondarys = new List<string>();
|
||||
List<string> melees = new List<string>();
|
||||
List<string> specials = new List<string>();
|
||||
primarys.Add("Keine");
|
||||
secondarys.Add("Keine");
|
||||
melees.Add("Keine");
|
||||
specials.Add("Keine");
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
List<FactionWeapon> weapons = context.FactionWeapons.ToList().FindAll(w => w.FactionId == user.FactionId);
|
||||
foreach (var weapon in weapons)
|
||||
{
|
||||
|
||||
|
||||
|
||||
switch (weapon.SlotID)
|
||||
{
|
||||
case 1:
|
||||
if (weapon.WeaponHash != -1)
|
||||
{
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
primarys.Add(weapon.WeaponModel.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
primarys.Add("Keine");
|
||||
}
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
primarys.Add(weapon.WeaponModel.ToString());
|
||||
break;
|
||||
case 2:
|
||||
if (weapon.WeaponHash != -1)
|
||||
{
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
secondarys.Add(weapon.WeaponModel.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
secondarys.Add("Keine");
|
||||
}
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
secondarys.Add(weapon.WeaponModel.ToString());
|
||||
break;
|
||||
case 3:
|
||||
if (weapon.WeaponHash != -1)
|
||||
{
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
melees.Add(weapon.WeaponModel.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
melees.Add("Keine");
|
||||
}
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
melees.Add(weapon.WeaponModel.ToString());
|
||||
break;
|
||||
case 4:
|
||||
if (weapon.WeaponHash != -1)
|
||||
{
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
specials.Add(weapon.WeaponModel.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
specials.Add("Keine");
|
||||
specials.Add("Schutzweste");
|
||||
}
|
||||
if (user.FactionRank.Order >= weapon.Rank)
|
||||
specials.Add(weapon.WeaponModel.ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -276,19 +252,18 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
player.TriggerEvent("showWeaponMenu", primarys.ToArray(), secondarys.ToArray(), melees.ToArray(), specials.ToArray());
|
||||
}
|
||||
if(nearestJailReleasePoint != null)
|
||||
if (nearestJailReleasePoint != null)
|
||||
{
|
||||
List<string> criminals = new List<string>();
|
||||
criminals.Add("Keiner");
|
||||
foreach (Client target in NAPI.Pools.GetAllPlayers())
|
||||
{
|
||||
User c = target.GetUser();
|
||||
|
||||
if (c.JailTime > 0)
|
||||
{
|
||||
if (c.JailTime > 0)
|
||||
{
|
||||
criminals.Add(c.Name.ToString());
|
||||
}
|
||||
}
|
||||
criminals.Add(c.Name);
|
||||
}
|
||||
}
|
||||
player.TriggerEvent("showJailMenu", JsonConvert.SerializeObject(criminals.ToArray()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user