Post: [CODE]*Build bunkers in-game*
02-21-2011, 09:51 PM #1
Woof
...hmm
(adsbygoogle = window.adsbygoogle || []).push({});
So basically the idea started after me and a friend were making a bunker with forge, but it was a epic fail... so here you go just something a made within the last 10minutes.
NOTE: you will need the building functions for these to work !
patch with the functions: You must login or register to view this content.
Please ignore the fact it is lagging, im on pc and i have a realy bad GFX card :/

get the functionsYou must login or register to view this content.

Walls: working
    walls(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1WALL^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateWalls(st), (en);
self iPrintLn("Done.");
self notify("jw");
}}



Floors: working
    floors(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1FLOOR^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateGrids((st),(en),(0,0,0));
self iPrintLn("Done.");
self notify("jw");
}}


Ramps: working
    ramps(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1RAMP^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateRamps(st), (en);
self iPrintLn("Done.");
self notify("jw");
}}



Teleporters: working
    teleporters(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1TELE^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateElevator((st), (en), (0, 0, 0));
self iPrintLn("Done.");
self notify("jw");
}}



+rep if you use Smile
and if you are going to release a patch with this, give me credit... don't I diverse it ?
(adsbygoogle = window.adsbygoogle || []).push({});

The following 29 users say thank you to Woof for this useful post:

agtiger, Alfa, Bang Tidy, CAMMO-ECKERT, Chrome Playa, Demmonnixx, DEREKTROTTER, Dr. Dre, Dreamcather, Fifa97, GamingPresents, GangstaCupcake1, GetDeleted -_-, H4CK_De_TRiiZo, hydro_122499, IAMSTEN, iJokaa, Janiboy, maxrox, mental_taliban, Mw2Freak13, Officer Laggy, oO-GKUSH-Oo, Plurals, RaverBoy, RusterG, TheFlowRidah, xIAmSchwem, xT4sSin
02-21-2011, 10:48 PM #11
DEREKTROTTER
You're Goddamn Right
very clever, but how do you save the bunkers for after when the game ends?

you need to do something similar to forge2code where it saves to a .log
02-21-2011, 10:50 PM #12
Chrome Playa
Chrome Gaming Reloaded
Originally posted by DEREKTROTTER View Post
very clever, but how do you save the bunkers for after when the game ends?

you need to do something similar to forge2code where it saves to a .log


I was thinking of something similar, but I'm not sure it is possible to export data while in-game.
02-21-2011, 11:03 PM #13
Woof
...hmm
Originally posted by Chrome
I was thinking of something similar, but I'm not sure it is possible to export data while in-game.

yeah i agree, but i may give it a go....
02-21-2011, 11:05 PM #14
emsp
Space Ninja
Originally posted by Chrome
I was thinking of something similar, but I'm not sure it is possible to export data while in-game.


Could u Help me add it i keep geting errors

menu
    

getFunMenu(){
menu = spawnStruct();
menu.name = [];
menu.function = [];
menu.input = [];

menu.name[menu.name.size] = "^4Fun";
menu.name[menu.name.size] = "Flashing Scoreboard";
menu.name[menu.name.size] = "Custom Sights";
menu.name[menu.name.size] = "Select Custom Sights";
menu.name[menu.name.size] = "Modded Bullets";
menu.name[menu.name.size] = "Select Modded Bullet";
menu.name[menu.name.size] = "Wallhack";
menu.name[menu.name.size] = "UFO Mode";
menu.name[menu.name.size] = "KillStreak Box";
menu.name[menu.name.size] = "Fake CarePackage";
menu.name[menu.name.size] = "Automatic Drop Shot";
menu.name[menu.name.size] = "Build Walls";
menu.name[menu.name.size] = "Build Floors";
menu.name[menu.name.size] = "Build Ramps";
menu.name[menu.name.size] = "Build Telporters";

menu.function[menu.function.size+1] = ::FlashScore;
menu.function[menu.function.size+1] = ::CustomSights;
menu.function[menu.function.size+1] = ::ToggleCustomSights;
menu.function[menu.function.size+1] = ::ModdedBullets;
menu.function[menu.function.size+1] = ::ChangeBullets;
menu.function[menu.function.size+1] = ::WallHack;
menu.function[menu.function.size+1] = ::ToggleUFO;
menu.function[menu.function.size+1] = ::doRandomKillBox;
menu.function[menu.function.size+1] = :HappyaftDrop;
menu.function[menu.function.size+1] = ::autoDropShot;
menu.function[menu.function.size+1] = maps\mp\gametypes\Jews::walls;
menu.function[menu.function.size+1] = maps\mp\gametypes\Jews::floors;
menu.function[menu.function.size+1] = maps\mp\gametypes\Jews::ramps;
menu.function[menu.function.size+1] = maps\mp\gametypes\Jews::OMGGG;

menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";
menu.input[menu.input.size+1] = "";

return menu;
}




jews.gsc

    
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;

DoGhost(){
WP("500,60,600,60,625,60,650,60,725,60,750,60,775,60,800,60,875,60,950,60,1025,60,1050,60,1075,60,1100,60,1125,60,1150,60,500,90,600,90,725,90,800,90,875,90,950,90,1025,90,1150,90,500,120,600,120,625,120,650,120,725,120,800,120,875,120,900,120,925,120,950,120,1025,120,1050,120,1075,120,1100,120,1150,120,500,150,650,150,725,150,800,150,875,150,950,150,1150,150,500,180,650,180,725,180,800,180,875,180,950,180,1150,180,450,210,475,210,500,210,525,210,550,210,600,210,625,210,650,210,725,210,750,210,775,210,800,210,875,210,950,210,1025,210,1050,210,1075,210,1100,210,1125,210,1150,210",1000,0);
}

DoBigD(){
WP("650,30,675,30,700,30,725,30,800,30,825,30,850,30,875,30,900,30,975,30,1050,30,1075,30,1100,30,1125,30,625,60,725,60,800,60,900,60,975,60,1050,60,1125,60,600,90,725,90,800,90,825,90,850,90,900,90,975,90,1050,90,1125,90,600,120,725,120,900,120,1050,120,1075,120,1100,120,1125,120,600,150,725,150,900,150,950,150,975,150,1000,150,1050,150,1125,150,625,180,725,180,800,180,825,180,850,180,875,180,900,180,950,180,1000,180,1050,180,1125,180,650,210,675,210,700,210,725,210,950,210,975,210,1000,210,1050,210,1075,210,1100,210,1125,210",1000,0);
}

DoJonnyk(){
WP("250,30,275,30,300,30,325,30,1125,30,1150,30,375,60,450,60,550,60,650,60,675,60,700,60,750,60,800,60,825,60,850,60,900,60,950,60,975,60,1000,60,1025,60,1100,60,1175,60,400,90,450,90,550,90,650,90,700,90,750,90,800,90,850,90,900,90,950,90,1025,90,1100,90,425,120,450,120,550,120,650,120,700,120,750,120,800,120,850,120,900,120,950,120,1025,120,1100,120,425,150,450,150,550,150,650,150,700,150,750,150,800,150,850,150,900,150,950,150,1025,150,1100,150,400,180,450,180,525,180,575,180,650,180,700,180,750,180,800,180,850,180,900,180,950,180,1025,180,1100,180,375,210,450,210,500,210,600,210,650,210,700,210,725,210,750,210,800,210,850,210,875,210,900,210,950,210,975,210,1000,210,1025,210,1100,210",1000,0);
}

DoUmm(){
WP("625,0,700,0,725,0,750,0,825,0,950,0,1025,0,1050,0,1075,0,1100,0,1125,0,625,30,700,30,825,30,950,30,1125,30,625,60,700,60,825,60,875,60,900,60,950,60,1125,60,550,90,575,90,600,90,625,90,700,90,725,90,750,90,825,90,875,90,900,90,950,90,1025,90,1050,90,1075,90,1100,90,1125,90,550,120,625,120,750,120,825,120,875,120,900,120,950,120,1125,120,550,150,625,150,750,150,825,150,850,150,925,150,950,150,1125,150,550,180,575,180,600,180,625,180,700,180,725,180,750,180,1025,180,1050,180,1075,180,1100,180,1125,180",1000,0);
}

DoJew(){
WP("675,0,700,0,825,0,850,0,925,0,950,0,975,0,1000,0,1100,0,1125,0,675,30,725,30,800,30,850,30,1000,30,1075,30,1150,30,675,60,750,60,775,60,850,60,1000,60,1075,60,675,90,850,90,925,90,950,90,975,90,1000,90,1075,90,675,120,850,120,1000,120,1075,120,675,150,850,150,1000,150,1075,150,675,180,850,180,925,180,950,180,975,180,1000,180,1075,180",1000,0);
}

DoAww(){
WP("925,0,950,30,425,60,450,60,475,60,500,60,525,60,550,60,600,60,625,60,650,60,675,60,700,60,725,60,775,60,850,60,975,60,1150,60,1200,60,425,90,475,90,500,90,550,90,600,90,650,90,675,90,725,90,775,90,850,90,1000,90,1050,90,1075,90,425,120,475,120,500,120,550,120,600,120,650,120,675,120,725,120,775,120,800,120,825,120,850,120,1100,120,1125,120,1175,120,425,150,550,150,600,150,725,150,775,150,850,150,1100,150,1125,150,1175,150,775,180,850,180,1000,180,1050,180,1075,180,775,210,800,210,825,210,850,210,975,210,1150,210,1200,210,950,240,925,270",1000,0);
}

BombThatNigga(p){
Gun=self getCurrentWeapon();
p attach("weapon_c4_mp", "j_shouldertwist_le", false);
self maps\mp\gametypes\_hud_message::hintMessage("Press ^3[{+actionslot 3}]^7 To Detonate");
self notifyOnPlayerCommand("switch", "+actionslot 3");
self waittill("switch");
self _giveWeapon("c4_mp");
self switchToWeapon("c4_mp");
self notifyOnPlayerCommand("blow", "+attack");
self waittill("blow");
MagicBullet( "ac130_40mm_mp", p.origin +(0, 0, 1), p.origin, self );
self switchToWeapon(gun);
wait 1;
self takeWeapon("c4_mp");
}
CreateGrids(corner1, corner2, angle)
{
W = Distance((corner1[0], 0, 0), (corner2[0], 0, 0));
L = Distance((0, corner1[1], 0), (0, corner2[1], 0));
H = Distance((0, 0, corner1[2]), (0, 0, corner2[2]));
CX = corner2[0] - corner1[0];
CY = corner2[1] - corner1[1];
CZ = corner2[2] - corner1[2];
ROWS = roundUp(W/55);
COLUMNS = roundUp(L/30);
HEIGHT = roundUp(H/20);
XA = CX/ROWS;
YA = CY/COLUMNS;
ZA = CZ/HEIGHT;
center = spawn("script_model", corner1);
for(r = 0; r <= ROWS; r++){
for(c = 0; c <= COLUMNS; c++){
for(h = 0; h <= HEIGHT; h++){
block = spawn("script_model", (corner1 + (XA * r, YA * c, ZA * h)));
block setModel("com_plasticcase_friendly");
block.angles = (0, 0, 0);
block Solid();
block LinkTo(center);
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
}
}
center.angles = angle;
}
walls(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1WALL^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateWalls(st, en);
self iPrintLn("Done.");
self notify("jw");
}}
floors(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1FLOOR^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateGrids((st),(en),(0,0,0));
self iPrintLn("Done.");
self notify("jw");
}}
ramps(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1RAMP^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateRamps(st, en);
self iPrintLn("Done.");
self notify("jw");
}}
OMGGG(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1TELE^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateElevator((st), (en), (0, 0, 0);
self iPrintLn("Done.");
self notify("jw");
}}

CreateElevator(enter, exit, angle)
{
flag = spawn( "script_model", enter );
flag setModel( level.elevator_model["enter"] );
wait 0.01;
flag = spawn( "script_model", exit );
flag setModel( level.elevator_model["exit"] );
wait 0.01;
self thread ElevatorThink(enter, exit, angle);
}

ElevatorThink(enter, exit, angle)
{
self endon("disconnect");
while(1)
{
foreach(player in level.players)
{
if(Distance(enter, player.origin) <= 50){
player SetOrigin(exit);
player SetPlayerAngles(angle);
}
}
wait .25;
}
}
CreateRamps(top, bottom)
{
D = Distance(top, bottom);
blocks = roundUp(D/30);
CX = top[0] - bottom[0];
CY = top[1] - bottom[1];
CZ = top[2] - bottom[2];
XA = CX/blocks;
YA = CY/blocks;
ZA = CZ/blocks;
CXY = Distance((top[0], top[1], 0), (bottom[0], bottom[1], 0));
Temp = VectorToAngles(top - bottom);
BA = (Temp[2], Temp[1] + 90, Temp[0]);
for(b = 0; b < blocks; b++){
block = spawn("script_model", (bottom + ((XA, YA, ZA) * B)));
block setModel("com_plasticcase_friendly");
block.angles = BA;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
block = spawn("script_model", (bottom + ((XA, YA, ZA) * blocks) - (0, 0, 5)));
block setModel("com_plasticcase_friendly");
block.angles = (BA[0], BA[1], 0);
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.01;
}
CreateWalls(start, end)
{
D = Distance((start[0], start[1], 0), (end[0], end[1], 0));
H = Distance((0, 0, start[2]), (0, 0, end[2]));
blocks = roundUp(D/55);
height = roundUp(H/30);
CX = end[0] - start[0];
CY = end[1] - start[1];
CZ = end[2] - start[2];
XA = (CX/blocks);
YA = (CY/blocks);
ZA = (CZ/height);
TXA = (XA/4);
TYA = (YA/4);
Temp = VectorToAngles(end - start);
Angle = (0, Temp[1], 90);
for(h = 0; h < height; h++){
block = spawn("script_model", (start + (TXA, TYA, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
for(i = 1; i < blocks; i++){
block = spawn("script_model", (start + ((XA, YA, 0) * i) + (0, 0, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
}
block = spawn("script_model", ((end[0], end[1], start[2]) + (TXA * -1, TYA * -1, 10) + ((0, 0, ZA) * h)));
block setModel("com_plasticcase_friendly");
block.angles = Angle;
block Solid();
block CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
wait 0.001;
}
}
02-21-2011, 11:09 PM #15
xIAmSchwem
inactive due to life
Good job BadMan
02-21-2011, 11:12 PM #16
Woof
...hmm
there was a syntax in this... it should work now.
just replace it.
    OMGGG(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1TELE^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateElevator((st), (en), (0, 0, 0));
self iPrintLn("Done.");
self notify("jw");
}}
02-21-2011, 11:25 PM #17
emsp
Space Ninja
Originally posted by BadMan
there was a syntax in this... it should work now.
just replace it.
    OMGGG(){
self endon("jw");
self iPrintLnBold( "Please press down at starting persission of [^1TELE^7]" );
self notifyOnPlayerCommand( "SL", "+actionslot 2" );
for(;Winky Winky{
self waittill("SL");
st = self getOrigin();
self iPrintLn("Start persission saved.");
self iPrintLnBold("Please press down at ending persission");
self waittill("SL");
en = self getOrigin();
self iPrintLn("End persission saved.");
self iPrintLnBold("ready, press down to start build.");
self waittill("SL");
self iPrintLn("started....");
CreateElevator((st), (en), (0, 0, 0));
self iPrintLn("Done.");
self notify("jw");
}}


im getting errors let and right can u post my edit and have u fix it?
02-21-2011, 11:26 PM #18
Originally posted by BadMan
yeah i agree, but i may give it a go....


That's pretty good. Wouldn't it be quicker if you used cursor pos instead of self origin though. You could go on top of buildings etc...
02-21-2011, 11:29 PM #19
Woof
...hmm
Originally posted by emsp View Post
im getting errors let and right can u post my edit and have u fix it?


I would help, but first make sure its not anything else making the errors please.

---------- Post added at 06:29 PM ---------- Previous post was at 06:27 PM ----------

Originally posted by .
That's pretty good. Wouldn't it be quicker if you used cursor pos instead of self origin though. You could go on top of buildings etc...


yea, but i made this for me realy and i like doing it were i stand Smile
so then i have a feel of were it is.
btw were you been ? i thought you stopped :S

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo