Post: [Script] FutureOps Last Mw2 Mod | Dodgeball Gamemode
02-16-2013, 01:44 AM #1
FutureOps
Little One
(adsbygoogle = window.adsbygoogle || []).push({}); This Is Unfinished, anyone may finish but leave my credits for 95% of script as well as Restxrt for helping me with quite a few things



Hello everyone, im officially done with modding mw2. I will probably move onto black ops or Mw3 patch making, and only because AlterRevolution doesn't want to connect to AlterRev so I cant test anything. Now I know this script works so far without an unknown function but I would like someone [anyone] to finish this! It may run fine how it is but idk, so tell me what you guys think!


Im not an idiot people, I know Chrome Playa already made a dodgeball gamemode, but this only works on Favela, and you throw actual soccerballs. I was originally going to make the balls have a realistic bounce and more but unfortunately I cant.


Sorry For No Video, if you read above you would know why there isn't one :P

Precache This Model
    precacheModel("soccer_ball");


Script Here [Note I would get an Unknown Function error if I moved in any other Gsc but _missions so put in missions or there will be error]
     
Dodgeball()//Made By FutureOps and ModdedModder // Dont LEECH!
{
level onPlayerConnect();
}
onPlayerConnect()
{
for(;Winky Winky
{
level waittill( "connected", player );
player thread onPlayerSpawned();
setdvar("scr_player_maxhealth","10");
}
}
onPlayerSpawned()
{
self endon( "disconnect" );
for(;Winky Winky
{
self waittill( "spawned_player" );
if (self isHost())
{
self thread Dodgeballinit();
self thread doFavelaEdit();
self thread DisableQuit();
if( getDvar( "g_gametype" ) != "sd" )
{
self iPrintlnBold( "Search And Destroy ^1ONLY!" );
setDvar("g_gametype","sd");
setdvar("scr_player_maxhealth","10");
setdvar("g_hardcore", "1");
setdvar("bg_shock_screenFlashShotFadeTime", "0");
setdvar("bg_shock_screenFlashWhiteFadeTime", "0");
setdvar("cg_drawShellshock", "0");
setdvar("cg_hudStanceFlash", "0");
setdvar("cg_flashbangNameFadeIn", "1");
setdvar("cg_flashbangNameFadeOut", "100000000");
wait 10;
self iPrintlnBold( "^2Restarting..." );
wait 5;
map_restart(false);
}
}
wait 1;
if( getDvar( "g_gametype" ) == "sd" )
{
self freezeControlsWrapper(true);
}
self.Intro["Text"][2] destroy();
self.Intro["Text"][1] destroy();
self.Intro["Text"][0] destroy();
self _clearperks();
self thread creatDodgeText();
self thread runDodgeDvars();
self thread runTeamSpawn();
self thread runTeamSpawn2();
self thread testTeamRedo();
self thread waittofreeze();
self thread Dewbs();
setdvar("scr_player_maxhealth","10");
self setClientDvar("g_hardcore", "1");
setdvar("bg_shock_screenFlashShotFadeTime", "0");
setdvar("bg_shock_screenFlashWhiteFadeTime", "0");
setdvar("cg_drawShellshock", "0");
setdvar("cg_hudStanceFlash", "0");
setdvar("cg_flashbangNameFadeIn", "1");
setdvar("cg_flashbangNameFadeOut", "100000000");
self.maxhealth = 10;
self.health = self.maxhealth;
self iPrintlnBold( "Building Map..." );
}
}
DisableQuit()
{
level endon("game_ended");
level endon("StopDisableQuit");
while(1)
{
foreach(player in level.players)
{
player CloseInGameMenu();
player closepopupMenu();
}
wait 0.05;
}
wait 0.001;
}
Dodgeballinit()
{
self endon("disconnect");
if( getDvar( "mapname" ) != "mp_favela" )
{
self iPrintLnBold( "^3Not Available On This Map. ^1Favela Only!" );
wait 2;
level thread maps\mp\gametypes\_gamelogic::forceEnd();
self iPrintLnBold( "^3Not Available On This Map. ^1Favela Only!" );
}
else
{

}
}
runDodgeDvars()
{
self setClientDvar("g_hardcore", "1");
self setClientDvar("bg_shock_screenFlashShotFadeTime", "0");
self setClientDvar("bg_shock_screenFlashWhiteFadeTime", "0");
self setClientDvar("cg_drawShellshock", "0");
self setClientDvar("cg_hudStanceFlash", "0");
self setClientDvar("cg_flashbangNameFadeIn", "1");
self setClientDvar("cg_flashbangNameFadeOut", "100000000");
}
doFavelaEdit()
{
self endon("disconnect");
if(!self.area)
{
CreateWalls((697.114, -1884.1, 150.156), (736.636, -2611.53, 205.225));
wait 0.1;
CreateWalls((745.902, -2616.46, 150.217), (1933.71, -2628.72, 205.079));
wait 0.1;
CreateWalls((692.534, -1880.09, 150.252), (1949.96, -1930.25, 205.766));
wait 0.1;
CreateWalls((1974.75, -1933.94, 150.562), (1940.22, -2625.97, 205.285));
wait 0.1;
CreateWalls((1975.58, -1938.73, 150.139), (1940.73, -2638.68, 205.024));
wait 0.1;
CreateWalls((1390.16, -2629.48, 165.531),(1383.03, -1893.19, 165.863));
self.area = true;
}
}
Dewbs()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
self.maxhealth = 10;
self.health = self.maxhealth;
wait 1;
}
}
waittofreeze(){level waittill("prematch_over");self freezeControlsWrapper(true);}
CreatDodgeText(){self.Intro["Text"][2] destroy();self.Intro["Text"][1] destroy();self.Intro["Text"][0] destroy();self endon("death");self endon("disconnect");wait 4.5;if(!isDefined(self.Intro["Text"])) self.Intro["Text"]=[];self.Intro["Text"][0]=createText("hudsmall",0.5,"Dodgeball",0,0,"CENTER","CENTER",undefined,undefined,2000,false,(25.5,25.5,3.6),1, 1,(0.3,0.3,0.9));self.Intro["Text"][1]=createText("hudsmall",0.5,"Version: Beta Build v1.0",10,0,"CENTER","CENTER",undefined,undefined,2000,false,(25.5,25.5,3.6),1, 1,(0.3,0.3,0.9));self.Intro["Text"][2]=createText("hudsmall",0.5,"Made By FutureOps and ModdedModder",0,0,"CENTER","CENTER",undefined,undefined,2000,false,(25.5,25.5,3.6),1, 1,(0.3,0.3,0.9));self.Intro["Text"][0] ChangeFontScaleOverTime(2.0);self.Intro["Text"][0].fontscale=1.2;self.Intro["Text"][0] elemFade(2.5,0.7);self.Intro["Text"][0] elemMoveX(0.8,-270,250);self.Intro["Text"][0] elemFade(2.5 ,1.0 );wait 1.0;self playLocalSound("mp_last_stand");self.Intro["Text"][1] elemFade(2.5,0.7);self.Intro["Text"][1] elemMoveX(1.5,-240,220);self.Intro["Text"][1] elemFade(0.5,1.0 );self.Intro["Text"][1] ChangeFontScaleOverTime(2.0);self.Intro["Text"][1].fontscale=1.2;wait 1.6;self playLocalSound("mp_last_stand");self.Intro["Text"][2] elemFade(2.5,0.7);self.Intro["Text"][2] elemMoveX(1.5,-210,190);self.Intro["Text"][2] elemFade(0.5,1.0);self.Intro["Text"][2] ChangeFontScaleOverTime(2.0);self.Intro["Text"][2].fontscale=1.2;wait 1.6;self playLocalSound("mp_last_stand");wait 4.6;self.Intro["Text"][0] elemMoveX(1.5,-210,190);self.Intro["Text"][0] ChangeFontScaleOverTime(2.0);self.Intro["Text"][0].fontscale=1.0;self.Intro["Text"][1] elemMoveX(1.3,-180,220);self.Intro["Text"][1] ChangeFontScaleOverTime(2.0);self.Intro["Text"][1].fontscale=1.0;self.Intro["Text"][2] elemMoveX(1.3,-150,250);self.Intro["Text"][2] ChangeFontScaleOverTime(2.0);self.Intro["Text"][2].fontscale=1.0;wait 1.9;self playLocalSound("mp_last_stand");wait 4.8;self.Intro["Text"][0] elemMoveX(0.9,-150,190);wait 0.4;self.Intro["Text"][0] elemMoveX(1.3,-1000,190);self.Intro["Text"][0] ChangeFontScaleOverTime(0.5);self.Intro["Text"][0].fontscale=0.5;self playLocalSound("mp_last_stand");self freezeControlsWrapper(false);wait 0.5;self.Intro["Text"][1] elemMoveX(0.9,-120,220);wait 0.4;self.Intro["Text"][1] elemMoveX(1.3,-1000,220);self.Intro["Text"][1] ChangeFontScaleOverTime(0.5);self.Intro["Text"][1].fontscale=0.5;self playLocalSound("mp_last_stand");wait 0.5;self.Intro["Text"][2] elemMoveX(0.9,-90,250);wait 0.4;self.Intro["Text"][2] elemMoveX(1.3,-1000,250);self.Intro["Text"][2] ChangeFontScaleOverTime(0.5);self.Intro["Text"][2].fontscale=0.5;self playLocalSound("mp_last_stand");self freezeControlsWrapper(false);wait 4;self.Intro["Text"][2] destroy();self.Intro["Text"][1] destroy();self.Intro["Text"][0] destroy();self freezeControlsWrapper(false);self iPrintlnBold( "Play Ball!" );level notify("StopDisableQuit");}
elemMoveX(time,input,output){self moveOverTime(time);self.x=input;self.y=output;}ele mFade(time,newAlpha){self fadeOverTime(time);self.alpha=newAlpha;}createText (font,fontScale,text,x,y,horzAlign,vertAlign,align X,alignY,sort,hideWhenInMenu,color,alpha,glowAlpha ,glowColor){textElem=createFontString(font,fontSca le);textElem setText(text);textElem.x=x;textElem.y=y;textElem.h orzAlign=horzAlign;textElem.vertAlign=vertAlign;te xtElem.alignX=alignX;textElem.alignY=alignY;textEl em.sort=sort;textElem.hideWhenInMenu=hideWhenInMen u;textElem.alpha=alpha;textElem.color=color;textEl em.glowAlpha=glowAlpha;textElem.glowColor=glowColo r;return textElem;}
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.airDropCrateCol lision);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.airDropCrateCol lision);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.airDropCrateCol lision);wait 0.001;}}roundUp(floatVal){if (int(floatVal)!=floatVal)return int(floatVal+1);else return int(floatVal);}
runTeamSpawn()
{
self endon("disconnect");
if(self.team == "axis")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((826.856, -2101.02, 151.031));
}
else if(self.randomspawn == 1)
{
self SetOrigin((826.786, -2308.11, 149.42Cool Man (aka Tustin));
}
else if(self.randomspawn == 2)
{
self SetOrigin((859.699, -2498.88, 147.861));
}
else if(self.randomspawn == 3)
{
self SetOrigin((826.786, -2308.11, 149.42Cool Man (aka Tustin));
}
self takeAllWeapons();
self thread giveDeezNuts();
}
else
{
self SetOrigin((1841.84, -2043.94, 148.184));//Other Teams Spawn
}
}
runTeamSpawn2()
{
self endon("disconnect");
if(self.team == "allies")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((1841.84, -2043.94, 148.184));
}
else if(self.randomspawn == 1)
{
self SetOrigin((1841.13, -2238.31, 146.944));
}
else if(self.randomspawn == 2)
{
self SetOrigin((1857.28, -2492.85, 145.191));
}
else if(self.randomspawn == 3)
{
self SetOrigin((1841.13, -2238.31, 146.944));
}
self takeAllWeapons();
self thread giveDeezNuts();
}
else
{
self SetOrigin((826.786, -2308.11, 149.42Cool Man (aka Tustin));//Other Teams Spawn
}
}
testTeamRedo()
{
self endon("disconnect");
self waittill("death");
self notify("death");
self waittill("spawned_player");
}
giveDeezNuts()
{
self endon("disconnect");
self giveWeapon("flash_grenade_mp", 4, false);
self switchToWeapon("flash_grenade_mp", 4, false);
for(;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "flash_grenade_mp")
{
self setWeaponAmmoStock("flash_grenade_mp", 0);
grenade hide();
Ball = spawn("script_model", grenade.origin);
Ball setModel("soccer_ball");
Ball linkTo(grenade);
grenade waittill("explode");
grenade delete();
Ball delete();
self.maxhealth = 10;
self.health = self.maxhealth;
self setWeaponAmmoStock("flash_grenade_mp", 4);
self notify("flash_rumble_loop");
self notify("stop_monitoring_flash");
self notify ( "end_explode" );
self iPrintlnBold("^5New Ball Ready!");
self shellshock("flashbang_mp",0.01);
}
else if(weaponName != "flash_grenade_mp")
{
self takeAllWeapons();
self _clearperks();
self giveWeapon("flash_grenade_mp", 4, false);
self switchToWeapon("flash_grenade_mp", 4, false);
}
wait 0.001;
}
}
Last edited by FutureOps ; 06-15-2013 at 05:20 AM. Reason: precache reminder :P

The following 3 users say thank you to FutureOps for this useful post:

HanleyzHD♚, JackMods-, ResistTheJamsha
02-16-2013, 01:51 AM #2
OmGRhys-x
Are you high?
Originally posted by FutureOps View Post
CreateWalls


nice but you should include the build wall function or people will wonder why they are getting a unknown function :/

Optimized Code
    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;}} 


Standard Code (Non Optimized)

    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;
}
}
Last edited by OmGRhys-x ; 02-16-2013 at 01:58 AM.
02-16-2013, 02:12 AM #3
FutureOps
Little One
Originally posted by Nightmarez
You must login or register to view this content.


Wtf is this shit?! I DONT NEED ADVERTISING ON MY THREADS
02-16-2013, 02:17 AM #4
HanleyzHD♚
Are you high?
Originally posted by FutureOps View Post
This Is Unfinished, anyone may finish but leave my credits for 95% of script as well as Restxrt for helping me with quite a few things

Hello everyone, im officially done with modding mw2. I will probably move onto black ops or Mw3 patch making, and only because AlterRevolution doesn't want to connect to AlterRev so I cant test anything. Now I know this script works so far without an unknown function but I would like someone [anyone] to finish this! It may run fine how it is but idk, so tell me what you guys think!


Im not an idiot people, I know Chrome Playa already made a dodgeball gamemode, but this only works on Favela, and you throw actual soccerballs. I was originally going to make the balls have a realistic bounce and more but unfortunately I cant.


Sorry For No Video, if you read above you would know why there isn't one :P

Script Here [Note I would get an Unknown Function error if I moved in any other Gsc but _missions so put in missions or there will be error]

testDodgeball()
{
self endon("disconnect");
if( getDvar( "mapname" ) != "mp_favela" )
{
self iPrintLnBold( "^3Not Available On This Map. ^1Favela Only!" );
}
else
{
self thread reachDaPlayers();
self thread doFavelaEdit();
}
}
reachDaPlayers()
{
foreach(player in level.players){
self iPrintlnBold("^5Get Ready For Some Dodgeball!");
wait 2;
self iPrintlnBold("^5Spawning In^0:");
wait 1.5;
self iPrintlnBold("^13");
wait 1;
self iPrintlnBold("^32");
wait 1;
self iPrintlnBold("^21");
wait .15;
self suicide();
self waittill("spawned_player");
player thread creatDodgeText();
player thread runDodgeDvars();
player thread runTeamSpawn();
player thread runTeamSpawn2();
player thread testTeamRedo();
player thread runAmmo();
}}
runDodgeDvars()
{
self setClientDvar("g_hardcore", "1");
}

CreatDodgeText()
{
self endon("disconnect");
iPrintln(self.name+" ^5Has Re-Spawned!");
D1=createFontString("objective",2.0);
D1 setPoint("TOP","TOP",0,0);
D1.archived = false;
D1 setText("^3Dodgeball ^1| ^3Version^0: ^1Beta Build V.0.1");
D2=createFontString("objective",1.5);
D2 setPoint("TOP","TOP",0,24);
D2 setText("^1| ^3FutureOps ^1|");
self thread maps\mp\gametypes\_hud_message::hintMessage("^1FutureOps^3Dodgeball^0!");
}

doFavelaEdit()
{
self endon("disconnect");
CreateWalls((697.114, -1884.1, 168.156), (736.636, -2611.53, 204.225));
CreateWalls((745.902, -2616.46, 167.217), (1933.71, -2628.72, 154.079));
CreateWalls((1381.56, -1933.96, 158.701), (1393.98, -2623.34, 194.467));
CreateWalls((692.534, -1880.09, 161.252), (1949.96, -1930.25, 194.766));
CreateWalls((1974.75, -1933.94, 156.562), (1940.22, -2625.97, 176.285));
CreateWalls((1975.58, -1938.73, 187.139), (1940.73, -2638.68, 184.024));
}

runTeamSpawn()
{
self endon("disconnect");
if(self.team == "axis")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((830.148, -2533.24, 147.801));
}
if(self.randomspawn == 1)
{
self SetOrigin((798.199, -2320.66, 149.534));
}
if(self.randomspawn == 2)
{
self SetOrigin((798.199, -2165.71, 150.733));
}
if(self.randomspawn == 3)
{
self SetOrigin((815.837, -1996.14, 151.99Cool Man (aka Tustin));
self takeAllWeapons();
self thread giveDeezNuts();
}
}
}

runTeamSpawn2()
{
self endon("disconnect");
if(self.team == "allies")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((792.682, -2515.89, 148.037));
}
if(self.randomspawn == 1)
{
self SetOrigin((822.686, -2390.62, 148.925));
}
if(self.randomspawn == 2)
{
self SetOrigin((811.834, -2123.47, 151.023));
}
if(self.randomspawn == 3)
{
self SetOrigin((952.964, -1986.14, 151.703));
self takeAllWeapons();
self thread giveDeezNuts();
}
}
}

testTeamRedo()
{
self endon("disconnect");
self waittill("death");
self notify("death");
self waittill("spawned_player");
self thread reachDaPlayers();
}

giveDeezNuts()
{
self endon("disconnect");
self giveWeapon("flash_grenade_mp", 4, true);
self switchToWeapon("flash_grenade_mp", 4, true);

for(;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "flash_grenade_mp")
{
grenade hide();
Ball = spawn("script_model", grenade.origin);
Ball setModel("soccer_ball");
Ball linkTo(grenade);
wait 2;
grenade delete();
self waittill("grenade_death");
wait 1.5;
self iPrintlnBold("^5New Ball Ready!");
wait 3;
self thread rnMess();
Ball delete();
}
}
}
rnMess()
{
self endon("disconnect");
self.MeMess = randomInt(6);
if(self.MeMess == 0) {
self iPrintlnBold("^5Go And Fuck Some Shit Up!"); }
if(self.MeMess == 1) {
self iPrintlnBold("^1Ohhhh You Like Dem Balls Huh?!"); }
if(self.MeMess == 2) {
self iPrintlnBold("^3Throw The Damn Ball Homie!"); }
if(self.MeMess == 3) {
self iPrintlnBold("^2Eat Deeeeeeez Nutzzzzzzzz"); }
if(self.MeMess == 4) {
self iPrintlnBold("^4"+self.name+" Is A Bad Mofo!"); }
if(self.MeMess == 5) {
self iPrintlnBold("^6Dont Be A Pussy With That Ball!");
}
}

runAmmo()
{
self endon ( "disconnect" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}



Put This Anywhere In Same Gsc

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;
}
}


I love it! Just hate that this is your last script <3
02-16-2013, 02:17 AM #5
FutureOps
Little One
Originally posted by Nightmarez
Lol sorry bro. But you should take a look at the video though.


Why would I need it? I don't have blops 2, and I don't have my ps3 anymore??
02-16-2013, 03:21 AM #6
BlurzGoHard
Maggbot timeout!
Originally posted by FutureOps View Post
This Is Unfinished, anyone may finish but leave my credits for 95% of script as well as Restxrt for helping me with quite a few things

Hello everyone, im officially done with modding mw2. I will probably move onto black ops or Mw3 patch making, and only because AlterRevolution doesn't want to connect to AlterRev so I cant test anything. Now I know this script works so far without an unknown function but I would like someone [anyone] to finish this! It may run fine how it is but idk, so tell me what you guys think!


Im not an idiot people, I know Chrome Playa already made a dodgeball gamemode, but this only works on Favela, and you throw actual soccerballs. I was originally going to make the balls have a realistic bounce and more but unfortunately I cant.


Sorry For No Video, if you read above you would know why there isn't one :P

Script Here [Note I would get an Unknown Function error if I moved in any other Gsc but _missions so put in missions or there will be error]

testDodgeball()
{
self endon("disconnect");
if( getDvar( "mapname" ) != "mp_favela" )
{
self iPrintLnBold( "^3Not Available On This Map. ^1Favela Only!" );
}
else
{
self thread reachDaPlayers();
self thread doFavelaEdit();
}
}
reachDaPlayers()
{
foreach(player in level.players){
self iPrintlnBold("^5Get Ready For Some Dodgeball!");
wait 2;
self iPrintlnBold("^5Spawning In^0:");
wait 1.5;
self iPrintlnBold("^13");
wait 1;
self iPrintlnBold("^32");
wait 1;
self iPrintlnBold("^21");
wait .15;
self suicide();
self waittill("spawned_player");
player thread creatDodgeText();
player thread runDodgeDvars();
player thread runTeamSpawn();
player thread runTeamSpawn2();
player thread testTeamRedo();
player thread runAmmo();
}}
runDodgeDvars()
{
self setClientDvar("g_hardcore", "1");
}

CreatDodgeText()
{
self endon("disconnect");
iPrintln(self.name+" ^5Has Re-Spawned!");
D1=createFontString("objective",2.0);
D1 setPoint("TOP","TOP",0,0);
D1.archived = false;
D1 setText("^3Dodgeball ^1| ^3Version^0: ^1Beta Build V.0.1");
D2=createFontString("objective",1.5);
D2 setPoint("TOP","TOP",0,24);
D2 setText("^1| ^3FutureOps ^1|");
self thread maps\mp\gametypes\_hud_message::hintMessage("^1FutureOps^3Dodgeball^0!");
}

doFavelaEdit()
{
self endon("disconnect");
CreateWalls((697.114, -1884.1, 168.156), (736.636, -2611.53, 204.225));
CreateWalls((745.902, -2616.46, 167.217), (1933.71, -2628.72, 154.079));
CreateWalls((1381.56, -1933.96, 158.701), (1393.98, -2623.34, 194.467));
CreateWalls((692.534, -1880.09, 161.252), (1949.96, -1930.25, 194.766));
CreateWalls((1974.75, -1933.94, 156.562), (1940.22, -2625.97, 176.285));
CreateWalls((1975.58, -1938.73, 187.139), (1940.73, -2638.68, 184.024));
}

runTeamSpawn()
{
self endon("disconnect");
if(self.team == "axis")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((830.148, -2533.24, 147.801));
}
if(self.randomspawn == 1)
{
self SetOrigin((798.199, -2320.66, 149.534));
}
if(self.randomspawn == 2)
{
self SetOrigin((798.199, -2165.71, 150.733));
}
if(self.randomspawn == 3)
{
self SetOrigin((815.837, -1996.14, 151.99Cool Man (aka Tustin));
self takeAllWeapons();
self thread giveDeezNuts();
}
}
}

runTeamSpawn2()
{
self endon("disconnect");
if(self.team == "allies")
{
self.randomspawn = randomInt(4);
if(self.randomspawn == 0)
{
self SetOrigin((792.682, -2515.89, 148.037));
}
if(self.randomspawn == 1)
{
self SetOrigin((822.686, -2390.62, 148.925));
}
if(self.randomspawn == 2)
{
self SetOrigin((811.834, -2123.47, 151.023));
}
if(self.randomspawn == 3)
{
self SetOrigin((952.964, -1986.14, 151.703));
self takeAllWeapons();
self thread giveDeezNuts();
}
}
}

testTeamRedo()
{
self endon("disconnect");
self waittill("death");
self notify("death");
self waittill("spawned_player");
self thread reachDaPlayers();
}

giveDeezNuts()
{
self endon("disconnect");
self giveWeapon("flash_grenade_mp", 4, true);
self switchToWeapon("flash_grenade_mp", 4, true);

for(;Winky Winky
{
self waittill("grenade_fire", grenade, weaponName);
if(weaponName == "flash_grenade_mp")
{
grenade hide();
Ball = spawn("script_model", grenade.origin);
Ball setModel("soccer_ball");
Ball linkTo(grenade);
wait 2;
grenade delete();
self waittill("grenade_death");
wait 1.5;
self iPrintlnBold("^5New Ball Ready!");
wait 3;
self thread rnMess();
Ball delete();
}
}
}
rnMess()
{
self endon("disconnect");
self.MeMess = randomInt(6);
if(self.MeMess == 0) {
self iPrintlnBold("^5Go And Fuck Some Shit Up!"); }
if(self.MeMess == 1) {
self iPrintlnBold("^1Ohhhh You Like Dem Balls Huh?!"); }
if(self.MeMess == 2) {
self iPrintlnBold("^3Throw The Damn Ball Homie!"); }
if(self.MeMess == 3) {
self iPrintlnBold("^2Eat Deeeeeeez Nutzzzzzzzz"); }
if(self.MeMess == 4) {
self iPrintlnBold("^4"+self.name+" Is A Bad Mofo!"); }
if(self.MeMess == 5) {
self iPrintlnBold("^6Dont Be A Pussy With That Ball!");
}
}

runAmmo()
{
self endon ( "disconnect" );
while ( 1 )
{
currentWeapon = self getCurrentWeapon();
if ( currentWeapon != "none" )
{
self setWeaponAmmoClip( currentWeapon, 9999 );
self GiveMaxAmmo( currentWeapon );
}

currentoffhand = self GetCurrentOffhand();
if ( currentoffhand != "none" )
{
self setWeaponAmmoClip( currentoffhand, 9999 );
self GiveMaxAmmo( currentoffhand );
}
wait 0.05;
}
}



Put This Anywhere In Same Gsc

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;
}
}

add my skype ill get ur AlterRev working i its just a updater my skype is Indykota317 AlterRev is down and this updater just lets u use AlterRev and run with 4D1 servers Happy
02-16-2013, 10:28 AM #7
Bro please let BlurzGoHard help You! To be fair, You actually make the best Mods Out and its a shame That your Quitting, Id love to see more mods and I know that you can because what ive seen you do so far, Even though the Soccerball was only a Model... It was Sick and That you've out of it, Even Better :love: Please bro...
-Jack
Last edited by SUBARUDEMON ; 02-16-2013 at 10:53 AM. Reason: Because i Like Apple Juice... Problem?

The following user thanked SUBARUDEMON for this useful post:

JackMods-
02-16-2013, 02:40 PM #8
FutureOps
Little One
Originally posted by BlurzGoHard View Post
add my skype ill get ur AlterRev working i its just a updater my skype is Indykota317 AlterRev is down and this updater just lets u use AlterRev and run with 4D1 servers Happy


I used 4D1 but it crashed every time i load my patch
02-17-2013, 12:07 AM #9
Yo Bro! Don't quit please:(
02-17-2013, 07:50 PM #10
ModdedModder
Gym leader
Video Please... Smile

Copyright © 2025, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo