Results 1 to 13 of 13
  1. #1
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw

    Question Spinning/moving Carepages ???

    Hey guys i have a really interessting question i think ..

    Is is impossibll to create carepages so that they can move from A to B ....??

    like a train or sometink like this .. u know what i mean ..

    i think this must be impossibll so i think about

    start coords ..... and end coords .. and maybe if this is just 1 care page ore if this is a grid ore a wall ..

    but dont !!! say me i just have to take a door .. this is not my question .. i mean a grid .. which is able to transport players ..

    pls HELP !!!


    PS im german ^^ very bad english im sooo srry for this

  2. #2
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    you just mean a moving box that goes up and down or from left to right were people can walk on an get transporten from A to B?

    because there is chromes playa's ultimate forge patch were you can make in game bunkers and moving boxes

  3. #3
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    yes right .. nut i need the code .. u know im working on a completle new mod ( i think its completle new XD ) and my problem is i dont know what exatcly i need for this

    ok guys something for laughing for u .. so now u can see that im a big big big noob .. i have tried to write my first own code XDDD and pls look ON IT :: I never try to test it because i think (i know) that this wont be working XDDD but maybe anyone of u can work whit it fix it and pos it back pls !!!


    Code
    CreatePlattform(pos, type, start, end, angle, time)
    {
    plattform = spawn("script_model", pos );
    plattform setModel("com_plasticcase_friendly");//this should looks very nice i think
    plattform.angles = angle;
    plattform Solid();
    plattform CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    plattform.starts = start;
    plattform.ends = end;
    plattform.times = time;
    wait 0.01;
    }
    and on rust first try ( cant sleep whitout first try XD)
    __________________________________________________ _____________time
    CreatePlattform(((-355, 903, -135), (-355, 903, -135), (105, 825, -135), 0, 15);
    ___________________pos________|_____start______|__ _____end____|_angle___;
    BAD SYNTAX

    :-(
    Last edited by Black666Devil666; 05-23-2011 at 06:12 PM.

  4. #4
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,309
    My Mood
    Breezy
    Replace the 0 with (0, 0, 0). The angle value accepts a vector not a number.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  5. The Following User Says Thank You to master131 For This Useful Post:

    Black666Devil666 (05-24-2011)

  6. #5
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    aaaah ok ... hmmm im test it right now ^^
    ok its working but i have to set coordinates exactly like this :

    CreatePlattform((-355, 903, -115), (-355, 903, -135), 105, 825, -135, 0, 0, 15);

    ok but i have 1 question too .. if i want a moving grid .. what have i to do ?

    and i need the speed code .. so i want to make sure thats a plattform were people can walk on an get transported (slowly) from A to B.
    ----------------------------------------------------------------------------------------------------
    so that the new code .. for the plattform ..

    pls help me to correct it .. and pls show me where i have to set the speen in ..


    CreatePlattform(pos, type, start, end, angle, time, speed)
    {
    level.plattformwait = 0.7;
    plattform = spawn("script_model", pos );
    plattform setModel("com_plasticcase_enemy");
    plattform.angles = angle;
    plattform Solid();
    plattform CloneBrushmodelToScriptmodel( level.airDropCrateCollision );
    plattform.starts = start;
    plattform.ends = end;
    plattform.times = time;
    plattform.speeds = speed;
    plattform EnableLinkTo();
    plattform LinkTO(center);
    }
    center.angles = angle;
    center.state = start;
    center thread PlattformThink(start, end);
    wait 0.01;
    }

    PlattformThink(start, end)
    {
    while(1)
    {
    if(self.state == "start"){
    self MoveTo(end, level.Plattformwait);
    self.state = "end";
    wait level.Plattformwait;
    continue;
    }
    if(self.state == "end"){
    self MoveTo(start, level.Plattformwait);
    wait level.Plattformwait;
    self.state = "start";
    continue;
    }
    }
    }
    }

    BY the way ive got bad syntax as error
    Last edited by Black666Devil666; 05-24-2011 at 10:41 AM.

  7. #6
    Dead Bones Brook's Avatar
    Join Date
    Sep 2008
    Gender
    female
    Location
    On that seat right over there.
    Posts
    8,328
    Reputation
    858
    Thanks
    1,533
    My Mood
    Daring
    IMPOSSIBRU

  8. #7
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    srry what ??

  9. #8
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    So, you want to make moving platforms...

    You will need to paste this cluster fuck code into your MapEdit.gsc
    Code:
    CreatePlate(corner1,corner2,arivee,angle,time){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 CloneBrushmodelToScriptmodel(level.airDropCrateCollision);block thread Escalatore((corner1 +(XA * r,YA * c,ZA * h)),(arivee +(XA * r,YA * c,ZA * h)),time);wait 0.01;}}}center.angles=angle;center thread Escalatore(corner1,arivee,time);center CloneBrushmodelToScriptmodel(level.airDropCrateCollision);}
    Escalatore(depart,arivee,time){while(1){if(self.state=="open"){self MoveTo(depart,time);wait(time*2.5);self.state="close";continue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time*2.5);self.state="open";continue;}}}
    CreateAsc(depart,arivee,angle,time){Asc=spawn("script_model",depart);Asc setModel("com_plasticcase_friendly");Asc.angles=angle;Asc Solid();Asc CloneBrushmodelToScriptmodel(level.airDropCrateCollision);Asc thread Escalator(depart,arivee,time);}
    Escalator(depart,arivee,time){while(1){if(self.state=="open"){self MoveTo(depart,time);wait(time*1.5);self.state="close";continue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time*1.5);self.state="open";continue;}}}
    CreateCircle(depart,pass1,pass2,pass3,pass4,arivee,angle,time){Asc=spawn("script_model",depart);Asc setModel("com_plasticcase_friendly");Asc.angles=angle;Asc Solid();Asc CloneBrushmodelToScriptmodel(level.airDropCrateCollision);Asc thread Circle(depart,arivee,pass1,pass2,pass3,pass4,time);}Circle(depart,pass1,pass2,pass3,pass4,arivee,time){while(1){if(self.state=="open"){self MoveTo(depart,time);wait(time*1.5);self.state="op";continue;}if(self.state=="op"){self MoveTo(pass1,time);wait(time);self.state="opi";continue;}if(self.state=="opi"){self MoveTo(pass2,time);wait(time);self.state="opa";continue;}if(self.state=="opa"){self MoveTo(pass3,time);wait(time);self.state="ope";continue;}if(self.state=="ope"){self MoveTo(pass4,time);wait(time);self.state="close";continue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time);self.state="open";continue;}}}
    Now you can use Chroma Playa's Forge patch to get the moving platform code: CreateAsc(//coordinates and stuff in here)

    That should work...


    The lines in my Steam are i's

  10. The Following User Says Thank You to Nachos For This Useful Post:

    SOON. (07-17-2013)

  11. #9
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    hmmmm thats really nice .. but i can take this code to another mod and i can use it there Too ?
    XDD forgot what i write ^^ i have too read the hole think .. now i understand u ^^ thx i test it now and i hope it will works .. !!
    Last edited by Black666Devil666; 05-24-2011 at 02:12 PM.

  12. #10
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    omg im a big big noob i think .. i want to put this into the coordinates mod and after creating new bunker ... i want to put this in my new zombie mod version .. but i dont know what i have to do whit this code .. im srry guys but pls help me

    somethink to i cant start the crome force patch ... i didn know why but its not working so pls helps
    Last edited by Black666Devil666; 05-25-2011 at 05:03 AM.

  13. #11
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,986
    Reputation
    176
    Thanks
    913
    My Mood
    Blah
    You need a MapEdit.gsc. Then post the code i posted in there. Or use the Coordinates file. Put the Coordinates.gsc into the gametypes folder of your mod. Then in the init() thread in your _rank paste this:
    Code:
    level thread maps\mp\gametypes\Coordinates::myBunker();
    Then post your bunker code in the myBunker() in the Coordinates.gsc

    And just redownload the forge patch...


    The lines in my Steam are i's

  14. #12
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    Could anyone say mae what i made wrong?



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

    init()
    {
    level.doCustomMap = 0;
    level.doorwait = 0.3;
    level.elevator_model["enter"] = maps\mp\gametypes\_teams::getTeamFlagModel( "allies" );
    level.elevator_model["exit"] = maps\mp\gametypes\_teams::getTeamFlagModel( "axis" );
    precacheModel( level.elevator_model["enter"] );
    precacheModel( level.elevator_model["exit"] );
    wait 1;
    if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
    level thread Afghan();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
    level thread Scrapyard();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
    level thread Wasteland();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
    level thread Karachi();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_derail"){ /** Derail **/
    level thread Derail();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_estate"){ /** Estate **/
    level thread Estate();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_favela"){ /** Favela **/
    level thread Favela();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
    level thread HighRise();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
    level thread Skidrow();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
    level thread Invasion();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
    level thread Quarry();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
    level thread Rundown();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_rust"){ /** Rust **/
    level thread Rust();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
    level thread SubBase();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
    level thread Terminal();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_crash"){ /** Crash **/
    level thread Crash();
    level.doCustomMap = 1;
    }
    if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
    level thread Underpass();
    level.doCustomMap = 1;
    }
    if(level.doCustomMap == 1){
    level.gameState = "starting";
    //if(!level.testing)
    level thread CreateMapWait();
    //
    } else {
    level.gameState = "starting";
    wait 20;
    level notify("CREATED");
    }
    }

    CreateMapWait()
    {
    level.TimerText destroy();
    level.Timer destroy();
    level.TimerText = level createServerFontString( "objective", 1.5 );
    level.TimerText setPoint( "CENTER", "CENTER", 0, -100 );
    level.TimerText setText("^3Wait ^2for ^1the ^4map ^3to ^2be ^1created:");
    level.Timer = level createServerFontString( "objective", 2 );
    level.Timer setPoint( "CENTER", "CENTER", 0, -75 );
    level.Timer.color = (1,1,0);
    for(i = 20; i > 0; i--)
    {
    level.Timer setValue(i);
    foreach(player in level.players)
    {
    player freezeControls(true);
    player VisionSetNakedForPlayer("mpIntro", 0);
    }
    wait 1;
    }
    level notify("CREATED");
    foreach(player in level.players)
    {
    player freezeControls(false);
    player VisionSetNakedForPlayer(getDvar("mapname"), 0);
    }
    }
    //this is the code from Chromes forge patch
    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;}}
    CreateGrids(corner1,corner2,angle){W=Distance((cor ner1[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.airDropCrateCol lision);wait 0.01;}}}center.angles=angle;}
    CreateRamps(top,bottom){D=Distance(top,bottom);blo cks=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.airDropCrateCol lision);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.airDropCrateCol lision);wait 0.01;}
    CreateElevator(enter,exit,angle){flag=spawn("scrip t_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(ent er,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;}}
    CreatePlate(corner1,corner2,arivee,angle,time){W=D istance((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 CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);block thread Escalatore((corner1 +(XA * r,YA * c,ZA * h)),(arivee +(XA * r,YA * c,ZA * h)),time);wait 0.01;}}}center.angles=angle;center thread Escalatore(corner1,arivee,time);center CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);}Escalatore(depart,arivee,time){while(1){i f(self.state=="open"){self MoveTo(depart,time);wait(time*2.5);self.state="clo se";continue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time*2.5);self.state="ope n";continue;}}}CreateAsc(depart,arivee,angle,time) {Asc=spawn("script_model",depart);Asc setModel("com_plasticcase_friendly");Asc.angles=an gle;Asc Solid();Asc CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);Asc thread Escalator(depart,arivee,time);}Escalator(depart,ar ivee,time){while(1){if(self.state=="open"){self MoveTo(depart,time);wait(time*1.5);self.state="clo se";continue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time*1.5);self.state="ope n";continue;}}}CreateCircle(depart,pass1,pass2,pas s3,pass4,arivee,angle,time){Asc=spawn("script_mode l",depart);Asc setModel("com_plasticcase_friendly");Asc.angles=an gle;Asc Solid();Asc CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);Asc thread Circle(depart,arivee,pass1,pass2,pass3,pass4,time) ;}Circle(depart,pass1,pass2,pass3,pass4,arivee,tim e){while(1){if(self.state=="open"){self MoveTo(depart,time);wait(time*1.5);self.state="op" ;continue;}if(self.state=="op"){self MoveTo(pass1,time);wait(time);self.state="opi";con tinue;}if(self.state=="opi"){self MoveTo(pass2,time);wait(time);self.state="opa";con tinue;}if(self.state=="opa"){self MoveTo(pass3,time);wait(time);self.state="ope";con tinue;}if(self.state=="ope"){self MoveTo(pass4,time);wait(time);self.state="close";c ontinue;}if(self.state=="close"){self MoveTo(arivee,time);wait(time);self.state="open";c ontinue;}}}
    SpawnWeapons(WFunc,Weapon,WeaponName,Location,Take Once,angle,gun){self endon("disconnect");gun delete();weapon_model=getWeaponModel(Weapon);if(we apon_model=="")weapon_model=Weapon;Wep=spawn("scri pt_model",Location+(0,0,0));Wep setModel(weapon_model);Wep.angles=angle;for(;{foreach(player in level.players){Radius=distance(Location,player.ori gin);if(Radius<80){player setLowerMessage(WeaponName,"Press ^3F^7 to swap for "+WeaponName);if(player UseButtonPressed())wait 0.2;if(player UseButtonPressed()){if(!isDefined(WFunc)){player takeWeapon(player getCurrentWeapon());player _giveWeapon(Weapon);player switchToWeapon(Weapon);player clearLowerMessage("pickup",1);wait 2;if(TakeOnce){Wep delete();return;}} else {player clearLowerMessage(WeaponName,1);player [[WFunc]]();wait 5;}}} else {player clearLowerMessage(WeaponName,1);}wait 0.1;}wait 0.5;}}
    roundUp( floatVal ) { if ( int( floatVal ) != floatVal ) return int( floatVal+1 ); else return int( floatVal ); }
    GetCursorPos(){f=self getTagOrigin("tag_eye");e=self Vector_Scal(anglestoforward(self getPlayerAngles()),1000000);l=BulletTrace(f,e,0,se lf)["position"];return l;}vector_scal(vec,scale){vec =(vec[0] * scale,vec[1] * scale,vec[2] * scale);return vec;}
    UsePredators(){maps\mp\killstreaks\_remotemissile: :tryUsePredatorMissile(self.pers["killstreaks"][0].lifeId); }
    CreateTurret(type,angles,location){if(!isDefined(l ocation)|| !isDefined(type))return;if(!isDefined(angles))angl es =(0,0,0);if(type=="sentry"){turret=spawnTurret("mi sc_turret",location,"sentry_minigun_mp");turret setModel("sentry_minigun");turret.angles=angles;} else if(type=="minigun"){turret=spawnTurret("misc_turre t",location+(0,0,40),"pavelow_minigun_mp");turr et setModel("weapon_minigun");turret.angles=angles;}}
    SpawnModel(Model,Location){self endon("disconnect");Obj=spawn("script_model",Locat ion);Obj PhysicsLaunchServer((0,0,0),(0,0,0));Obj.angles=se lf.angles+(0,90,0);Obj setModel(Model);}
    CreateForce(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(level.chopper_fx["light"]["belly"]);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(level.chopper_fx["light"]["belly"]);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(level.chopper_fx["light"]["belly"]);block.angles=Angle;block Solid();block CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);wait 0.001;}}
    CreateTac(pos){efx=loadfx("misc/flare_ambient");playFx(efx,pos);wait 0.01;}
    CreateDoors(open,close,angle,size,height,hp,range) { offset =(((size / 2)- 0.5)* -1); center=spawn("script_model",open); for(j=0;j < size;j++){ door=spawn("script_model",open +((0,30,0)* offset)); door setModel("com_plasticcase_enemy"); door Solid(); door CloneBrushmodelToScriptmodel(level.airDropCrateCol lision); door EnableLinkTo(); door LinkTo(center); for(h=1;h < height;h++){ door=spawn("script_model",open +((0,30,0)* offset)-((70,0,0)* h)); door setModel("com_plasticcase_enemy"); door Solid(); door CloneBrushmodelToScriptmodel(level.airDropCrateCol lision); door EnableLinkTo(); door LinkTo(center); } offset += 1; } center.angles=angle; center.state="open"; center.hp=hp; center.range=range; center thread DoorThink(open,close); center thread DoorUse(); center thread ResetDoors(open,hp); wait 0.01;} DoorThink(open,close){ while(1) { if(self.hp > 0){ self waittill("triggeruse" ,player); if(player.team=="allies"){ if(self.state=="open"){ self MoveTo(close,level.doorwait); wait level.doorwait; self.state="close"; continue; } if(self.state=="close"){ self MoveTo(open,level.doorwait); wait level.doorwait; self.state="open"; continue; } } if(player.team=="axis"){ if(self.state=="close"){ self.hp--; player iPrintlnBold("HIT"); wait 1; continue; } } }else{ if(self.state=="close"){ self MoveTo(open,level.doorwait); } self.state="broken"; wait .5; } }} DoorUse(range){ self endon("disconnect"); while(1) { foreach(player in level.players) { if(Distance(self.origin,player.origin)<= self.range){ if(player.team=="allies"){ if(self.state=="open"){ player.hint="Press ^3[{+activate}] ^7to ^2Close ^7the door"; } if(self.state=="close"){ player.hint="Press ^3[{+activate}] ^7to ^2Open ^7the door"; } if(self.state=="broken"){ player.hint="^1Door is Broken"; } } if(player.team=="axis"){ if(self.state=="close"){ player.hint="Press ^3[{+activate}] ^7to ^2Attack ^7the door"; } if(self.state=="broken"){ player.hint="^1Door is Broken"; } } if(player.buttonPressed[ "+activate" ]==1){ player.buttonPressed[ "+activate" ]=0; self notify("triggeruse" ,player); } } } wait .045; }} ResetDoors(open,hp){ while(1) { level waittill("RESETDOORS"); self.hp=hp; self MoveTo(open,level.doorwait); self.state="open"; }}
    CreateCrate(pos,angles){crate=spawn("script_model" ,pos);crate CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);crate setModel("com_plasticcase_friendly");crate .angles=angles;}
    EliteWeaponBox(pos,WhatTeam){if(!isDefined(WhatTea m)){T=self.pers["team"];} else {T=WhatTeam;}Mossy=spawn("script_model",pos+(0,0,1 5));Mossy setModel("com_plasticcase_friendly");Mossy.angles= self.angles+(0,90,0);Mossy Solid();Mossy CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);Elite=spawn("script_model",pos);Elite.angl es=self.angles+(0,90,0);Elite Solid();RM=randomint(9999);for(;{foreach(P in level.players){wait 0.05;if(P.pers["team"]!=T)continue;D=distance(pos,P.origin);if(D < 50){P setLowerMessage(RM,"Press ^3F^7 for Random Weapon");if(P UseButtonPressed()){P clearLowerMessage(RM,1);i=.1;Wep=level.weaponList[randomint(level.weaponList.size)];Elite setModel(getWeaponModel(Wep));Elite MoveTo(pos+(0,0,55),0.9);while(i<.6){OldWep=Wep;We p=level.weaponList[randomint(level.weaponList.size)];if(Wep!=OldWep){Elite setModel(getWeaponModel(Wep));} else {Wep=level.weaponList[randomint(level.weaponList.size)];Elite setModel(getWeaponModel(Wep));}wait i;i+=.02;}i=0;if(P GetWeaponsListPrimaries().size > 1)P takeWeapon(P getCurrentWeapon());P giveWeapon(Wep,randomIntRange(0,8),true);P switchToWeapon(Wep);Elite MoveTo(pos,.01);wait .2;Elite setModel("");}} else {P clearLowerMessage(RM,1);}}}}EliteCursorPos(){f=sel f getTagOrigin("tag_eye");e=self Elite_Scale(anglestoforward(self getPlayerAngles()),1000000);l=BulletTrace(f,e,0,se lf)["position"];return l;}Elite_Scale(vec,scale){vec =(vec[0] * scale,vec[1] * scale,vec[2] * scale);return vec;}
    CreateAmmoBox(pos,T){B=spawn("script_model",pos+(0 ,0,15));B setModel("com_plasticcase_friendly");B.angles=self .angles+(0,90,0);B Solid();B CloneBrushmodelToScriptmodel(level.airDropCrateCol lision);RAM=randomint(9999);for(;{foreach(P in level.players){wait 0.05;if(IsDefined(T)&&P.pers["team"]!=T)continue;R=distance(pos,P.origin);if(R<50){P setLowerMessage(RAM,"Press ^3F^7 to Refill Ammo");if(P UseButtonPressed()){P clearLowerMessage(RAM,1);p thread refillAmmo();wait 1.5;}}else{P clearLowerMessage(RAM,1);}}}}
    refillAmmo(){weaponList=self GetWeaponsListAll();if(self _hasPerk("specialty_tacticalinsertion")&&self getAmmoCount("flare_mp")<1)self _setPerk("specialty_tacticalinsertion"); foreach(weaponName in weaponList){if(isSubStr(weaponName,"grenade")){if( self getAmmoCount(weaponName)>=1)continue;}self giveMaxAmmo(weaponName);}}
    Last edited by Black666Devil666; 05-26-2011 at 02:25 AM.

  15. #13
    Black666Devil666's Avatar
    Join Date
    Apr 2011
    Gender
    male
    Posts
    57
    Reputation
    10
    Thanks
    1
    My Mood
    Yeehaw
    ok solved pls