Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Box maker
#1


Attached Files
.rar   BoxMaker.rar (Size: 5.72 KB / Downloads: 86)
[Image: 6iiLEmPSEm0.jpg]
skype egor2398los
Reply

#2
Maybe its just me that have been AFK to long and have forgotten how to use theese things, but.

this thing just terrorized and killed my server :l
Reply

#3
(07-16-2013, 10:19)CJGreenLabel Wrote: Maybe its just me that have been AFK to long and have forgotten how to use theese things, but.

this thing just terrorized and killed my server :l

Look @author of this plugin.
He even don't know c-sharp.. lol...
(There was not so big war)

1. He uses stream when it's framing.
2. Stream is not closed after write/read.
3. It could spawn 10 boxes when you just press F at once. lol.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#4
Why you don't save sometime for your self?
There is already a better release by: @8q4s8!!
Its realy nice and with timer so that if u press F than its not place 10 boxes in once what @SailorMoon said.

Link:Klick Here!

Source:
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Text;
using Extension8Q;
using System.Timers;

namespace ClassLibrary1
{
    public class Class1:CPlugin
    {
        bool activated = false;
        Timer timer = new Timer();
        Timer timer2 = new Timer();
        Vector vec;
        ServerClient client;
        Entity spawn;
        int i = 75;

        public override ChatType OnSay(string Message, ServerClient Client)
        {
            if (Message == "!activate")
            {
                activated = !activated;
                client = Client;
                return ChatType.ChatNone;
            }
            return ChatType.ChatContinue;
        }

        public override void OnServerLoad()
        {
            timer.Elapsed += new ElapsedEventHandler(handler);
            timer.Interval = 500;
            timer.Enabled = true;

            timer2.Elapsed += new ElapsedEventHandler(handler2);
            timer2.Interval = 10;
            timer2.Enabled = true;
        }

        public void handler(object s, ElapsedEventArgs e)
        {
            if (activated)
            {
                if (client.Other.ButtonPressed(Buttons.Activate))
                {
                    Entity ent = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
                    Extensions.CloneBrushModelToScriptModel(ent, Extensions.FindAirdropCrateCollisionId());
                }
            }
        }
        public void handler2(object s,ElapsedEventArgs e)
        {
            if (activated)
            {
                if (client.Other.ButtonPressed(Buttons.Equipment))
                {
                    i = i - 1;
                }
                if (client.Other.ButtonPressed(Buttons.ADS))
                {
                    i = i + 1;
                }
                float x1 = client.OriginX + i * (float)Math.Cos(Get.MouseX(client.ClientNum) * (Math.PI / 180));
                float y1 = client.OriginY + i * (float)Math.Sin(Get.MouseX(client.ClientNum) * (Math.PI / 180));
                vec = new Vector(x1, y1, client.OriginZ + 50 - (Get.MouseY(client.ClientNum)*2));
                if (spawn == null)
                {
                    spawn = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
                }
                else
                {
                    spawn.OriginX = vec.X;
                    spawn.OriginY = vec.Y;
                    spawn.OriginZ = vec.Z;
                }
            }
            else
            {
                spawn.Delete();
                spawn = null;
            }
        }
    }
}

Ooh and btw on this part of your post
CREATOR:
@E-losev (main)
@SailorMoon (the Fload ) <--- is it not float?
@8q4s8 (Stream writer)
@99IRock (save boxes)
@master131 (extensions)
Reply

#5
(07-16-2013, 19:26)X-Track Wrote: Why you don't save sometime for your self?
There is already a better release by: @8q4s8!!
Its realy nice and with timer so that if u press F than its not place 10 boxes in once what @SailorMoon said.

Link:Klick Here!

Source:
Code:
using System;
using System.Collections.Generic;
using Addon;
using System.Text;
using Extension8Q;
using System.Timers;

namespace ClassLibrary1
{
    public class Class1:CPlugin
    {
        bool activated = false;
        Timer timer = new Timer();
        Timer timer2 = new Timer();
        Vector vec;
        ServerClient client;
        Entity spawn;
        int i = 75;

        public override ChatType OnSay(string Message, ServerClient Client)
        {
            if (Message == "!activate")
            {
                activated = !activated;
                client = Client;
                return ChatType.ChatNone;
            }
            return ChatType.ChatContinue;
        }

        public override void OnServerLoad()
        {
            timer.Elapsed += new ElapsedEventHandler(handler);
            timer.Interval = 500;
            timer.Enabled = true;

            timer2.Elapsed += new ElapsedEventHandler(handler2);
            timer2.Interval = 10;
            timer2.Enabled = true;
        }

        public void handler(object s, ElapsedEventArgs e)
        {
            if (activated)
            {
                if (client.Other.ButtonPressed(Buttons.Activate))
                {
                    Entity ent = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
                    Extensions.CloneBrushModelToScriptModel(ent, Extensions.FindAirdropCrateCollisionId());
                }
            }
        }
        public void handler2(object s,ElapsedEventArgs e)
        {
            if (activated)
            {
                if (client.Other.ButtonPressed(Buttons.Equipment))
                {
                    i = i - 1;
                }
                if (client.Other.ButtonPressed(Buttons.ADS))
                {
                    i = i + 1;
                }
                float x1 = client.OriginX + i * (float)Math.Cos(Get.MouseX(client.ClientNum) * (Math.PI / 180));
                float y1 = client.OriginY + i * (float)Math.Sin(Get.MouseX(client.ClientNum) * (Math.PI / 180));
                vec = new Vector(x1, y1, client.OriginZ + 50 - (Get.MouseY(client.ClientNum)*2));
                if (spawn == null)
                {
                    spawn = SpawnModel("script_model", "com_plasticcase_trap_friendly", vec);
                }
                else
                {
                    spawn.OriginX = vec.X;
                    spawn.OriginY = vec.Y;
                    spawn.OriginZ = vec.Z;
                }
            }
            else
            {
                spawn.Delete();
                spawn = null;
            }
        }
    }
}

Ooh and btw on this part of your post
CREATOR:
@E-losev (main)
@SailorMoon (the Fload ) <--- is it not float?
@8q4s8 (Stream writer)
@99IRock (save boxes)
@master131 (extensions)
sorry float*
for me it works fine, I do not use 8Q extansion, I already have a bunker!
Tongue thanks anyway @X-Track
[Image: 6iiLEmPSEm0.jpg]
skype egor2398los
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help change single file lzma maker to multiple in c# raminr63 1 3,056 05-12-2013, 19:31
Last Post: raminr63
Rainbow [Release] MW3: Plugin Maker V3 Nekochan 43 92,802 01-20-2013, 21:26
Last Post: Nekochan
  [Request] Random Weapon List Maker Scripts18 8 5,515 08-13-2011, 14:17
Last Post: Scripts18
  Class maker mod thing not working from ethenol dutchmen1 5 4,991 03-03-2011, 23:03
Last Post: d0h!
Question Help Extreme bunker maker blackout612 7 5,207 03-02-2011, 22:36
Last Post: blackout612
  [Release] Custom Camo maker photoshop plug-in iPaddie 3 8,685 02-16-2011, 02:58
Last Post: Cgallagher

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.