Handsup: Nur noch möglich, wenn man still steht

This commit is contained in:
hydrant
2021-04-22 13:52:05 +02:00
parent be5dc8c8ca
commit e669425dd8
6 changed files with 32 additions and 5 deletions

View File

@@ -138,7 +138,7 @@ namespace ReallifeGamemode.Server.Extensions
public static bool IsAfk(this Player player)
{
if(!player.HasSharedData("isAfk"))
if (!player.HasSharedData("isAfk"))
{
return false;
}
@@ -339,7 +339,7 @@ namespace ReallifeGamemode.Server.Extensions
int nameTagColor = 0;
Player player = user.Player;
if(player == null || !player.IsLoggedIn())
if (player == null || !player.IsLoggedIn())
{
return;
}
@@ -347,7 +347,7 @@ namespace ReallifeGamemode.Server.Extensions
bool duty = user.GetData<bool>("duty");
bool adminUnshow = user.GetData<bool>("adminUnshow");
if(adminUnshow)
if (adminUnshow)
{
blipColor = -1;
nameTagColor = -3;
@@ -437,6 +437,11 @@ namespace ReallifeGamemode.Server.Extensions
}
}
public static void CheckToggleSurrender(this Player player)
{
player.TriggerEvent("SERVER:Handsup_CheckIfPlayerCanHandsup");
}
public static void ToggleSurrender(this Player player)
{
if (player.HasAnimation("hup"))