Fix Spec4

This commit is contained in:
VegaZ
2021-05-05 00:21:07 +02:00
parent fe0d909bb1
commit 93a2ec9402
2 changed files with 8 additions and 4 deletions

View File

@@ -1824,7 +1824,11 @@ namespace ReallifeGamemode.Server.Commands
player.SafeTeleport(target.Position); player.SafeTeleport(target.Position);
NAPI.Task.Run(() =>
{
player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); player.TriggerEvent("SERVER:ADMIN_SPECTATE", target);
}, 100);
} }
else else
{ {
@@ -1851,9 +1855,9 @@ namespace ReallifeGamemode.Server.Commands
return; return;
} }
bool currentStatus = user.GetData<bool>("adminUnshow"); bool currentStatus = player.GetData<bool>("adminUnshow");
currentStatus = !currentStatus; currentStatus = !currentStatus;
user.SetData("adminUnshow", currentStatus); player.SetData("adminUnshow", currentStatus);
player.TriggerEvent("toggleAdminUnshowMode", currentStatus); player.TriggerEvent("toggleAdminUnshowMode", currentStatus);
user.SetBlipAndNametagColor(); user.SetBlipAndNametagColor();

View File

@@ -356,7 +356,7 @@ namespace ReallifeGamemode.Server.Extensions
} }
bool duty = user.GetData<bool>("duty"); bool duty = user.GetData<bool>("duty");
bool adminUnshow = user.GetData<bool>("adminUnshow"); bool adminUnshow = player.GetData<bool>("adminUnshow");
if (adminUnshow) if (adminUnshow)
{ {