Skip to content

Commit

Permalink
Adding Timer Methods to SAM
Browse files Browse the repository at this point in the history
- Adds IsTimerActive and StartTimer methods to HelperMethods
  • Loading branch information
data-bomb committed Mar 20, 2024
1 parent 7ebe1a0 commit 9643de5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Si_AdminMod/HelperMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace SilicaAdminMod
{
public static class HelperMethods
{
public static readonly float Timer_Inactive = -123.0f;
public const string defaultColor = "<color=#DDE98C>";
public const string chatPrefix = "<b>" + defaultColor + "[<color=#DFA725>SAM" + defaultColor + "]</b> ";

Expand Down Expand Up @@ -413,5 +414,20 @@ public static bool KickPlayer(Player playerToKick)

return spawnedObject;
}

public static bool IsTimerActive(float time)
{
if (time >= 0.0f)
{
return true;
}

return false;
}

public static void StartTimer(ref float timer)
{
timer = 0.0f;
}
}
}

0 comments on commit 9643de5

Please sign in to comment.