some changes
This commit is contained in:
@@ -31,7 +31,7 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
if (!veh.GetOwners().Contains(player.GetUser().FactionId ?? 0) && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()) && !JobBase.GetPlayerInJob().Contains(player))
|
||||
{
|
||||
if ((VehicleHash)vehicle.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH)
|
||||
if ((VehicleHash)vehicle.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || (VehicleHash)vehicle.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH)
|
||||
{
|
||||
if (WeaponDealManager.checkWeaponDbyVehicle(vehicle))
|
||||
return;
|
||||
|
||||
@@ -946,6 +946,11 @@ namespace ReallifeGamemode.Server.Events
|
||||
return;
|
||||
}
|
||||
|
||||
if(player.Dead == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool state = VehicleStreaming.GetEngineState(v);
|
||||
ServerVehicle sV = v.GetServerVehicle();
|
||||
if (sV != null)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace ReallifeGamemode.Server.Factions.Medic
|
||||
public static List<MedicTask> HealTasks = new List<MedicTask>();
|
||||
public static List<MedicTask> FireTasks = new List<MedicTask>();
|
||||
public static List<HealDecision> HealDecisions = new List<HealDecision>();
|
||||
public static int ReviveIncome = 100;
|
||||
public static int ReviveIncome = 50;
|
||||
public static int dutyMedics = 0;
|
||||
public static int reviveTaskTime = 120;
|
||||
|
||||
|
||||
@@ -105,6 +105,11 @@ namespace ReallifeGamemode.Server.Finance
|
||||
healthInsurance = 0;
|
||||
}
|
||||
|
||||
if (healthInsurance > 150)
|
||||
{
|
||||
healthInsurance = 150;
|
||||
}
|
||||
|
||||
int? factionMoney = null;
|
||||
|
||||
if (user.Faction != null && user.FactionRank != null)
|
||||
@@ -185,8 +190,8 @@ namespace ReallifeGamemode.Server.Finance
|
||||
.ThenInclude(h => h.BankAccount)
|
||||
.Where(hR => hR.UserId == u.Id);
|
||||
|
||||
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += (int)(paycheck.HealthInsurance * 0.1);
|
||||
logger.LogInformation("Medic faction got a health insurance payment of {0} dollars from player {1}", paycheck.HealthInsurance * 0.1, client.Name);
|
||||
dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += (int)(paycheck.HealthInsurance);
|
||||
logger.LogInformation("Medic faction got a health insurance payment of {0} dollars from player {1}", paycheck.HealthInsurance, client.Name);
|
||||
if (rentals.Any())
|
||||
{
|
||||
foreach (var rental in rentals)
|
||||
|
||||
@@ -19,6 +19,9 @@ namespace ReallifeGamemode.Server.Inventory.Items
|
||||
public override uint Object => 875075437;
|
||||
public override int Price => 500;
|
||||
|
||||
|
||||
public static readonly VehicleHash WEAPON_DEAL_GANG_VEHICLE_HASH = VehicleHash.Gburrito2;
|
||||
public static readonly VehicleHash WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH = VehicleHash.Policet;
|
||||
public override bool Use(UserItem uItem)
|
||||
{
|
||||
Player player = uItem.GetUser().Player;
|
||||
@@ -28,6 +31,8 @@ namespace ReallifeGamemode.Server.Inventory.Items
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vehicle veh = null;
|
||||
|
||||
var nearestVeh = NAPI.Pools.GetAllVehicles().Where(v => v.Position.DistanceTo(player.Position) <= 5).FirstOrDefault();
|
||||
|
||||
@@ -29,21 +29,21 @@ namespace ReallifeGamemode.Server.Inventory.Items
|
||||
return false;
|
||||
}
|
||||
Random random = new Random();
|
||||
int randomNumber = random.Next(1, 5);
|
||||
int randomNumber = random.Next(1, 2);
|
||||
if (randomNumber == 1)
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
User winner = player.GetUser(dbContext);
|
||||
winner.Handmoney += 1000;
|
||||
player.TriggerEvent("SERVER:SET_HANDMONEY", winner.Handmoney);
|
||||
//player.TriggerEvent("SERVER:SET_HANDMONEY", winner.Handmoney);
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
Services.ChatService.SendMessage(player, "Glückwunsch, du hast $1000 gewonnen!");
|
||||
player.SendNotification("Glückwunsch du hast ~g~$~w~1000 gewonnen!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Services.ChatService.SendMessage(player, "Leider kein Gewinn, viel Glück beim nächsten mal");
|
||||
player.SendNotification("Leider kein Gewinn, viel Glück beim nächsten mal.");
|
||||
}
|
||||
player.SendNotification("Du hast ~g~" + InventoryManager.GetItemById(uItem.ItemId).Name + " ~s~verwendet.", false);
|
||||
InventoryManager.RemoveUserItem(player.GetUser(), uItem, 1);
|
||||
|
||||
@@ -135,15 +135,15 @@ public class AttachmentSyncExample : Script
|
||||
player.AddAttachment(Base36Extensions.FromBase36(hash), true);
|
||||
}
|
||||
|
||||
//[Command("xdd")]
|
||||
[Command("xdd")]
|
||||
public void attachment(Player player)
|
||||
{
|
||||
Vehicle veh = player.Vehicle;
|
||||
if (!player.HasAttachment("ammobox"))
|
||||
if (!veh.HasAttachment("weapondeal"))
|
||||
{
|
||||
player.AddAttachment("ammobox", false);
|
||||
//player.AddAttachment("weapondeal", false);
|
||||
//player.SyncAnimation("carryBox");
|
||||
//veh.AddAttachment("weapondeal1", false);
|
||||
veh.AddAttachment("weapondeal", false);
|
||||
//veh.AddAttachment("weapondeal2", false);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user