-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cs
More file actions
40 lines (35 loc) · 964 Bytes
/
Main.cs
File metadata and controls
40 lines (35 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Rocket.Core.Plugins;
using Rocket.Unturned;
using Rocket.Unturned.Player;
using SDG.Unturned;
namespace BPlugins.Notifications;
public class Main : RocketPlugin<Configuration>
{
protected override void Load()
{
U.Events.OnPlayerConnected += OnPlayerJoined;
}
private void OnPlayerJoined(UnturnedPlayer player)
{
EffectManager.sendUIEffect(
Configuration.Instance.NotificationUI,
3760,
player.Player.channel.GetOwnerTransportConnection(),
false
);
for (var i = 0; i < 100; i++)
{
EffectManager.sendUIEffectVisibility(
3760,
player.Player.channel.GetOwnerTransportConnection(),
false,
$"Notification:{i}:Anim",
false
);
}
}
protected override void Unload()
{
U.Events.OnPlayerConnected -= OnPlayerJoined;
}
}