Exemple #1
0
 object OnUserApprove(CodeHatch.Engine.Networking.Player player)
 {
     if (StripHtmlTags)
     {
         player.Name = StripTags(player.Name);
     }
     return(NameCheck(player.Name, player.Id.ToString()));
 }
Exemple #2
0
 void OnPlayerConnected(CodeHatch.Engine.Networking.Player player)
 {
     timer.In(5f, () =>
     {
         if (!player.Connection.IsConnected)
         {
             return;
         }
         HandlePing(player.Name, player.Id.ToString(), player.Connection.AveragePing);
     });
 }
Exemple #3
0
 void OnPlayerDisconnected(CodeHatch.Engine.Networking.Player player)
 {
     server.Broadcast(GetMessage("PlayerQuit", player.Id.ToString()).Replace("{name}", player.Name));
 }
Exemple #4
0
 void OnPlayerConnected(CodeHatch.Engine.Networking.Player player)
 {
     IsCountryBlocked(player.Name, player.Id.ToString(), IpAddress(player.Connection.IpAddress));
 }
Exemple #5
0
 bool IsPlayerAfk(CodeHatch.Engine.Networking.Player player) => IsPlayerAfk(players.GetOnlinePlayer(player.Id.ToString()));
Exemple #6
0
 void OnPlayerDisconnected(CodeHatch.Engine.Networking.Player player) => ResetPlayer(player.Id.ToString());
Exemple #7
0
 //OnPlayerSpawn(PlayerFirstSpawnEvent e)
 void OnPlayerConnected(CodeHatch.Engine.Networking.Player player) => AfkCheck(players.GetOnlinePlayer(player.Id.ToString()));
Exemple #8
0
 void OnChatCommand(CodeHatch.Engine.Networking.Player player, string command, string[] args)
 {
     PrintWarning("OnChatCommand works!");
 }