/cuff positioning test
This commit is contained in:
@@ -77,10 +77,12 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
var user = player.GetUser();
|
||||
return user.GetData("duty", false);
|
||||
}
|
||||
|
||||
public static bool IsAdminDuty(this Player player)
|
||||
{
|
||||
return player.HasData("Adminduty") ? player.GetData<bool>("Adminduty") : false;
|
||||
}
|
||||
|
||||
public static Vector3 GetPositionFromPlayer(Player player, float distance, int offset = 0)
|
||||
{
|
||||
var pos = player.Position;
|
||||
@@ -268,11 +270,11 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
}
|
||||
else if (user.FactionId != null)
|
||||
{
|
||||
if(user.FactionId > 3 || (user.FactionId >= 1 && user.FactionId <= 3 && duty))
|
||||
if (user.FactionId > 3 || (user.FactionId >= 1 && user.FactionId <= 3 && duty))
|
||||
{
|
||||
nameTagColor = user.FactionId.Value;
|
||||
}
|
||||
|
||||
|
||||
switch (user.FactionId)
|
||||
{
|
||||
case 1 when duty:
|
||||
@@ -314,5 +316,11 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
user.Player.SetSharedData("nameTagColor", nameTagColor);
|
||||
user.Player.SetSharedData("blipColor", blipColor);
|
||||
}
|
||||
|
||||
public static Vector3 GetInFrontOfPosition(this Player player)
|
||||
{
|
||||
player.TriggerEvent("SERVER:GetInFrontPosition");
|
||||
return player.GetSharedData<Vector3>("InFrontOf");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user