ItsMods

Full Version: spawn object
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can generate object in a certain place. I just want to do this sort of bunker for survivors. Maybe there is some program like the map editor?
(01-02-2013, 10:45)SaviouR9966 Wrote: [ -> ]How can generate object in a certain place. I just want to do this sort of bunker for survivors. Maybe there is some program like the map editor?

Code:
Entity ent1 = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(3724.289f, 4906.27f, 279.9418f));
I need a code that allows you to walk on boxes
http://www.itsmods.com/forum/Thread-Rele...sions.html
Make an .cs called Extensions and paste the code from there (The extensions.cs code)

You can use this onplayerspawn or also onmapchange.
I like to use onmapchange, but I don't know why :p
The public override void onmapchange
CSHARP Code
  1. public override void OnMapChange()
  2. {
  3. string map = GetDvar("mapname");
  4.  
  5. if (map == "mp_dome") // Choose your map here
  6. {
  7. //Carepackages here
  8. }
  9. }


Add this:
CSHARP Code
  1. Entity entity1 = SpawnModel("script_model", "com_plasticcase_trap_friendly", new Vector(3724.289f, 4906.27f, 279.9418f));


Than you add this line to make it solid (You can walk on boxes than)

CSHARP Code
  1. Extensions.CloneBrushModelToScriptModel(entity1, Extensions.FindAirdropCrateCollisionId());