07-12-2013, 09:17
07-16-2013, 10:19
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
this thing just terrorized and killed my server :l
07-16-2013, 11:34
(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.
07-16-2013, 19:26
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:
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)
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)
07-17-2013, 04:18
(07-16-2013, 19:26)X-Track Wrote: [ -> ]Why you don't save sometime for your self?sorry float*
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)
for me it works fine, I do not use 8Q extansion, I already have a bunker!
thanks anyway @X-Track
Spoiler (Click to View)
1 atb eKc7 py @SailorMoon