Cod4_playtimez()
{
self thread Loadgame();
self thread StartGame();
wait 10;
//setExpFog(100, 1000, 0, 0, 0.44, 0.0);
wait 7;
self thread Spawn_Cords();
self thread Jumpnodie();
wait 0.01;
self thread pick1start();
wait 0.01;
self thread pick2start();
self setclientDvars("r_colormap", "1", "r_fullbright", "0", "r_specularmap", "0", "r_debugShader", "0", "r_filmTweakEnable", "1", "r_filmUseTweaks", "1", "r_filmTweakInvert", "1", "r_filmTweakbrightness", "0", "r_filmtweakLighttint", "1.1 1.05 0.85", "r_filmtweakdarktint", "0.7 0.85 1" );
wait 0.01;
}
StartGame()
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
wait 10;
player iprintln("^3GET READY!!");
wait 7;
player iprintlnbold("^5COD4-PLAY TIME HAS BEGUN!!!!");
}
}
Jumpnodie()
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
player setClientDvar("bg_fallDamageMinHeight", "1000" );
player setClientDvar("bg_fallDamageMaxHeight", "1000" );
}
}
Loadgame()
{
wduration = 10;
level.NSB = createPrimaryProgressBar( -40 );
level.NSBText = createPrimaryProgressBarText( -40 );
self thread Text();
level.NSB updateBar( 0, 1 / wduration );
level.NSB.color = (0, 0, 0);
level.NSB.bar.color = (0, 1, 0);
for ( waitedTime = 0;waitedTime < wduration && isAlive( self ) && !level.gameEnded;
waitedTime += 0.05 )wait ( 0.05 );
level.NSB destroyElem();
level.NSBText destroyElem();
}
/////////////////////one//////////////////////
model1(location1)
{
level.can1 = spawn("script_model", location1);
level.can1 setmodel("com_paintcan");
}
pick1start(Class_circle)
{
self endon("Found1");
for(;
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
{
if(distance(player.origin, level.can1.origin)<75)
{
player thread randprize();
player sayall("^2ITEM 1 FOUND");
wait 0.01;
level.can1 Delete();
level.Class_circle Delete();
player notify("Found1");
}
wait 1;
}
}
}
}
randprize()
{
func[0] = :rize;
func[1] = ::Noprize;
self thread [[func[randomInt(func.size)]]]();
}
Prize()
{
self iprintlnbold("^3You got (PUT PRIZE HERE)");
//Thread prize here!
}
Noprize()
{
self iprintlnbold("^3Sorry You Did Not Get A Prize");
}
pickup1(location)
{
level.redcircle = loadfx( "misc/ui_pickup_unavailable" );
level.Class_circle = SpawnFx(level.redcircle, location);
TriggerFX(level.Class_circle);
}
////////////////two//////////////////////
model2(location2)
{
level.can2 = spawn("script_model", location2);
level.can2 setmodel("com_paintcan");
}
pick2start()
{
self endon("Found2");
for(;
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
{
if(distance(player.origin, level.can2.origin)<75)
{
player iprintlnbold("^3You Got (MOD NAME)");
player sayall("^2ITEM 2 FOUND");
wait 0.01;
level.can2 Delete();
player thread End();
level.Class_circle2 Delete();
player notify("Found2");
}
wait 1;
}
}
}
}
pickup2(location2)
{
level.redcircle2 = loadfx( "misc/ui_pickup_unavailable" );
level.Class_circle2 = SpawnFx(level.redcircle2, location2);
TriggerFX(level.Class_circle2);
}
Text()
{
//level.NSB destroyElem();
//level.NSBText destroyElem();
level.NSBText setText( "^5Loading Cod4 Playtime." );
wait 1;
level.NSBText setText( "^5Loading Cod4 Playtime.." );
wait 1;
level.NSBText setText( "^5Loading Cod4 Playtime..." );
wait 1;
self thread del();
}
del()
{
level.NSBText destroyElem();
wait 0.01;
level.NSBText = createPrimaryProgressBarText( -40 );
self thread Text();
}
End()
{
self thread ENDTHISGAME();
wait 0.01;
self setclientDvar("r_fog", "0");
self setClientDvars( "r_colormap", "1", "r_fullbright", "0", "r_specularmap", "0", "r_debugShader", "0", "r_filmTweakEnable", "0", "r_filmUseTweaks", "0", "r_filmTweakInvert", "0", "r_filmtweakLighttint", "1.1 1.05 0.85", "r_filmtweakdarktint", "0.7 0.85 1" );
setExpFog(256, 512, 1, 1, 1, 0);
wait 0.01;
level.Lift1 Delete();
level.redcircle3 Delete();
self notify("STOPLIFT");
level.can2 Delete();
level.Class_circle2 Delete();
self notify("Found2");
wait 0.01;
level.can1 Delete();
level.Class_circle Delete();
self notify("Found1");
}
ENDTHISGAME()
{
for( i = 0; i < level.players.size; i++ )
{
Player = level.players[i];
player iprintlnbold("^3GAME OVER!");
}
}
Spawn_Cords()
{
if(getDvar("mapname") == "mp_convoy")level thread Ambush();
if(getDvar("mapname") == "mp_backlot")level thread Backlot();
if(getDvar("mapname") == "mp_bloc")level thread Bloc();
if(getDvar("mapname") == "mp_bog")level thread Bog();
if(getDvar("mapname") == "mp_crash")level thread Crash();
if(getDvar("mapname") == "mp_crossfire")level thread Crossfire();
if(getDvar("mapname") == "mp_countdown")level thread Countdown();
if(getDvar("mapname") == "mp_citystreets")level thread District();
if(getDvar("mapname") == "mp_farm")level thread Downpour();
if(getDvar("mapname") == "mp_overgrown")level thread Overgrown();
if(getDvar("mapname") == "mp_pipeline")level thread Pipeline();
if(getDvar("mapname") == "mp_shipment"){precacheModel("bc_military_tire05_big");level thread Shipment();}
if(getDvar("mapname") == "mp_showdown")level thread Showdown();
if(getDvar("mapname") == "mp_strike")level thread Strike();
if(getDvar("mapname") == "mp_vacant")level thread Vacant();
if(getDvar("mapname") == "mp_cargoship")level thread Wetwork();
if(getDvar("mapname") == "mp_broadcast")level thread Broadcast();
if(getDvar("mapname") == "mp_killhouse")level thread Killhouse();
if(getDvar("mapname") == "mp_creek")level thread Creek();
if(getDvar("mapname") == "mp_carentan")level thread Chinatown();
}
Ambush()
{
pickup1((105,571,6);
model1((105,571,6);
self thread AmbushCORDS();
}
Backlot()
{
pickup1((-143,-29,65));
model1((-143,-29,65));
self thread BacklotCORDS();
}
Bloc()
{
pickup1((1046,-5821,-23));
model1((1046,-5821,-23));
self thread BlocCORDS();
}
Bog()
{
pickup1((4439,1364,8);
model1((4439,1364,8);
self thread BogCORDS();
}
Broadcast()
{
}
Chinatown()
{
}
Crash()
{
pickup1((627,513,13);
model1((627,513,13);
self thread CrashCORDS();
}
Creek()
{
}
Crossfire()
{
pickup1((4412,-3151,-66));
model1((4412,-3151,-66));
self thread CrossfireCORDS();
}
Countdown()
{
pickup1((-417,565,2);
model1((-417,565,2);
self thread CountdownCORDS();
}
District()
{
pickup1((4176,-433,-127));
model1((4176,-433,-127));
self thread DistricCORDS();
}
Downpour()
{
pickup1((999,1673,24);
model1((999,1673,24);
self thread DownpourCORDS();
}
Killhouse()
{
}
Overgrown()
{
pickup1((-1108,-2789,-197));
model1((-1108,-2789,-197));
self thread OvergrownCORDS();
}
Pipeline()
{
pickup1((235,1416,0));
model1((235,1416,0));
self thread PipelineCORDS();
}
shipment()
{
New_lift((379,175,192),300);
pickup1((201,235,407));
model1((201,235,407));
self thread ShipmentCORDS();
}
showdown()
{
pickup1((-8,-114,0));
model1((-8,-114,0));
self thread ShowdownCORDS();
}
strike()
{
pickup1((-960,-156,66));
model1((-960,-156,66));
self thread StrikeCORDS();
}
vacant()
{
pickup1((-1155,824,-50));
model1((-1155,824,-50));
self thread VacantCORDS();
}
wetwork()
{
pickup1((1037,-41,176));
model1((1037,-41,176));
self thread WetworkCORDS();
}
///////////////////////////Randomint scripts/////////////////////////////////////////////
BacklotCORDS()
{
func[0] = ::location1;
func[1] = ::location2;
func[2] = ::location3;
self thread [[func[randomInt(func.size)]]]();
}
Location1()
{
pickup2((-838,1297,80));
model2((-838,1297,80));
}
Location2()
{
pickup2((770,1662,64));
model2((770,1662,64));
}
Location3()
{
pickup2((-1007,79,-49));
model2((-1007,79,-49));
}
AmbushCORDS()
{
func[0] = ::location4;
func[1] = ::location5;
func[2] = ::location6;
self thread [[func[randomInt(func.size)]]]();
}
Location4()
{
pickup2((3197,1240,-46));
model2((3197,1240,-46));
}
Location5()
{
pickup2((-487,671,80));
model2((-487,671,80));
}
Location6()
{
pickup2((1197,-436,-55));
model2((1197,-436,-55));
}
BlocCORDS()
{
func[0] = ::location7;
func[1] = ::location8;
func[2] = ::location9;
self thread [[func[randomInt(func.size)]]]();
}
Location7()
{
pickup2((2000,-7056,144));
model2((2000,-7056,144));
}
Location8()
{
pickup2((3273,-5357,0));
model2((3273,-5357,0));
}
Location9()
{
pickup2((-1919,-4578,52));
model2((-1919,-4578,52));
}
BogCORDS()
{
func[0] = ::location10;
func[1] = ::location11;
func[2] = ::location12;
self thread [[func[randomInt(func.size)]]]();
}
Location10()
{
pickup2((2377,-235,-10));
model2((2377,-235,-10));
}
Location11()
{
pickup2((6187,854,27));
model2((6187,854,27));
}
Location12()
{
pickup2((4210,404,-5));
model2((4210,404,-5));
}
CrashCORDS()
{
func[0] = ::location13;
func[1] = ::location14;
func[2] = ::location15;
self thread [[func[randomInt(func.size)]]]();
}
Location13()
{
pickup2((-2351,163,-15));
model2((-2351,163,-15));
}
Location14()
{
pickup2((1823,1126,-23));
model2((1823,1126,-23));
}
Location15()
{
pickup2((1495,-1783,25));
model2((1495,-1783,25));
}
CrossfireCORDS()
{
func[0] = ::location16;
func[1] = ::location17;
func[2] = ::location18;
self thread [[func[randomInt(func.size)]]]();
}
Location16()
{
pickup2((6260,-1292,10));
model2((6260,-1292,10));
}
Location17()
{
pickup2((4819,-4973,-137));
model2((4819,-4973,-137));
}
Location18()
{
pickup2((3899,-2482,0));
model2((3899,-2482,0));
}
CountdownCORDS()
{
func[0] = ::location19;
func[1] = ::location20;
func[2] = ::location21;
self thread [[func[randomInt(func.size)]]]();
}
Location19()
{
pickup2((-2351,163,-15));
model2((-2351,163,-15));
}
Location20()
{
pickup2((1823,1126,-23));
model2((1823,1126,-23));
}
Location21()
{
pickup2((1495,-1783,25));
model2((1495,-1783,25));
}
DistricCORDS()
{
func[0] = ::location22;
func[1] = ::location23;
func[2] = ::location24;
self thread [[func[randomInt(func.size)]]]();
}
Location22()
{
pickup2((4048,-1775,-30));
model2((4048,-1775,-30));
}
Location23()
{
pickup2((4378,359,);
model2((4378,359,);
}
Location24()
{
pickup2((2457,-1025,-95));
model2((2457,-1025,-95));
}
DownpourCORDS()
{
func[0] = ::location25;
func[1] = ::location26;
func[2] = ::location27;
self thread [[func[randomInt(func.size)]]]();
}
Location25()
{
pickup2((4048,-1775,-30));
model2((4048,-1775,-30));
}
Location26()
{
pickup2((4378,359,);
model2((4378,359,);
}
Location27()
{
pickup2((2457,-1025,-95));
model2((2457,-1025,-95));
}
OvergrownCORDS()
{
func[0] = ::location28;
func[1] = ::location29;
func[2] = ::location30;
self thread [[func[randomInt(func.size)]]]();
}
Location28()
{
pickup2((-335,755,-167));
model2((-335,755,-167));
}
Location29()
{
pickup2((-371,-2080,0));
model2((-371,-2080,0));
}
Location30()
{
pickup2((14,-3952,-163));
model2((14,-3952,-163));
}
PipelineCORDS()
{
func[0] = ::location31;
func[1] = ::location32;
func[2] = ::location33;
self thread [[func[randomInt(func.size)]]]();
}
Location31()
{
pickup2((1169,-3343,391));
model2((1169,-3343,391));
}
Location32()
{
pickup2((-115,168,14));
model2((-115,168,14));
}
Location33()
{
pickup2((1500,2592,15));
model2((1500,2592,15));
}
ShowdownCORDS()
{
func[0] = ::location34;
func[1] = ::location35;
func[2] = ::location36;
self thread [[func[randomInt(func.size)]]]();
}
Location34()
{
pickup2((-372,1958,-1));
model2((-372,1958,-1));
}
Location35()
{
pickup2((483,-472,192));
model2((483,-472,192));
}
Location36()
{
pickup2((-398,-1874,16));
model2((-398,-1874,16));
}
StrikeCORDS()
{
func[0] = ::location37;
func[1] = ::location38;
func[2] = ::location39;
self thread [[func[randomInt(func.size)]]]();
}
Location37()
{
pickup2((1375,1657,24));
model2((1375,1657,24));
}
Location38()
{
pickup2((1501,785,17);
model2((1501,785,17);
}
Location39()
{
pickup2((-2405,-1247,42));
model2((-2405,-1247,42));
}
VacantCORDS()
{
func[0] = ::location40;
func[1] = ::location41;
func[2] = ::location42;
self thread [[func[randomInt(func.size)]]]();
}
Location40()
{
pickup2((-1807,1679,-103));
model2((-1807,1679,-103));
}
Location41()
{
pickup2((439,1547,-111));
model2((439,1547,-111));
}
Location42()
{
pickup2((720,576,-47));
model2((720,576,-47));
}
WetworkCORDS()
{
func[0] = ::location43;
func[1] = ::location44;
func[2] = ::location45;
self thread [[func[randomInt(func.size)]]]();
}
Location43()
{
pickup2((2981,7,336));
model2((2981,7,336));
}
Location44()
{
pickup2((-780,-534,16));
model2((-780,-534,16));
}
Location45()
{
pickup2((3324,53,224));
model2((3324,53,224));
}
ShipmentCORDS()
{
func[0] = ::location46;
func[1] = ::location47;
func[2] = ::location48;
self thread [[func[randomInt(func.size)]]]();
}
Location46()
{
pickup2((684,70,201));
model2((684,70,201));
}
Location47()
{
pickup2((-604,127,201));
model2((-604,127,201));
}
Location48()
{
pickup2((-38,697,29);
model2((-38,697,29);
}
New_lift(pos,height) { self endon("STOPLIFT"); level.Lift1 = spawn("script_model", pos); level.Lift1 setModel("com_junktire2"); level.Lift1.angles = (0,0,270); Lift2 = SpawnFx(level.redcircle3, pos); level.redcircle3 = loadfx( "misc/ui_pickup_unavailable" ); TriggerFX(Lift2); level.Lift1 thread LiftUpz(pos, height); } LiftUpz(pos, height) { level endon("GEND"); while(1) { players = level.players; for ( index = 0; index < players.size; index++ ) { player = players[index]; if(Distance(pos, player.origin) <= 50) { player setOrigin(pos); player thread LiftActz(pos, height); playfx(level._effect["iPRO"],pos); self playsound("weap_cobra_missile_fire"); wait 3; } wait 0.01; } wait 1; } } LiftActz(pos, height,so,soh) { self endon("death"); self endon("disconnect"); self endon("ZBSTART"); self.liftz=1; posa = self.origin; fpos = posa[2] + height; h=0; for(j=1; self.origin[2] < fpos; j+=j) { if(j > 130) j=130; h=h+j; self SetOrigin((pos) + (0,0,h)); wait .1; } vec = anglestoforward(self getPlayerAngles()); end = (vec[0] * 160, vec[1] * 160, vec[2] * 10); if(BulletTracePassed(so,so + end,false,self) && BulletTracePassed(soh,soh + end,false,self)) self SetOrigin(self.origin + end); wait .2; posz = self.origin; wait 4; self.liftz=0; if(self.origin == posz) self SetOrigin(posa); }
Copyright © 2024, NextGenUpdate.
All Rights Reserved.