jailout punkte, besser testen den lachs
This commit is contained in:
@@ -29,8 +29,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
new Vector3(1651.512, 2570.2249, 45.564907)
|
||||
};
|
||||
|
||||
//positionInJail: ENTWEDER "cell" ODER "outside", TODO: enum oder sowas
|
||||
public static void Check_PutBehindBars(User user, String positionInJail)
|
||||
public static void Check_PutBehindBars(User user, JailInLocations positionInJail)
|
||||
{
|
||||
user.SetBlipAndNametagColor();
|
||||
Player player = user.Player;
|
||||
@@ -45,14 +44,14 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
|
||||
Vector3 position = null;
|
||||
|
||||
if (positionInJail == "cell")
|
||||
if (positionInJail == JailInLocations.InCell)
|
||||
{
|
||||
Random rnd = new Random();
|
||||
int rndInt = rnd.Next(1, 3);
|
||||
position = prisonCells[rndInt];
|
||||
|
||||
}
|
||||
else if (positionInJail == "outside")
|
||||
else if (positionInJail == JailInLocations.Outside)
|
||||
{
|
||||
position = new Vector3(1691.42, 2562.77, 45.56);
|
||||
}
|
||||
@@ -115,7 +114,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
user.AnnouncePlayerJailedIn();
|
||||
dbContext.SaveChanges();
|
||||
//HERE: Freilauf
|
||||
Check_PutBehindBars(user, "outside");
|
||||
Check_PutBehindBars(user, JailInLocations.Outside);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +178,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
player.SafeSetHealth(100);
|
||||
player.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
|
||||
player.SafeTeleport(JailOut_Point);
|
||||
|
||||
ChatService.HQMessage("Beamter " + cop.Name + " hat " + user.Name + " aus dem Knast entlassen.");
|
||||
ChatService.SendMessage(player, "!{#8181E9}Der Beamte " + cop.Name + " hat dich aus dem Knast entlassen");
|
||||
@@ -199,7 +198,7 @@ namespace ReallifeGamemode.Server.Wanted
|
||||
dbContext.SaveChanges();
|
||||
|
||||
target.SafeSetHealth(100);
|
||||
target.SafeTeleport(new Vector3(427.879, -984.65, 30.71));
|
||||
target.SafeTeleport(JailOut_Point);
|
||||
|
||||
ChatService.HQMessage(" Admin " + admin.Name + " hat " + user.Name + " aus dem Knast entlassen.");
|
||||
ChatService.SendMessage(target, "!{#8181E9}Admin " + admin.Name + " hat dich aus dem Knast entlassen");
|
||||
|
||||
Reference in New Issue
Block a user