changes something
This commit is contained in:
@@ -510,19 +510,20 @@ namespace ReallifeGamemode.Server.Events
|
||||
|
||||
if (nearestjailPoint != null)
|
||||
{
|
||||
int oStaatsfrak = NAPI.Pools.GetAllPlayers().Where(p => !p.IsAfk() && p.IsLoggedIn() && p.GetUser(dbcontext).FactionId == 1).Count() +
|
||||
NAPI.Pools.GetAllPlayers().Where(p => !p.IsAfk() && p.IsLoggedIn() && p.GetUser(dbcontext).FactionId == 3).Count();
|
||||
if(oStaatsfrak > 0)
|
||||
{
|
||||
player.SendNotification("~y~[Info]~w~ Es sind genügend Beamte online!");
|
||||
return;
|
||||
}
|
||||
int oStaatsfrak = NAPI.Pools.GetAllPlayers().Where(p => !p.IsAfk() && p.IsDuty() && p.IsLoggedIn() && p.GetUser(dbcontext).FactionId == 1).Count() +
|
||||
NAPI.Pools.GetAllPlayers().Where(p => !p.IsAfk() && p.IsDuty() && p.IsLoggedIn() && p.GetUser(dbcontext).FactionId == 3).Count();
|
||||
|
||||
if (client.Wanteds <= 0)
|
||||
{
|
||||
player.SendNotification("~y~[Info]~w~ Du wirst nicht gesucht!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (oStaatsfrak > 2)
|
||||
{
|
||||
player.SendNotification("~y~[Info]~w~ Es sind genügend Beamte online!");
|
||||
return;
|
||||
}
|
||||
client.SetJailTime(true, dbcontext);
|
||||
Jail.Check_PutBehindBars(client, JailInLocations.Outside);
|
||||
player.SendNotification("Du hast dich selbst eingeknastet");
|
||||
|
||||
@@ -112,6 +112,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
user.SetJailTime(false, dbContext);
|
||||
user.SetBlipAndNametagColor();
|
||||
user.AnnouncePlayerJailedIn();
|
||||
user.Wanteds = 0;
|
||||
dbContext.SaveChanges();
|
||||
//HERE: Freilauf
|
||||
Check_PutBehindBars(user, JailInLocations.Outside);
|
||||
|
||||
Reference in New Issue
Block a user