#Trying to create Hints

1 messages · Page 1 of 1 (latest)

livid egret
#

I have a problem with HintService-Meow. (or LabApi IDK) my plugin loaded but hint not created. What's problem?

oblique moss
#

please contact hsm support, labapi isn't hsm

lyric totem
#

private static void OnSpawnedTest(PlayerSpawnedEventArgs ev)
{
Task.Delay(2000);

    System.Random random = new System.Random();
    PlayerDisplay playerDisplay = PlayerDisplay.Get(ev.Player);
    playerDisplay.ClearHint();
    int Age = random.Next(20, 70);
    ev.Player.CustomInfo = "Test: " + Age;
    Hint hint = new Hint
    {
        Text = "Test",
        FontSize = 25,
        YCoordinate = 1000,
        Alignment = HintAlignment.Center
    };
    playerDisplay.AddHint(hint);
}

this worked for me

#

just changed some stuff

lyric totem
#

why

oblique moss
#

it freezes the whole thread for that duration

#

meaning everyone will desync

lyric totem
#

ohh

#

will this desync it?

private async Task HideHintAfterDelayAsync(Hint hint, PlayerDisplay playerDisplay)
{
    await Task.Delay(2500);

    hint.Hide = true;
    playerDisplay.RemoveHint(hint);
}
oblique moss
#

just use Timing.CallDelayed 😭

lyric totem
#

cant find Timing

oblique moss
#

Assembly-CSharp-firstpass

#

MEC

lyric totem
#

ok

nimble wigeon
atomic dock
atomic dock
barren pike
#

writing int Age in a method

#

is evil

atomic dock
#

One sec I've gotta put away groceries first