Пример #1
0
        static void SpawnCommand(OakwoodPlayer player, object[] args)
        {
            player.SpawnTempWeapons();

            player.Health = 200.0f;
            player.Spawn(new OakVec3(-1986.852539f, -5.089742f, 25.776871f), 180.0f);

            player.HUD.Fade(OakwoodFade.FadeIn, 500, 0xFFFFFF);
            player.HUD.Fade(OakwoodFade.FadeOut, 500, 0xFFFFFF);
        }
Пример #2
0
 static void Kill(OakwoodPlayer player, object[] args)
 {
     foreach (OakwoodPlayer p in Oakwood.Players)
     {
         p.HUD.Message($"{player.Name} commited suicide.", OakColor.White);
     }
     player.HUD.Fade(OakwoodFade.FadeIn, 500, OakColor.Red);
     player.SpawnTempWeapons();
     player.Health = 200.0f;
     player.Spawn(new OakVec3(-759.3801f, 13.24883f, 761.6967f), 180.0f);
     player.HUD.Fade(OakwoodFade.FadeOut, 500, OakColor.Red);
 }
Пример #3
0
        static void OnPlayerConnect(OakwoodPlayer player)
        {
            if (player.IsValid())
            {
                foreach (OakwoodPlayer p in Oakwood.Players)
                {
                    p.HUD.Message($"{player.Name} joined the game.", OakColor.White);
                }

                OakPlayerData data = new OakPlayerData();

                player.PlayerData = data;

                player.SpawnTempWeapons();

                player.Spawn(new OakVec3(-2136.182f, -5.768807f, -521.3138f), 90.0f);

                player.HUD.Announce("Welcome to SharpWood testing server!", 4.5f);
            }
        }
Пример #4
0
        private static void OnPlayerDeath(OakwoodPlayer player, OakwoodPlayer killer)
        {
            if (player.IsValid())
            {
                foreach (OakwoodPlayer p in Oakwood.Players)
                {
                    if (player == killer)
                    {
                        p.HUD.Message($"{player.Name} died.", OakColor.White);
                    }
                    else
                    {
                        p.HUD.Message($"{player.Name} was killed by {killer.Name}.", OakColor.White);
                    }
                }

                player.HUD.Announce("Wasted", 4.85f);

                Timer spawnTimer = new Timer();
                spawnTimer.Interval  = 5000;
                spawnTimer.AutoReset = false;
                spawnTimer.Elapsed  += (object sender, ElapsedEventArgs e) =>
                {
                    Timer waitTimer = new Timer();
                    player.HUD.Fade(OakwoodFade.FadeIn, 2500, OakColor.Black);
                    waitTimer.Interval  = 2500;
                    waitTimer.AutoReset = false;
                    waitTimer.Elapsed  += (object snd, ElapsedEventArgs ea) =>
                    {
                        player.SpawnTempWeapons();
                        player.Health = 200.0f;
                        player.Spawn(new OakVec3(-759.3801f, 13.24883f, 761.6967f), 180.0f);
                        player.HUD.Fade(OakwoodFade.FadeOut, 2500, OakColor.Black);
                    };
                    waitTimer.Start();
                };

                spawnTimer.Start();
            }
        }