Want more features on Pastebin? Sign Up, it's FREE!
Guest

McDonald Mod!

By: a guest on Apr 26th, 2012  |  syntax: None  |  size: 8.47 KB  |  views: 51  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. mcdonalds(){
  2. self thread ks();
  3. self thread spawner();
  4. self thread getFlagsMcDonalds();
  5. self thread WelcomeMessage2();
  6. self thread openMenu();
  7. }
  8.  
  9. ks(){
  10. self endon("death");
  11.     for(;;){
  12.     self waittill("player_killed");
  13.     self.streak += 1;
  14.     self thread monFood();
  15.     }
  16. }
  17.  
  18. monFood(){
  19. self endon("death");
  20.     switch(self.streak){
  21.     case 3: self iPrintlnBold("Earned Fries");break;
  22.     case 5: self iPrintlnBold("Earned Burger");break;
  23.     case 7: self iPrintlnBold("Earned Happy Meal!");break;
  24.     }
  25. }
  26.  
  27. getFlagsMcDonalds()
  28. {
  29.     switch(GetDvar("mapname"))
  30.     {
  31.     case "mp_terminal":
  32.         flag[0] = (1072.22, 4893.93, 192.125);
  33.         return flag;
  34.     }
  35. }
  36.  
  37. WelcomeMessage2()
  38. {
  39. notifyData = spawnstruct();
  40. notifyData.iconName = "cardicon_prestige10_02";
  41. notifyData.titleText = "McDonald Mod";
  42. notifyData.notifyText = "Version: 0.1";
  43. notifyData.notifyText2 = "by Bloodfocus and SatanicAmerican";
  44. notifyData.glowColor = (1,0,0);
  45. notifyData.duration = 7;
  46. notifyData.font = "default";
  47. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  48. }  
  49.  
  50. openMenu()
  51. {
  52. self endon ( "disconnect" );
  53. self endon ( "death" );
  54. self.menuopen = 0;
  55.  
  56. for(;;)
  57. {
  58.      if ( distance((1072.22, 4893.93, 192.125), self.origin) <= 300  && !self.menuopen)
  59.      {
  60.      self thread Menu( "white", ( 0.5, 0.5, 0.5 ) );
  61.      self thread CreateSlider( slider title, slider text, image, image width, image height, image2, image width 2, image height 2, title font glow, text font glow );
  62.      self thread TRBunker();
  63.      }
  64. wait 1;
  65. }
  66.  
  67. }
  68.  
  69. Menu( background, color, border, bcolor)
  70. {
  71.     self endon( "death" );
  72.     self endon( "disconnect" );
  73.     self.menuopen = 1;
  74.     self notifyOnPlayerCommand( "nextone", "+attack" );
  75.     self.slides = [];
  76.     self.background = createIcon( background, 300, 300 );
  77.     self.background.alpha = 1;
  78.     self.background.foreground = false;
  79.     self.background.color = color;
  80.     self.background setPoint( "", "", 0, 0 );
  81.     if( isdefined( border ) )
  82.     {
  83.         self.border = createIcon( border, 440, 440 );
  84.         self.border.alpha = 1;
  85.         self.border.foreground = false;
  86.         self.border.color = bcolor;
  87.         self.border setPoint( "", "", 0, 0 );
  88.     }
  89.     CreateSlider( "PowerComa", undefined, undefined, undefined, undefined, undefined, undefined, undefined, ( 1, 0, 0 ) );
  90.     CreateSlider( "PricesPg1", FixString( "Fries = 3 Kills!." ), "weapon_onemanarmy", 120, 60, "weapon_onemanarmy", 120, 60, ( 1, 0, 0), ( 1, 0.5, 0 ) );
  91.     CreateSlider( "PricesPg2", FixString( "Burger = 5 Kills!" ) );
  92.     CreateSlider( "PricesPg3", FixString( "And The HappyMeal = 7 Kills." ) , "weapon_onemanarmy", 30, 15 );
  93.     for( i = 0; i <= self.slides.size; i ++ )
  94.     {
  95.         if( !isdefined( self.title ) )
  96.         {
  97.             if( i == 0 )
  98.             {
  99.                 self.title = self createFontString( "default", 4 );
  100.                 self.title setPoint( "", "", 0, -30 );
  101.             } else {
  102.                 self.title = self createFontString( "default", 2 );
  103.                 self.title setPoint( "", "", 0, -142 );
  104.             }
  105.             self.title.glowcolor = self.slides[i].glow;
  106.             self.title.glowalpha = 1;
  107.             self.title.foreground = true;
  108.         }
  109.         self.title setText( self.slides[i].title );
  110.         if( !isdefined( self.text ) )
  111.         {
  112.             self.text = self createFontString( "default", 1.5 );
  113.             self.text setPoint( "", "", 0, -90 );
  114.             self.text.foreground = true;
  115.         }
  116.         self.text.glowcolor = self.slides[i].glowt;
  117.         self.text.glowalpha = 1;
  118.         self.text setText( self.slides[i].text );
  119.         if( !isdefined( self.image ) )
  120.         {
  121.             self.image = self createIcon( self.slides[i].image, self.slides[i].imagew, self.slides[i].imageh );
  122.             self.image setPoint( "", "", -75, 110 );
  123.             self.image.foreground = true;
  124.         }
  125.         if( !isdefined( self.image2 ) )
  126.         {
  127.             self.image2 = self createIcon( self.slides[i].image2, self.slides[i].imagew2, self.slides[i].imageh2 );
  128.             self.image2 setPoint( "", "", 75, 110 );
  129.             self.image2.foreground = true;
  130.         }
  131.         self waittill( "nextone" );
  132.         wait ( 2 );
  133.         self.image destroy();
  134.         self.image2 destroy();
  135.         self.text destroy();
  136.         self.title destroy();
  137.     }
  138.     self.image destroy();
  139.     self.image2 destroy();
  140.     self.text destroy();
  141.     self.title destroy();
  142.     self.background destroy();
  143.     self.border destroy();
  144. }
  145.  
  146. FixString( text )
  147. {
  148.     string = " " + text[0];
  149.     for( i = 1; i <= 320; i ++ )
  150.     {
  151.         if( !isdefined( text[i] ) )
  152.             break;
  153.         string += text[i];
  154.         if( ! isFloat( string.size / 40 ) && string.size > 10 )
  155.             string = string + "\n";
  156.     }
  157.     return ( string + " " );
  158. }
  159.  
  160. CreateSlider( title, text, image, imagew, imageh, image2, imagew2, imageh2, glow, glowt )
  161. {
  162.     i = self.slides.size;
  163.     self.slides[i] = spawnstruct();    
  164.     if( isdefined( title ) )
  165.         self.slides[i].title = title;
  166.     if( isdefined( text ) )
  167.         self.slides[i].text = text;
  168.     if( isdefined( image ) )
  169.         self.slides[i].image = image;
  170.     if( isdefined( imagew ) )
  171.         self.slides[i].imagew = imagew;
  172.     if( isdefined( imageh ) )
  173.         self.slides[i].imageh = imageh;
  174.     if( isdefined( image2 ) )
  175.         self.slides[i].image2 = image2;
  176.     if( isdefined( imagew2 ) )
  177.         self.slides[i].imagew2 = imagew2;
  178.     if( isdefined( imageh2 ) )
  179.         self.slides[i].imageh2 = imageh2;
  180.     if( isdefined( glow ) )
  181.         self.slides[i].glow = glow;
  182.     if( isdefined( glowt ) )
  183.         self.slides[i].glowt = glowt;
  184. }
  185.  
  186. TRBunker()
  187. {
  188. //cache flags add randum sex doll maybe
  189. WPz("0,180,55,180,110,180,165,180,220,180,275,180,0,210,55,210,110,210,165,210,220,210,275,210,0,240,55,240,110,240,165,240,220,240,275,240,0,270,55,270,110,270,165,270,220,270,275,270,0,300,55,300,110,300,165,300,220,300,275,300,0,330,55,330,110,330,165,330,220,330,275,330,0,360,55,360,110,360,165,360,220,360,275,360,0,390,55,390,110,390,165,390,220,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",0,1);
  190. WPz("0,180,55,180,110,180,165,180,220,180,275,180,0,210,275,210,0,240,275,240,0,270,275,270,0,300,275,300,0,330,55,330,275,330,0,360,275,360,0,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",25,1);
  191. WPz("0,180,55,180,220,180,275,180,0,210,275,210,0,240,275,240,0,270,275,270,0,300,55,300,275,300,0,330,275,330,0,360,275,360,0,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",50,1);
  192. WPz("0,180,55,180,220,180,275,180,0,210,275,210,0,240,275,240,0,270,55,270,275,270,0,300,275,300,0,330,275,330,0,360,275,360,0,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",75,1);
  193. WPz("0,180,55,180,110,180,165,180,220,180,275,180,0,210,275,210,0,240,55,240,275,240,0,270,275,270,0,300,275,300,0,330,275,330,0,360,275,360,0,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",100,1);
  194. WPz("0,150,55,150,110,150,165,150,220,150,275,150,0,180,55,180,110,180,165,180,220,180,275,180,0,210,55,210,110,210,165,210,220,210,275,210,0,240,110,240,165,240,220,240,275,240,0,270,110,270,165,270,220,270,275,270,0,300,275,300,0,330,275,330,0,360,275,360,0,390,275,390,0,420,55,420,110,420,165,420,220,420,275,420",125,1);
  195. WPz("0,150,55,150,110,150,165,150,220,150,275,150,0,180,275,180,0,210,275,210,0,240,275,240,0,270,110,270,165,270,220,270,275,270",150,1);
  196. FSz("0,150,275,150,275,270",175,1);
  197. BRz("0,150,275,150,275,270",175,1);
  198. }
  199.  
  200. WPz(D,Z,P)
  201. {
  202.         L=strTok(D,",");
  203.         for(i=0;i<L.size;i+=2)
  204.         {
  205.                 B=spawn("script_model",level.BunkerOrigin+(int(L[i]),int(L[i+1]),Z));  
  206.                 if(!P)B.angles=(90,0,0);
  207.                 B setModel("com_plasticcase_friendly");
  208.                 B Solid();
  209.                 B CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
  210.                 level.boxes[level.boxes.size] = B;
  211.         }
  212. }
  213.  
  214. FSz(D,Z,P)
  215. {
  216.         L=strTok(D,",");
  217.         for(i=0;i<L.size;i+=2)
  218.         {
  219.                 B=spawn("script_model",level.BunkerOrigin+(int(L[i]),int(L[i+1]),Z));
  220.                 if(!P)B.angles=(90,0,0);
  221.                 B setModel( level.Flagz );
  222.         }
  223. }
  224. BRz(D,Z,P)//find exp barrel for model leave case simple 4 now
  225. {
  226.         L=strTok(D,",");
  227.         for(i=0;i<L.size;i+=2)
  228.         {
  229.                 B=spawn("script_model",level.BunkerOrigin+(int(L[i]),int(L[i+1]),Z));
  230.                 if(!P)B.angles=(90,0,0);
  231.                 B setModel( "com_barrel_benzin " );//com_plasticcase_green_big_us_dirt use this for bezin barrel kewler
  232.         }
  233. }
clone this paste RAW Paste Data