Thread: kill zone

Results 1 to 4 of 4
  1. #1
    qwerty939's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1

    kill zone

    as it can be converted to foudeltaone?

    Code:
    using System; 
    using Addon; 
    using System.Collections.Generic; 
    using System.Text; 
     
     
    namespace killzone 
    { 
        public class killzone : CPlugin 
        { 
            Dictionary<int, int> HudElem = new Dictionary<int, int>(); 
     
            public static float Difference(float loc, float loc2) 
            { 
                return Math.Abs(loc - loc2); 
            } 
     
     
            float x; 
            float y; 
     
            int distW; 
            int distKill; 
      
            String map = ""; 
      
            public override void OnMapChange() 
            { 
                map = GetDvar("mapname"); 
                if (map == "mp_mogadishu") 
                { 
                    ////Zone of Death 
                    x = 1000f; //coord X 
                    y = 2100f; // coord Y 
                    distKill = 200; // Zone of Death 
                    //// Warning Message 
                    distW = distKill + 100; 
                } 
            } 
     
     
            public override void OnServerFrame() 
            { 
     
               List<ServerClient> clients; 
                try 
                { 
                    clients = GetClients(); 
                    if (clients != null) 
                    { 
                        foreach (ServerClient client in GetClients()) 
                        { 
                            HudElem hud = GetHudElement(HudElem[client.ClientNum]); 
                            if (client.Other.isAlive == true && 
           client.ConnectionState != ConnectionStates.MapLoading && 
           client.ConnectionState != ConnectionStates.Connecting && 
           client.ConnectionState != ConnectionStates.Zombie) 
                            { 
     
                               if (map == "mp_mogadishu") 
                                { 
                                    if ((Difference(client.OriginX, x) <= distKill) && (Difference(client.OriginY, y) <= distKill)) 
                                    { 
                                        KillPlayer(client.ClientNum, client.ClientNum, GetWeapon("iw5_m60jugg"), string.Empty); 
                                    } 
     
                                    if ((Difference(client.OriginX, x) <= distW) && (Difference(client.OriginY, y) <= distW)) 
                                   { 
                                        hud.SetString("^1ВНИМАНИЕ! ВЫ рядом с Зоной Смерти!!!"); 
                                    } 
                                    else 
                                    { 
                                        hud.SetString(""); 
                                    } 
                                } 
                            } 
                        } 
                    } 
                } 
                catch (Exception e) 
                { 
                    ServerPrint("Error in killzone plugin: \n" + 
                                 e.Message + "\n" + 
                                 e.StackTrace + "\n" + 
                                 e.Source + "\n" + 
                                 e.InnerException + "\n" + 
                                 e.HelpLink); 
                } 
      
            } 
            private int CreateHud(int ClientNum) 
            { 
                HudElem hud = CreateNewHudElem(); 
                hud.Type = HudElementTypes.Text; 
                hud.ShowToEnt = ClientNum; 
                hud.HideInMenu = true; 
                hud.Font = HudElementFonts.Default; 
                hud.FontScale = 1.5f; 
                hud.PointType = 120; 
                hud.OriginY = 300f; 
                hud.OriginX = -100f; 
                hud.SetString(""); 
                return hud.HudElementNum; 
            } 
            public override void OnPlayerDisconnect(ServerClient Client) 
            { 
                if (HudElem.ContainsKey(Client.ClientNum)) 
                { 
                    HudElem hud2 = GetHudElement(HudElem[Client.ClientNum]); 
                    hud2.Type = HudElementTypes.None; 
                    HudElem.Remove(Client.ClientNum); 
                } 
            } 
            public override void OnPlayerConnect(ServerClient Client) 
            { 
                int Hud1 = CreateHud(Client.ClientNum); 
                if (HudElem.ContainsKey(Client.ClientNum)) 
                    HudElem[Client.ClientNum] = Hud1; 
                else 
                    HudElem.Add(Client.ClientNum, Hud1); 
            } 
     
       } 
     
    }

  2. #2
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Sure it can. Learn C# and it'll be easy.

  3. #3
    qwerty939's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    1
    learn C # for a long time, for what that little code, you know C # can you help me?

  4. #4
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,876
    My Mood
    Psychedelic
    Quote Originally Posted by qwerty939 View Post
    learn C # for a long time, for what that little code, you know C # can you help me?
    I could....But I see no reason to especially if you choose to take the easy way.

    If you want something, don't depend on people to do it for you. You'll get more satisfaction in being able to say: "Yes, I made this." or "I did this by myself".

Similar Threads

  1. KILL ZONE 3 CLAN
    By d.c on da scene in forum Playstation Hacking
    Replies: 3
    Last Post: 04-17-2011, 03:09 PM
  2. Kill Zone tag?
    By Ryguy in forum Showroom
    Replies: 7
    Last Post: 11-07-2010, 11:48 AM
  3. how do you take away kill zones
    By JoeAbunga in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 6
    Last Post: 11-03-2010, 05:28 AM
  4. Kill zone signature
    By kublkun in forum Showroom
    Replies: 32
    Last Post: 06-22-2009, 04:21 AM
  5. Kill zone sig
    By NabDab in forum Showroom
    Replies: 8
    Last Post: 05-02-2009, 12:19 AM