Release Box maker
#1
BOXES MAKER v1

hey hey, I made a boxmaker Big Grin
How to use it?

1. move my plugin in the plugins folder
2. click to activate
3. build a bunker
4.open your plugin, select the txt file with the coordinates and save them!

CREATOR:
@E-losev (main)
@SailorMoon (the Fload )
@8q4s8 (Stream writer)
@99IRock (save boxes)
@master131 (extensions)

How save boxes? http://www.itsmods.com/forum/Thread-Rele...oxes.html/
How make plugin? How save boxes? http://www.itsmods.com/forum/Thread-how-...-mod.html/
Source?
Code:
using Addon; using System; using System.IO; using System.Collections.Generic; namespace bmaker { public class maker : CPlugin { int ent = 0; public override void OnAddonFrame() { List<ServerClient> clients; try { clients = GetClients(); if (clients != null && clients.Count > 0) { foreach (ServerClient c in GetClients()) { if (c.Other.isAlive == true) { if (c.Other.ButtonPressed(Buttons.Activate)) { float locationX = c.OriginX; float locationY = c.OriginY; float locationZ = c.OriginZ + 12f; iPrintLnBold("^2+1!", c); c.OriginZ += 40f; Entity entdefault = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(locationX, locationY, locationZ)); Extensions.CloneBrushModelToScriptModel(entdefault, Extensions.FindAirdropCrateCollisionId()); ent = ent + 1; int locx, locy, locz; locx = Convert.ToInt32(locationX); locy = Convert.ToInt32(locationY); locz = Convert.ToInt32(locationZ); string map = GetDvar("mapname"); StreamWriter writer = new StreamWriter("\\plugins\\" + map + ".txt", true); writer.WriteLine("Entity ent" + ent + " = SpawnModel(" + "script_model" + "," + "com_plasticcase_trap_friendly" + "," + "new Vector(" + locx + "f" + "," + locy + "f" + "," + locz + "f" + "))" + ";"); writer.Dispose(); } } } } } catch (Exception e) { ServerPrint("Error box maker: " + e.Message); } } public override void OnServerLoad() { ServerPrint("Boxes maker by Egor L LOADED"); } } }
Thx @8q4s8 for
PHP Code:
string script_model = "script_model"; string com_plasticcase_trap_friendly = "com_plasticcase_trap_friendly";
use : put them after
PHP Code:
public class Boxes : CPlugin // Always use : CPlugin behind your class name { /*this*/
Big Grin


Attached Files
.rar   BoxMaker.rar (Size: 5.72 KB / Downloads: 124)
[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 4,011 05-12-2013, 19:31
Last Post: raminr63
Rainbow [Release] MW3: Plugin Maker V3 Nekochan 43 99,536 01-20-2013, 21:26
Last Post: Nekochan
  [Request] Random Weapon List Maker Scripts18 8 7,119 08-13-2011, 14:17
Last Post: Scripts18
  Class maker mod thing not working from ethenol dutchmen1 5 6,488 03-03-2011, 23:03
Last Post: d0h!
Question Help Extreme bunker maker blackout612 7 6,968 03-02-2011, 22:36
Last Post: blackout612
  [Release] Custom Camo maker photoshop plug-in iPaddie 3 9,884 02-16-2011, 02:58
Last Post: Cgallagher

Forum Jump:


Users browsing this thread:

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