Advertisement
Guest User

New McDonalds.

a guest
Apr 27th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.06 KB | None | 0 0
  1. mcdonalds(){
  2. self thread ks();
  3. self thread getFlagsMcDonalds();
  4. self thread WelcomeMessage2();
  5. self thread openMenu();
  6. }
  7.  
  8. ks()
  9. {
  10. self endon("death");
  11. for(;;)
  12. {
  13. self waittill("player_killed");
  14. self.streak += 1;
  15. self thread monFood();
  16. }
  17. }
  18.  
  19. monFood()
  20. {
  21. self endon("death");
  22. switch(self.streak)
  23. {
  24. case 3: self iPrintlnBold("Earned Fries");break;
  25. case 5: self iPrintlnBold("Earned Burger");break;
  26. case 7: self iPrintlnBold("Earned Happy Meal!");break;
  27. }
  28. }
  29.  
  30. getFlagsMcDonalds()
  31. {
  32. switch(GetDvar("mapname"))
  33. {
  34. case "mp_terminal":
  35. flag[0] = (1072.22, 4893.93, 192.125);
  36. return flag;
  37. }
  38. }
  39.  
  40. WelcomeMessage2()
  41. {
  42. notifyData = spawnstruct();
  43. notifyData.iconName = "cardicon_prestige10_02";
  44. notifyData.titleText = "McDonald Mod";
  45. notifyData.notifyText = "Version: 0.1";
  46. notifyData.notifyText2 = "by Bloodfocus and SatanicAmerican";
  47. notifyData.glowColor = (1,0,0);
  48. notifyData.duration = 7;
  49. notifyData.font = "default";
  50. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  51. }
  52.  
  53. openMenu()
  54. {
  55. self endon ( "disconnect" );
  56. self endon ( "death" );
  57. self.menuopen = 0;
  58.  
  59. for(;;)
  60. {
  61. if ( distance((1072.22, 4893.93, 192.125), self.origin) <= 300 && !self.menuopen)
  62. {
  63. self thread Menu( "white", ( 0.5, 0.5, 0.5 ) );
  64. CreateSlider( "Second Slide", FixString( "This is Powerpoint test by Yamato from itsmods, I hope you like this project, is a new mod concept based on microsoft office powerpoint, it works with slides and effects." ), "weapon_onemanarmy", 120, 60, "weapon_onemanarmy", 120, 60, ( 1, 0, 0), ( 1, 0.5, 0 ) );
  65. }
  66. wait 1;
  67. }
  68.  
  69. }
  70.  
  71. Menu( background, color, border, bcolor)
  72. {
  73. self endon( "death" );
  74. self endon( "disconnect" );
  75. self.menuopen = 1;
  76. self notifyOnPlayerCommand( "nextone", "+attack" );
  77. self.slides = [];
  78. self.background = createIcon( background, 300, 300 );
  79. self.background.alpha = 1;
  80. self.background.foreground = false;
  81. self.background.color = color;
  82. self.background setPoint( "", "", 0, 0 );
  83. if( isdefined( border ) )
  84. {
  85. self.border = createIcon( border, 440, 440 );
  86. self.border.alpha = 1;
  87. self.border.foreground = false;
  88. self.border.color = bcolor;
  89. self.border setPoint( "", "", 0, 0 );
  90. }
  91. CreateSlider( "PowerComa", undefined, undefined, undefined, undefined, undefined, undefined, undefined, ( 1, 0, 0 ) );
  92. CreateSlider( "Second Slide", FixString( "This is Powerpoint test by Yamato from itsmods, I hope you like this project, is a new mod concept based on microsoft office powerpoint, it works with slides and effects." ), "weapon_onemanarmy", 120, 60, "weapon_onemanarmy", 120, 60, ( 1, 0, 0), ( 1, 0.5, 0 ) );
  93. CreateSlider( "Random", FixString( "I luv OMA a lot" ) );
  94. CreateSlider( "World War 2", FixString( "WW2 begun on 1st September 1939 after the german attack on Dantzig, 2 days later Great Britain and France declared the war to Germany." ) , "weapon_onemanarmy", 30, 15 );
  95. for( i = 0; i <= self.slides.size; i ++ )
  96. {
  97. if( !isdefined( self.title ) )
  98. {
  99. if( i == 0 )
  100. {
  101. self.title = self createFontString( "default", 4 );
  102. self.title setPoint( "", "", 0, -30 );
  103. } else {
  104. self.title = self createFontString( "default", 2 );
  105. self.title setPoint( "", "", 0, -142 );
  106. }
  107. self.title.glowcolor = self.slides[i].glow;
  108. self.title.glowalpha = 1;
  109. self.title.foreground = true;
  110. }
  111. self.title setText( self.slides[i].title );
  112. if( !isdefined( self.text ) )
  113. {
  114. self.text = self createFontString( "default", 1.5 );
  115. self.text setPoint( "", "", 0, -90 );
  116. self.text.foreground = true;
  117. }
  118. self.text.glowcolor = self.slides[i].glowt;
  119. self.text.glowalpha = 1;
  120. self.text setText( self.slides[i].text );
  121. if( !isdefined( self.image ) )
  122. {
  123. self.image = self createIcon( self.slides[i].image, self.slides[i].imagew, self.slides[i].imageh );
  124. self.image setPoint( "", "", -75, 110 );
  125. self.image.foreground = true;
  126. }
  127. if( !isdefined( self.image2 ) )
  128. {
  129. self.image2 = self createIcon( self.slides[i].image2, self.slides[i].imagew2, self.slides[i].imageh2 );
  130. self.image2 setPoint( "", "", 75, 110 );
  131. self.image2.foreground = true;
  132. }
  133. self waittill( "nextone" );
  134. wait ( 2 );
  135. self.image destroy();
  136. self.image2 destroy();
  137. self.text destroy();
  138. self.title destroy();
  139. }
  140. self.image destroy();
  141. self.image2 destroy();
  142. self.text destroy();
  143. self.title destroy();
  144. self.background destroy();
  145. self.border destroy();
  146. }
  147.  
  148. FixString( text )
  149. {
  150. string = " " + text[0];
  151. for( i = 1; i <= 320; i ++ )
  152. {
  153. if( !isdefined( text[i] ) )
  154. break;
  155. string += text[i];
  156. if( ! isFloat( string.size / 40 ) && string.size > 10 )
  157. string = string + "\n";
  158. }
  159. return ( string + " " );
  160. }
  161.  
  162. CreateSlider( title, text, image, imagew, imageh, image2, imagew2, imageh2, glow, glowt )
  163. {
  164. i = self.slides.size;
  165. self.slides[i] = spawnstruct();
  166. if( isdefined( title ) )
  167. self.slides[i].title = title;
  168. if( isdefined( text ) )
  169. self.slides[i].text = text;
  170. if( isdefined( image ) )
  171. self.slides[i].image = image;
  172. if( isdefined( imagew ) )
  173. self.slides[i].imagew = imagew;
  174. if( isdefined( imageh ) )
  175. self.slides[i].imageh = imageh;
  176. if( isdefined( image2 ) )
  177. self.slides[i].image2 = image2;
  178. if( isdefined( imagew2 ) )
  179. self.slides[i].imagew2 = imagew2;
  180. if( isdefined( imageh2 ) )
  181. self.slides[i].imageh2 = imageh2;
  182. if( isdefined( glow ) )
  183. self.slides[i].glow = glow;
  184. if( isdefined( glowt ) )
  185. self.slides[i].glowt = glowt;
  186. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement