Release [CODE][TUT]Boxes
#11
@8q4s8 thanks anyway Tongue
But I did post it in steps 7,8,9 or something like that Tongue
But thanksSmile
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#12
is it possible if u can make an video?
Reply

#13
(01-08-2013, 19:37)EnVi Sweden Rocks Wrote: is it possible if u can make an video?

What should I do in it? Make the code live? Tongue
If you want that I can maybe do it, but not today I got an test in 20 minutes so I need to learn for that , and I will be late back.
Maybe tomorrow
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#14
(01-08-2013, 19:33)99IRock Wrote: Noo Tongue, look In my topic at the lower bottom I expained it (where to place it)
place it after
Code:
public class Boxes : CPlugin // Always use : CPlugin behind your class name {

@8q4s8 I would like to have that Smile

Writing it to a textfile:

Code:
string map = GetDvar("mapname"); StreamWriter writer = new StreamWriter("C:\\Mw3\\Entity\\" + map + ".txt", true); writer.WriteLine("Entity ent" + ent + " = SpawnModel(" + "script_model" + "," + "com_plasticcase_trap_friendly" + "," + "new Vector(" + locationX + "f" + "," + locationY + "f" + "," + locationZ + "f" + "))" + ";"); writer.Dispose(); writer.Close();
Reply

#15
np man, i can wait Smile
Reply

#16
(01-08-2013, 18:44)99IRock Wrote: I made this tutorial for @SaviouR9966 and offcourse any other people who needs it
Well most of the people know this info already, but for the new people:
I made some basic commands to help you making carepackage boxes.
First of all the basics on making a plugin:
1 Make a new project in visual studio.
2 Make 2 classes, Extensions.cs and Boxes.cs
3 Copy and paste the code from this to extensions.cs topic made by@master131
4 Put those parts of code in Boxes.cs

Extensions.cs

is it only that code i need to copy, not the other ones? (step 3)
Reply

#17
You need to click on "this" and than copy the code of extensions.cs there, and paste it in your extensions.cs
The link was wrong, I fixed it
http://www.itsmods.com/forum/Thread-Rele...3#pid94703
Sorry :p
[Image: b_560_95_1.png]
[Image: hax0r3ez.gif]
Reply

#18
I made everything according to the instruction but at compilation of this code:
Code:
using System; using Addon; namespace Addon { public class Boxes : CPlugin // : CPlugin { public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat) { if (Message == "!noclip") // { Client.Other.NoClip = !Client.Other.NoClip; // koro35 Return ChatType.ChatNone; } if (Message == "!pos") // { ServerPrint(Client.Name + "is on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ); // Serverprints the coords TellClient(Client.ClientNum, "You are on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ, true); // Send a message to client return ChatType.ChatNone; } } // } public override void OnMapChange() // The event OnMapChange { string map = GetDvar("mapname"); if (map == "mp_dome") // - { Entity domeleft = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(462f, 108f, -220f)); // domeleft 462f, 108f, -220f Entity domeright = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(-373f, -103f, -220f)); // domeright -373f, -103f, -220f Extensions.CloneBrushModelToScriptModel(domeleft, Extensions.FindAirdropCrateCollisionId()); // Extensions.CloneBrushModelToScriptModel(domeright, Extensions.FindAirdropCrateCollisionId()); // } } // } }
There are these mistakes:
Mistake 1 Inadmissible element "."
The mistake 2 Is required ";"
The mistake 3 Is required ";"

In this line:
Code:
Return ChatType.ChatNone;

How to correct it?
Reply

#19
Good tutorial, wrong section. Moved.

return is a keyword and shouldn't be capitalized.
Reply

#20
(01-09-2013, 08:12)ltybcs Wrote: How to correct it?

Code:
using System; using Addon; namespace Addon { public class Boxes : CPlugin // : CPlugin { public override ChatType OnSay(String Message, ServerClient Client, bool Teamchat) { if (Message == "!noclip") // { Client.Other.NoClip = !Client.Other.NoClip; // koro35 return ChatType.ChatNone; } if (Message == "!pos") // { ServerPrint(Client.Name + "is on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ); // Serverprints the coords TellClient(Client.ClientNum, "You are on the position X: " + Client.OriginX + " Y: " + Client.OriginY + " Z: " + Client.OriginZ, true); // Send a message to client return ChatType.ChatNone; } return ChatType.ChatContinue; } // } public override void OnMapChange() // The event OnMapChange { string map = GetDvar("mapname"); if (map == "mp_dome") // - { Entity domeleft = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(462f, 108f, -220f)); // domeleft 462f, 108f, -220f Entity domeright = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(-373f, -103f, -220f)); // domeright -373f, -103f, -220f Extensions.CloneBrushModelToScriptModel(domeleft, Extensions.FindAirdropCrateCollisionId()); // Extensions.CloneBrushModelToScriptModel(domeright, Extensions.FindAirdropCrateCollisionId()); // } } // } }
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Code color crosshairs koren30 3 5,263 10-02-2013, 19:26
Last Post: koren30
  Help need help?how to make plugins code hXnarutoXone 12 11,725 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 4,329 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 5,821 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 12,768 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 7,656 07-28-2013, 01:52
Last Post: First_Semyon
  [Release] Interactive Boxes Yamato 1 3,610 06-29-2013, 18:20
Last Post: DidUknowiPwn
  Code of vector Bloodfocus 1 3,333 06-23-2013, 11:54
Last Post: Yamato
  Help boxes [HARD] Tony. 3 4,050 05-16-2013, 18:29
Last Post: DidUknowiPwn
  problem with gsc code CheGuevara 5 7,929 04-20-2013, 15:06
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

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