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