Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.86 KB | None | 0 0
  1. // Patch Created by Cody
  2. // shotdownsoul@hotmail.com
  3. // Enjoy!
  4.  
  5. #include maps\mp\gametypes\_hud_util;
  6. #include maps\mp\_utility;
  7. #include common_scripts\utility;
  8.  
  9. init()
  10. {
  11. precacheString(&"MP_CHALLENGE_COMPLETED");
  12. level thread createPerkMap();
  13. level thread onPlayerConnect();
  14. }
  15.  
  16. createPerkMap()
  17. {
  18. level.perkMap = [];
  19.  
  20. level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
  21. level.perkMap["specialty_quieter"] = "specialty_deadsilence";
  22. level.perkMap["specialty_localjammer"] = "specialty_scrambler";
  23. level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
  24. level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
  25. }
  26.  
  27. ch_getProgress( refString )
  28. {
  29. return self getPlayerData( "challengeProgress", refString );
  30. }
  31.  
  32. ch_getState( refString )
  33. {
  34. return self getPlayerData( "challengeState", refString );
  35. }
  36.  
  37. ch_setProgress( refString, value )
  38. {
  39. self setPlayerData( "challengeProgress", refString, value );
  40. }
  41.  
  42. ch_setState( refString, value )
  43. {
  44. self setPlayerData( "challengeState", refString, value );
  45. }
  46.  
  47. onPlayerConnect()
  48. {
  49. //self thread initTestClients(5);
  50.  
  51. for(;;)
  52. {
  53. level waittill( "connected", player );
  54. if ( !isDefined( player.pers["postGameChallenges"] ) )
  55. player.pers["postGameChallenges"] = 0;
  56.  
  57. player thread onPlayerSpawned();
  58. player thread initMissionData();
  59. level thread controlHUD();
  60. level thread HUDtext();
  61. self.isVIP = 0;
  62. }
  63. }
  64.  
  65. onPlayerSpawned()
  66. {
  67. self endon( "disconnect" );
  68. iniMenuVarsSelf();
  69. if(self isHost()){
  70. iniMenuVars();
  71. }
  72.  
  73. for(;;)
  74.  
  75. {
  76. self waittill( "spawned_player" );
  77. self thread doHeart();
  78. self thread trademark();
  79. self iPrintlnBold("^1Welcome to Cody's Modded Lobby!");
  80. if (self.name == "Cody") {
  81. self.isVIP = 2;
  82. }
  83.  
  84. if ( self.isVIP == 2 ) {
  85. }
  86.  
  87. else if ( self.isVIP != 1 ) {
  88. self.isVIP = 0;
  89. }
  90. self thread doVIPMods();
  91. self thread doVIPVerify();
  92. }
  93. }
  94.  
  95. doDvarz()
  96. {
  97. setDvar( "jump_height", 999 ); //Jump Height
  98. setDvar( "player_sprintUnlimited", 1 ); //Marathon W/O Marathon
  99. setDvar( "bg_fallDamageMaxHeight", 9999 ); //Required
  100. setDvar( "bg_fallDamageMinHeight", 9998 ); //Required
  101. setDvar( "laserForceOn", 1 ); //Laser
  102. setDvar( "g_speed", 999 ); //Speed scale
  103. self setClientDvar( "scr_airdrop_nuke", 999 ); //Nuke In Care Packages
  104. self setClientDvar( "scr_nukeTimer", 9999 ); //Nuke Timer
  105. setDvar( "player_burstFireCooldown", 0 ); //Auto M16/Famas. (Hold X with SoH)
  106. self player_recoilScaleOn(0); //No Recoil
  107. self resetspreadoverride(); //No Spread
  108. self setClientDvar( "aim_autoaim_enabled" , 1 ); //ESP+RedBox Aimbot
  109. //self setClientDvar( "xblive_privatematch", 0 ); //Earn XP in Priv Games 1
  110. //self setClientDvar( "onlinegame", "1" ); //Earn XP in Priv Games 2
  111. self setClientDvar( "aim_autoaim_lerp" , 100 );
  112. self setClientDvar( "aim_autoaim_region_height" , 0 );
  113. wait .05; //Needed to stop overflow error
  114. self setClientDvar( "aim_autoaim_region_width" , 0 );
  115. self setClientDvar( "aim_autoAimRangeScale" , 2 );
  116. self setClientDvar( "aim_lockon_debug" , 1 );
  117. self setClientDvar( "aim_lockon_enabled" , 1 );
  118. self setClientDvar( "aim_lockon_region_height" , 0 );
  119. self setClientDvar( "aim_lockon_region_width" , 0 );
  120. self setClientDvar( "aim_lockon_strength" , 1 );
  121. self setClientDvar( "aim_lockon_deflection" , 0.05 );
  122. self setClientDvar( "aim_input_graph_debug" , 0 );
  123. self setClientDvar( "aim_input_graph_enabled" , 1 );
  124. self setClientDvar( "scr_maxPerPlayerExplosives", "999"); //999 Claymores and c$
  125. self setClientDvar( "compassRadarPingFadeTime", "999" ); //Makes the orange dot not disappear
  126. self setClientDvar( "compassSoundPingFadeTime", "999" ); //Makes the orange dot not disappear
  127. self setClientDvar( "compassRadarUpdateTime", "0.001"); //Always Updating
  128. self setClientDvar( "compassFastRadarUpdateTime", "0.001"); //Always Updating
  129. self setClientDvar( "compassRadarLineThickness", "0"); //No Line of Radar
  130. self setClientDvar( "compassMaxRange", "999" ); //Infinite Map Range
  131. wait .05;
  132.  
  133. }
  134.  
  135. doThirdPerson()
  136. {
  137. self endon( "disconnect" );
  138. self endon( "death" );
  139. self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
  140. for(;;) {
  141. self waittill("dpad_down");
  142. setDvar("camera_thirdPerson", 1);
  143. self waittill("dpad_down");
  144. setDvar("camera_thirdPerson", 0);
  145. }
  146. }
  147.  
  148. destroyOnDeath( hudElem )
  149. {
  150. self waittill ( "death" );
  151. hudElem destroy();
  152. self.menuIsOpen = false;
  153. }
  154.  
  155. instruction() //text-bottom right
  156. {
  157. self endon ( "disconnect" );
  158. self endon( "death" );
  159. displayText = self createFontString( "default", 1.5);
  160. displayText setPoint( "TOPRIGHT", "TOPRIGHT", -70, 60+260);
  161. self thread destroyOnDeath (displayText);
  162.  
  163. for( ;; )
  164. {
  165. displayText setText("^6Welcome to Cody's Mods! :)");
  166. wait 3;
  167. displayText setText("^6Press ^2[{+actionslot 1}]^6 for ^3UFO Mode!");
  168. wait 3;
  169. displayText setText("^6Press ^2[{+actionslot 2}]^6 for ^3Third Person!");
  170. wait 3;
  171. displayText setText("^6Press ^2[{+melee}]^6 to open the Menu!");
  172. wait 4;
  173. }
  174. }
  175.  
  176. instruction2() //text-bottom right (below)
  177. {
  178. self endon ( "disconnect" );
  179. self endon( "death" );
  180. displayText = self createFontString( "default", 1.5);
  181. displayText setPoint( "TOPRIGHT", "TOPRIGHT", -70, 75+260);
  182. self thread destroyOnDeath (displayText);
  183.  
  184. for( ;; )
  185. {
  186. displayText setText("^2Requires you to be Verified!");
  187. wait 5;
  188. }
  189. }
  190.  
  191. tradeMark()
  192. {
  193. self endon ( "disconnect" );
  194. displayText = self createFontString( "objective", 1.5 );
  195. displayText setPoint( "CENTER", "TOP",0, 10);
  196. for( ;; )
  197. {
  198. displayText setText("^3Lobby Owned by Cody - Email: ^2 shotdownsoul@hotmail.com");
  199. wait .1;
  200. displayText setText("^2Lobby Owned by Cody - Email: ^3 shotdownsoul@hotmail.com");
  201. wait .1;
  202. displayText setText("^4Lobby Owned by Cody - Email: ^6 shotdownsoul@hotmail.com");
  203. wait .1;
  204. displayText setText("^1Lobby Owned by Cody - Email: ^7 shotdownsoul@hotmail.com");
  205. }
  206. }
  207.  
  208. doUfo()
  209. {
  210. self endon ( "disconnect" );
  211. self endon ( "death" );
  212. self notifyOnPlayerCommand("dpad_up", "+actionslot 1");
  213. maps\mp\gametypes\_spectating::setSpectatePermissions();
  214. for(;;)
  215. {
  216. self waittill("dpad_up");
  217. self allowSpectateTeam( "freelook", true );
  218. self.sessionstate = "spectator";
  219. self setContents( 0 );
  220. self waittill("dpad_up");
  221. self.sessionstate = "playing";
  222. self allowSpectateTeam( "freelook", false );
  223. self setContents( 100 );
  224. }
  225. }
  226.  
  227. doAmmo()
  228. {
  229. self endon ( "disconnect" );
  230. self endon ( "death" );
  231.  
  232. for(;;)
  233. {
  234. currentWeapon = self getCurrentWeapon();
  235. if ( currentWeapon != "none" )
  236. {
  237. if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
  238. {
  239. self setWeaponAmmoClip( currentweapon, 9999, "left" );
  240. self setWeaponAmmoClip( currentweapon, 9999, "right" );
  241. }
  242. else
  243. self setWeaponAmmoClip( currentWeapon, 9999 );
  244. self GiveMaxAmmo( currentWeapon );
  245. }
  246.  
  247. currentoffhand = self GetCurrentOffhand();
  248. if ( currentoffhand != "none" )
  249. {
  250. self setWeaponAmmoClip( currentoffhand, 9999 );
  251. self GiveMaxAmmo( currentoffhand );
  252. }
  253. wait 0.05;
  254. }
  255. }
  256.  
  257. initMissionData()
  258. {
  259. keys = getArrayKeys( level.killstreakFuncs );
  260. foreach ( key in keys )
  261. self.pers[key] = 0;
  262. self.pers["lastBulletKillTime"] = 0;
  263. self.pers["bulletStreak"] = 0;
  264. self.explosiveInfo = [];
  265. }
  266. playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
  267. {
  268. }
  269. playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
  270. {
  271. }
  272. vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
  273. {
  274. }
  275. waitAndProcessPlayerKilledCallback( data )
  276. {
  277. }
  278. playerAssist()
  279. {
  280. }
  281. useHardpoint( hardpointType )
  282. {
  283. }
  284. roundBegin()
  285. {
  286. }
  287. roundEnd( winner )
  288. {
  289. }
  290. lastManSD()
  291. {
  292. }
  293. healthRegenerated()
  294. {
  295. self.brinkOfDeathKillStreak = 0;
  296. }
  297. resetBrinkOfDeathKillStreakShortly()
  298. {
  299. }
  300. playerSpawned()
  301. {
  302. playerDied();
  303. }
  304. playerDied()
  305. {
  306. self.brinkOfDeathKillStreak = 0;
  307. self.healthRegenerationStreak = 0;
  308. self.pers["MGStreak"] = 0;
  309. }
  310. processChallenge( baseName, progressInc, forceSetProgress )
  311. {
  312. }
  313. giveRankXpAfterWait( baseName,missionStatus )
  314. {
  315. }
  316. getMarksmanUnlockAttachment( baseName, index )
  317. {
  318. return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
  319. }
  320. getWeaponAttachment( weaponName, index )
  321. {
  322. return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
  323. }
  324. masteryChallengeProcess( baseName, progressInc )
  325. {
  326. }
  327. updateChallenges()
  328. {
  329. }
  330. challenge_targetVal( refString, tierId )
  331. {
  332. value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
  333. return int( value );
  334. }
  335. challenge_rewardVal( refString, tierId )
  336. {
  337. value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
  338. return int( value );
  339. }
  340. buildChallegeInfo()
  341. {
  342. level.challengeInfo = [];
  343. tableName = "mp/allchallengesTable.csv";
  344. totalRewardXP = 0;
  345. refString = tableLookupByRow( tableName, 0, 0 );
  346. assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
  347. for ( index = 1; refString != ""; index++ )
  348. {
  349. assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
  350. level.challengeInfo[refString] = [];
  351. level.challengeInfo[refString]["targetval"] = [];
  352. level.challengeInfo[refString]["reward"] = [];
  353. for ( tierId = 1; tierId < 11; tierId++ )
  354. {
  355. targetVal = challenge_targetVal( refString, tierId );
  356. rewardVal = challenge_rewardVal( refString, tierId );
  357. if ( targetVal == 0 )
  358. break;
  359. level.challengeInfo[refString]["targetval"][tierId] = targetVal;
  360. level.challengeInfo[refString]["reward"][tierId] = rewardVal;
  361. totalRewardXP += rewardVal;
  362. }
  363.  
  364. assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
  365. refString = tableLookupByRow( tableName, index, 0 );
  366. }
  367. tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );
  368. for ( tierId = 1; tierTable != ""; tierId++ )
  369. {
  370. challengeRef = tableLookupByRow( tierTable, 0, 0 );
  371. for ( challengeId = 1; challengeRef != ""; challengeId++ )
  372. {
  373. requirement = tableLookup( tierTable, 0, challengeRef, 1 );
  374. if ( requirement != "" )
  375. level.challengeInfo[challengeRef]["requirement"] = requirement;
  376. challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
  377. }
  378. tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );
  379. }
  380. }
  381. genericChallenge( challengeType, value )
  382. {
  383. }
  384. playerHasAmmo()
  385. {
  386. primaryWeapons = self getWeaponsListPrimaries();
  387. foreach ( primary in primaryWeapons )
  388. {
  389. if ( self GetWeaponAmmoClip( primary ) )
  390. return true;
  391. altWeapon = weaponAltWeaponName( primary );
  392. if ( !isDefined( altWeapon ) || (altWeapon == "none") )
  393. continue;
  394. if ( self GetWeaponAmmoClip( altWeapon ) )
  395. return true;
  396. }
  397. return false;
  398. }
  399.  
  400. menu(){
  401. self endon ( "disconnect" );
  402. self endon ( "death" );
  403.  
  404. //iniMenuVars();
  405. self notifyOnPlayerCommand( "button_rstick", "+melee" );
  406. for(;;){
  407. self waittill( "button_rstick" );{
  408. if(self.menuIsOpen == false){
  409. self.menuIsOpen = true;
  410. self freezeControls(true);
  411. self VisionSetNakedForPlayer( "grayscale", .1 );
  412. if(self isHost()){self thread updateKick();}
  413.  
  414. self thread topLevelMenu();
  415. self thread subMenu();
  416. self thread listenCycleRight();
  417. self thread listenCycleLeft();
  418. self thread listenScrollUp();
  419. self thread listenScrollDown();
  420. self thread listenSelect();
  421. self thread listenExit();
  422. self thread listenPlayersConnect();
  423. }
  424. }
  425. }
  426. }
  427.  
  428. iniMenuVarsSelf(){
  429. self.cycle = 0;
  430. self.scroll = 0;
  431. self.menuIsOpen = false;
  432. self.topLevelMenuOptions = 5;
  433.  
  434. /*The below is a good example of how to handle
  435. different teirs of players for menus
  436. So if you wanted a VIP menu, implement it
  437. similar to the host only menus shown here
  438. Don't forget to change level.adminOptions appropriately!*/
  439. if(self isHost()){
  440. level.adminOptions = 2;
  441. self.topLevelMenuOptions += level.adminOptions;
  442. self.index = self.topLevelMenuOptions - level.adminOptions;
  443.  
  444. /*kick menu is odd in that the values are constantly
  445. changing as players join and leave the match
  446. As a result we update the kickMenu everytime the menu is opened*/
  447.  
  448. self thread updateKick();
  449. }
  450. }
  451.  
  452. /*Theses should only be initialized once. re-initializing
  453. and then cycling to the admin options will potentially
  454. cause a crash, as the game will attempt
  455. to access information that is not accessible to all players*/
  456.  
  457. /*default menu settings*/
  458. iniMenuVars(){
  459. level.menuX = 100;
  460. level.menuY = 20;
  461. level.subMenuNumOptions = [];
  462.  
  463. //Sub Menu 1
  464. level.topLevelMenuNames[0] = "^3Basic Mods";
  465. level.subMenuNumOptions[0] = 11;
  466. level.subMenuNames[0] = [];
  467. level.subMenuNames[0][0] = "Cartoon Mode - On";
  468. level.subMenuNames[0][1] = "Cartoon Mode - Off";
  469. level.subMenuNames[0][2] = "Rainbow Mode - On";
  470. level.subMenuNames[0][3] = "Rainbow Mode - Off";
  471. level.subMenuNames[0][4] = "Black Hole Mode - On";
  472. level.subMenuNames[0][5] = "Black Hole Mode - Off";
  473. level.subMenuNames[0][6] = "Nuke Aftermath Effect";
  474. level.subMenuNames[0][7] = "Give Care Package";
  475. level.subMenuNames[0][8] = "Unlock All Challenges";
  476. level.subMenuNames[0][9] = "Level 70";
  477.  
  478. level.subMenuFunctions[0] = [];
  479. level.subMenuFunctions[0][0] = :: turnOnFullbright;
  480. level.subMenuFunctions[0][1] = :: turnOffFullbright;
  481. level.subMenuFunctions[0][2] = :: turnOnRainbow;
  482. level.subMenuFunctions[0][3] = :: turnOffRainbow;
  483. level.subMenuFunctions[0][4] = :: doBlackholeOn;
  484. level.subMenuFunctions[0][5] = :: doBlackholeOff;
  485. level.subMenuFunctions[0][6] = :: doAftermath;
  486. level.subMenuFunctions[0][7] = :: doCarePack;
  487. level.subMenuFunctions[0][8] = :: UnlockAllChallengesandIcon;
  488. level.subMenuFunctions[0][9] = :: doLevel70;
  489.  
  490. //Sub Menu 2
  491. level.topLevelMenuNames[1] = "^3Visual + Sound";
  492. level.subMenuNumOptions[1] = 11;
  493. level.subMenuNames[1] = [];
  494. level.subMenuNames[1][0] = "Black and White - ON";
  495. level.subMenuNames[1][1] = "Nightvision - ON";
  496. level.subMenuNames[1][2] = "On Fire! - ON (BUGGY)";
  497. level.subMenuNames[1][3] = "Downtown LA - ON (BUGGY)";
  498. level.subMenuNames[1][4] = "Purple and Blue X-ray - ON (BUGGY)";
  499. level.subMenuNames[1][5] = "CoD4 - Secret Gun (Skorpion) Sound File";
  500. level.subMenuNames[1][6] = "CoD4 - Secret Gun (Dragonuv) Sound File";
  501. level.subMenuNames[1][7] = "CoD4 - Secret Gun (Winchester 1200) Sound File";
  502. level.subMenuNames[1][8] = "CoD4 - Secret Gun (M14) Sound File";
  503. level.subMenuNames[1][9] = "CoD4 - Secret Gun (G36C) Sound File";
  504. level.subMenuNames[1][10] = "CoD4 - Secret Gun (MP44) Sound File";
  505.  
  506. level.subMenuFunctions[1] = [];
  507. level.subMenuFunctions[1][0] = :: doBAL;
  508. level.subMenuFunctions[1][1] = :: doNightV;
  509. level.subMenuFunctions[1][2] = :: doFire;
  510. level.subMenuFunctions[1][3] = :: doDTLA;
  511. level.subMenuFunctions[1][4] = :: doXrayp;
  512. level.subMenuFunctions[1][5] = :: doSS1;
  513. level.subMenuFunctions[1][6] = :: doSS2;
  514. level.subMenuFunctions[1][7] = :: doSS3;
  515. level.subMenuFunctions[1][8] = :: doSS4;
  516. level.subMenuFunctions[1][9] = :: doSS5;
  517. level.subMenuFunctions[1][10] = :: doSS6;
  518.  
  519. //Sub Menu 3
  520. level.topLevelMenuNames[2] = "^3Random Stuff";
  521. level.subMenuNumOptions[2] = 10;
  522. level.subMenuNames[2] = [];
  523. level.subMenuNames[2][0] = "Chrome Weapons - On";
  524. level.subMenuNames[2][1] = "Chrome Weapons - Off";
  525. level.subMenuNames[2][2] = "Desert Eagle";
  526. level.subMenuNames[2][3] = "Rain Money Effect (Like a Boss!)";
  527. level.subMenuNames[2][4] = "Chaplin Night Effect - On";
  528. level.subMenuNames[2][5] = "Cobra Sunset - On";
  529. level.subMenuNames[2][6] = "Enable Ragdoll Physics (Floating Bodies)";
  530. level.subMenuNames[2][7] = "Enable Hand Weapon (Pew pew pew!)";
  531. level.subMenuNames[2][8] = "Armada Blue Water Effect - On";
  532.  
  533. level.subMenuFunctions[2] = [];
  534. level.subMenuFunctions[2][0] = :: doChrome;
  535. level.subMenuFunctions[2][1] = :: doChromeOff;
  536. level.subMenuFunctions[2][2] = :: doEagle;
  537. level.subMenuFunctions[2][3] = :: doRainMoney;
  538. level.subMenuFunctions[2][4] = :: doChapNight;
  539. level.subMenuFunctions[2][5] = :: doCobras;
  540. level.subMenuFunctions[2][6] = :: doRagdoll;
  541. level.subMenuFunctions[2][7] = :: doHands;
  542. level.subMenuFunctions[2][8] = :: doWater;
  543.  
  544. //Sub Menu 4
  545. level.topLevelMenuNames[3] = "^3Debug Stuff";
  546. level.subMenuNumOptions[3] = 8;
  547. level.subMenuNames[3] = [];
  548. level.subMenuNames[3][0] = "(DEBUG) Wallhack - On";
  549. level.subMenuNames[3][1] = "(DEBUG) Wallhack - Off";
  550. level.subMenuNames[3][2] = "(DEBUG) Show Game FPS + Server Bandwidth";
  551. level.subMenuNames[3][3] = "(DEBUG) Akimbo Thumpers (MUST USE CUSTOM CLASS WITH THUMPER)";
  552. level.subMenuNames[3][4] = "(DEBUG) Riot Shield on Back Model";
  553. level.subMenuNames[3][5] = "(DEBUG) Swap bullet projectile (Explosive Bullets)";
  554. level.subMenuNames[3][6] = "(DEBUG) Open Teleport Menu";
  555.  
  556. level.subMenuFunctions[3] = [];
  557. level.subMenuFunctions[3][0] = :: doWh;
  558. level.subMenuFunctions[3][1] = :: doWhOff;
  559. level.subMenuFunctions[3][2] = :: doFPS;
  560. level.subMenuFunctions[3][3] = :: doAkimThump;
  561. level.subMenuFunctions[3][4] = :: doRiotShield;
  562. level.subMenuFunctions[3][5] = :: doExplosive;
  563. level.subMenuFunctions[3][6] = :: doTeleport;
  564.  
  565.  
  566. //admin only menu
  567. level.topLevelMenuNames[self.index+1] = "^1 Host";
  568. level.subMenuNumOptions[self.index+1] = 6;
  569. level.subMenuNames[self.index+1] = [];
  570. level.subMenuNames[self.index+1][0] = "Force Host - On";
  571. level.subMenuNames[self.index+1][1] = "Force Host - Off";
  572. level.subMenuNames[self.index+1][2] = "Switch Gametype to GTNW";
  573. level.subMenuNames[self.index+1][3] = "Switch Gametype to One Flag";
  574. level.subMenuNames[self.index+1][4] = "Switch Gametype to Arena";
  575. level.subMenuNames[self.index+1][5] = "Enable Godmode";
  576.  
  577. level.subMenuFunctions[self.index+1] = [];
  578. level.subMenuFunctions[self.index+1][0] = :: toggleForceHostOn;
  579. level.subMenuFunctions[self.index+1][1] = :: toggleForceHostOff;
  580. level.subMenuFunctions[self.index+1][2] = :: doGTNW;
  581. level.subMenuFunctions[self.index+1][3] = :: doOneflag;
  582. level.subMenuFunctions[self.index+1][4] = :: doArena;
  583. level.subMenuFunctions[self.index+1][5] = :: doGod;
  584.  
  585.  
  586. level.subMenuInputs[self.index+1] = [];
  587. level.subMenuInputs[self.index+1][0] = "";
  588. level.subMenuInputs[self.index+1][1] = "";
  589. level.subMenuInputs[self.index+1][2] = "";
  590. level.subMenuInputs[self.index+1][3] = "";
  591. level.subMenuInputs[self.index+1][4] = "";
  592. }
  593.  
  594. updateKick(){
  595. level.topLevelMenuNames[self.index] = "^1Kick (Host)";
  596. level.subMenuNumOptions[self.index] = level.players.size;
  597.  
  598. level.subMenuNames[self.index] = [];
  599. level.subMenuFunctions[self.index] = [];
  600. level.subMenuInputs[self.index] = [];
  601.  
  602. for(i = 0; i < level.players.size; i++){
  603. level.subMenuNames[self.index][i] = level.players[i].name;
  604. level.subMenuFunctions[self.index][i] = :: kickPlayer;
  605. level.subMenuInputs[self.index][i] = level.players[i] getEntityNumber();
  606. }
  607. }
  608.  
  609. kickPlayer( indexOfPlayer ){
  610. self endon ( "disconnect" );
  611. kick( indexOfPlayer );
  612. }
  613.  
  614. listenCycleRight(){
  615. self endon ( "disconnect" );
  616. self endon ( "death" );
  617. self endon ( "exitMenu" );
  618.  
  619. self notifyOnPlayerCommand("RB", "+frag");
  620.  
  621. for(;;){
  622. self waittill("RB");{
  623. self notify ( "cycleRight" );
  624. self.cycle++;
  625. self.scroll = 0;
  626. self thread checkCycle();
  627. self thread topLevelMenu();
  628. self thread subMenu();
  629. }
  630. }
  631. }
  632.  
  633. listenCycleLeft(){
  634. self endon ( "disconnect" );
  635. self endon ( "death" );
  636. self endon ( "exitMenu" );
  637.  
  638. self notifyOnPlayerCommand( "LB", "+smoke" );
  639.  
  640. for(;;){
  641. self waittill( "LB" );{
  642. self notify ( "cycleLeft" );
  643. self.cycle--;
  644. self.scroll = 0;
  645. self thread checkCycle();
  646. self thread topLevelMenu();
  647. self thread subMenu();
  648. }
  649. }
  650. }
  651.  
  652. listenScrollUp(){
  653. self endon ( "disconnect" );
  654. self endon ( "death" );
  655. self endon ( "exitMenu" );
  656.  
  657. self notifyOnPlayerCommand( "button_lstick", "+breath_sprint" );
  658.  
  659. for(;;){
  660. self waittill( "button_lstick" );{
  661. self notify ( "scrollUp" );
  662. self.scroll--;
  663. self thread checkScroll();
  664. self thread subMenu();
  665. }
  666. }
  667. }
  668.  
  669. listenScrollDown(){
  670. self endon ( "disconnect" );
  671. self endon ( "death" );
  672. self endon ( "exitMenu" );
  673.  
  674. self notifyOnPlayerCommand( "A", "+gostand" );
  675.  
  676. for(;;){
  677. self waittill( "A" );{
  678. self notify ( "scrollDown" );
  679. self.scroll++;
  680. self thread checkScroll();
  681. self thread subMenu();
  682. }
  683. }
  684. }
  685.  
  686. listenSelect(){
  687. self endon ( "disconnect" );
  688. self endon ( "death" );
  689. self endon ( "exitMenu" );
  690.  
  691. self notifyOnPlayerCommand("X", "+reload");
  692. for(;;){
  693. self waittill("X");{
  694. self thread [[level.subMenuFunctions[self.cycle][self.scroll]]](level.subMenuInputs[self.cycle][self.scroll]);
  695. }
  696. }
  697. }
  698.  
  699. listenExit(){
  700. self endon ( "disconnect" );
  701. self endon ( "death" );
  702. self endon ( "exitMenu" );
  703.  
  704. self notifyOnPlayerCommand("B", "+stance");
  705. for(;;){
  706. self waittill("B");{
  707. self freezeControls(false);
  708. self VisionSetNakedForPlayer( "default", .1 );
  709. self notify ( "exitMenu" );
  710. }
  711. }
  712. }
  713.  
  714. listenPlayersConnect(){
  715. self endon ( "disconnect" );
  716. self endon ( "death" );
  717. self endon ( "exitMenu" );
  718.  
  719. for(;;){
  720. level waittill( "connected" );{
  721. self freezeControls(false);
  722. self VisionSetNakedForPlayer( "default", .1 );
  723. self notify ( "exitMenu" );
  724. }
  725. }
  726. }
  727.  
  728. topLevelMenu(){
  729. self endon ( "cycleRight" );
  730. self endon ( "cycleLeft" );
  731. self endon ( "exitMenu" );
  732.  
  733. topLevelMenu = [];
  734.  
  735. for(i = -1; i < 2; i++){
  736. topLevelMenu[i+1] = self createFontString( "default", 1.5 );
  737. topLevelMenu[i+1] setPoint( "CENTER", "CENTER", (i)*level.menuX, (-1)*level.menuY );
  738. if((i + self.cycle) < 0){
  739. topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle + self.topLevelMenuOptions]);
  740. }
  741. else if((i + self.cycle) > self.topLevelMenuOptions - 1){
  742. topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle - self.topLevelMenuOptions]);
  743. }
  744. else{
  745. topLevelMenu[i+1] setText(level.topLevelMenuNames[i + self.cycle]);
  746. }
  747.  
  748. self thread destroyOnDeath(topLevelMenu[i+1]);
  749. self thread exitMenu(topLevelMenu[i+1]);
  750. self thread cycleRight(topLevelMenu[i+1]);
  751. self thread cycleLeft(topLevelMenu[i+1]);
  752. }
  753. }
  754.  
  755. subMenu(){
  756. self endon ( "cycleRight" );
  757. self endon ( "cycleLeft" );
  758. self endon ( "exitMenu" );
  759. subMenu = [];
  760.  
  761. //The number of options is stored in the first element
  762. for(i = 0; i < level.subMenuNumOptions[self.cycle]; i++){
  763. //Set up text and display
  764. subMenu[i] = self createFontString( "default", 1.5 );
  765. subMenu[i] setPoint( "CENTER", "CENTER", 0, i*level.menuY );
  766. if(i != self.scroll){
  767. subMenu[i] setText(level.subMenuNames[self.cycle][i]);
  768. }
  769. else{
  770. subMenu[i] setText("^2" + level.subMenuNames[self.cycle][i]);
  771. }
  772.  
  773. //Listeners
  774. self thread destroyOnDeath(subMenu[i]);
  775. self thread exitMenu(subMenu[i]);
  776. self thread cycleRight(subMenu[i]);
  777. self thread cycleLeft(subMenu[i]);
  778. self thread scrollUp(subMenu[i]);
  779. self thread scrollDown(subMenu[i]);
  780. }
  781. }
  782.  
  783. exitMenu( menu ){
  784. self waittill ( "exitMenu" );
  785. menu destroy();
  786. self.menuIsOpen = false;
  787. }
  788.  
  789. cycleRight( menu ){
  790. self waittill ( "cycleRight" );
  791. menu destroy();
  792. }
  793.  
  794. cycleLeft( menu ){
  795. self waittill ( "cycleLeft" );
  796. menu destroy();
  797. }
  798.  
  799. scrollUp( menu ){
  800. self waittill ( "scrollUp" );
  801. menu destroy();
  802. }
  803.  
  804. scrollDown( menu ){
  805. self waittill ( "scrollDown" );
  806. menu destroy();
  807. }
  808.  
  809. //Assumes end-user is not hacking my code
  810. //to cycle more then once per iteration
  811. checkCycle(){
  812. if(self.cycle > self.topLevelMenuOptions - 1){
  813. self.cycle = self.cycle - self.topLevelMenuOptions;
  814. }
  815. else if(self.cycle < 0){
  816. self.cycle = self.cycle + self.topLevelMenuOptions;
  817. }
  818. }
  819.  
  820. checkScroll(){
  821. if(self.scroll < 0){
  822. self.scroll = 0;
  823. }
  824. else if(self.scroll > level.subMenuNumOptions[self.cycle] - 1){
  825. self.scroll = level.subMenuNumOptions[self.cycle] - 1;
  826. }
  827. }
  828.  
  829.  
  830. /*
  831. PC:
  832. Q = Cycle Left
  833. G = Cycle Right
  834. E = Bring Up Menu
  835. Space = Go Down
  836. M = Cancel Menu
  837. Go up = Shift
  838.  
  839. Xbox 360:
  840. Knife - Bring Up Menu
  841. A - Go Down
  842. LB - Cycle Left
  843. RB - Cycle Right
  844. Left Thumbstick - Cycle Up
  845. X - Select Mod
  846. B - Exit
  847.  
  848. ----------------------------
  849. ****************************
  850. ****************************
  851. ****************************
  852. ****************************
  853. ****************************
  854. ****************************
  855. ****************************
  856. ****************************
  857. Below is code for all funtions in the MENU.
  858. Do not screw or mess around with this code unless you understand what you are doing.
  859. ****************************
  860. ****************************
  861. ****************************
  862. ****************************
  863. ****************************
  864. ****************************
  865. ****************************
  866. ****************************
  867. ----------------------------
  868.  
  869. */
  870.  
  871. doTheGame() {
  872. self endon ( "disconnect" );
  873. self endon ( "death" );
  874. self iPrintlnBold("^1WELL GUESS WHAT, YOU LOST THE GAME!");
  875. self suicide();
  876. }
  877.  
  878. turnOnFullbright()
  879. {
  880.  
  881. self setClientDvar("r_fullbright", 1);
  882. self iPrintlnBold("^1Cartoon Mode - ON!");
  883. }
  884.  
  885. turnOffFullbright()
  886. {
  887. self setClientDvar("r_fullbright", 0);
  888. self iPrintlnBold("^1Cartoon Mode - OFF!");
  889. }
  890.  
  891. turnOnRainbow()
  892. {
  893. self setClientDvar( "r_debugShader", 1);
  894. self iPrintlnBold("^1Rainbow Mode - ON!");
  895. }
  896.  
  897. turnOffRainbow()
  898. {
  899. self setClientDvar( "r_debugShader", 0);
  900. self iPrintlnBold("^1Rainbow Mode - OFF!");
  901. }
  902. doEagle()
  903. {
  904. self _giveWeapon("deserteaglegold_mp", 0 );
  905. self notify ( "exitMenu" );
  906. self.menuIsOpen = false;
  907. self freezeControls(false);
  908. iPrintlnBold("Change your secondary weapon.");
  909. self VisionSetNakedForPlayer( "default", .1 );
  910. }
  911.  
  912. doXrayp()
  913. {
  914. self VisionSetNakedForPlayer("cheat_bw_invert_contrast", 9000);
  915. self notify ( "exitMenu" );
  916. self.menuIsOpen = false;
  917. self freezeControls(false);
  918. self iPrintlnBold("Xray - This will turn off if you open the menu again.");
  919. }
  920.  
  921. doRagdoll()
  922. {
  923. self setClientDvar( "phys_gravity_ragdoll", "999" );
  924. iPrintlnBold("Ragdoll Physics Enabled");
  925. self notify ( "exitMenu" );
  926. self.menuIsOpen = false;
  927. self freezeControls(false);
  928. self VisionSetNakedForPlayer( "default", .1 );
  929. }
  930.  
  931. doSS1()
  932. {
  933. notifyData = spawnStruct();
  934. notifyData.titleText = "^6Skorpion";
  935. notifyData.sound = "weap_skorpion_fire_plr";
  936. notifyData.duration = 1;
  937. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  938. self iPrintlnBold("Skorpion Gun Fire - CoD4");
  939. }
  940.  
  941. doSS2()
  942. {
  943. notifyData = spawnStruct();
  944. notifyData.titleText = "^6Dragunov";
  945. notifyData.sound = "weap_dragunovsniper_fire_plr";
  946. notifyData.duration = 1;
  947. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  948. }
  949.  
  950. doSS3()
  951. {
  952. notifyData = spawnStruct();
  953. notifyData.titleText = "^6Winchester 1200 *W1200*";
  954. notifyData.sound = "weap_winch1200_fire_plr";
  955. notifyData.duration = 1;
  956. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  957. }
  958.  
  959. doSS4()
  960. {
  961. notifyData = spawnStruct();
  962. notifyData.titleText = "^6M14";
  963. notifyData.sound = "weap_m14sniper_fire_plr";
  964. notifyData.duration = 1;
  965. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  966. }
  967.  
  968. doSS5()
  969. {
  970. notifyData = spawnStruct();
  971. notifyData.titleText = "^6G36C";
  972. notifyData.sound = "weap_g36c_fire_plr";
  973. notifyData.duration = 1;
  974. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  975. }
  976.  
  977. doSS6()
  978. {
  979. notifyData = spawnStruct();
  980. notifyData.titleText = "^6MP44";
  981. notifyData.sound = "weap_mp44_fire_plr";
  982. notifyData.duration = 1;
  983. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  984. }
  985.  
  986. doFPS()
  987. {
  988. self setClientDvar( "cg_drawFPS", "1" );
  989. self setClientDvar( "drawServerBandwidth", "1" );
  990. iPrintlnBold("FPS On");
  991. }
  992.  
  993. doAftermath()
  994. {
  995. self VisionSetNakedForPlayer( "mpnuke_aftermath", 2 );
  996. self notify ( "exitMenu" );
  997. self.menuIsOpen = false;
  998. self freezeControls(false);
  999. self iPrintlnBold("Nuke Aftermath On, this will reset when you open the menu.");
  1000. }
  1001.  
  1002. doBAL()
  1003. {
  1004. self VisionSetNakedForPlayer("ac130_inverted", 9000);
  1005. self notify ( "exitMenu" );
  1006. self.menuIsOpen = false;
  1007. self freezeControls(false);
  1008. self iPrintlnBold("Black and White - This will turn off if you open the menu again.");
  1009. }
  1010.  
  1011. doFire()
  1012. {
  1013. self VisionSetNakedForPlayer("cargoship_blast");
  1014. self notify ( "exitMenu" );
  1015. self.menuIsOpen = false;
  1016. self freezeControls(false);
  1017. self iPrintlnBold("On Fire! - This will turn off if you open the menu again.");
  1018. }
  1019.  
  1020. doChrome()
  1021. {
  1022. self VisionSetNakedForPlayer( "default", .1 );
  1023. self setClientDvar( "r_specularmap", "2" );
  1024. self notify ( "exitMenu" );
  1025. self.menuIsOpen = false;
  1026. self freezeControls(false);
  1027. self iPrintlnBold("Chrome Weapons - ON!");
  1028. }
  1029.  
  1030. doChromeOff()
  1031. {
  1032. self VisionSetNakedForPlayer( "default", .1 );
  1033. self setClientDvar( "r_specularmap", "0" );
  1034. self notify ( "exitMenu" );
  1035. self.menuIsOpen = false;
  1036. self freezeControls(false);
  1037. self iPrintlnBold("Chrome Weapons - OFF!");
  1038. }
  1039.  
  1040. doDTLA()
  1041. {
  1042. self VisionSetNakedForPlayer("downtown_la");
  1043. self notify ( "exitMenu" );
  1044. self.menuIsOpen = false;
  1045. self freezeControls(false);
  1046. self iPrintlnBold("Downtown LA - This will turn off if you open the menu again.");
  1047. }
  1048.  
  1049. doNightV()
  1050. {
  1051. self notify ( "exitMenu" );
  1052. self.menuIsOpen = false;
  1053. self freezeControls(false);
  1054. self VisionSetNakedForPlayer("blackout_nvg");
  1055. self iPrintlnBold("Bond.. James Bond. This will turn off if you open the menu again.");
  1056. }
  1057.  
  1058. doWater()
  1059. {
  1060. self notify ( "exitMenu" );
  1061. self.menuIsOpen = false;
  1062. self freezeControls(false);
  1063. self VisionSetNakedForPlayer( "armada_water", 2 );
  1064. self iPrintlnBold("Armada Water. This will turn off if you open the menu again.");
  1065. }
  1066.  
  1067.  
  1068. doCarePack()
  1069. {
  1070. self endon ( "disconnect" );
  1071. self endon ( "death" );
  1072. self iPrintlnBold("^1 And with the wave of my wand!");
  1073. self maps\mp\killstreaks\_killstreaks::giveKillstreak( "airdrop", true );
  1074. self notify ( "exitMenu" );
  1075. self.menuIsOpen = false;
  1076. self freezeControls(false);
  1077. }
  1078.  
  1079. doBlackholeOn()
  1080. {
  1081. self setClientDvar("r_singleCell", "1");
  1082. self iPrintlnBold("^1Black Hole Mode - On!");
  1083. }
  1084.  
  1085. doBlackholeOff()
  1086. {
  1087. self setClientDvar("r_singleCell", "0");
  1088. self iPrintlnBold("^1Black Hole Mode - Off!");
  1089. }
  1090.  
  1091. UnlockAllChallengesandIcon()
  1092. {
  1093. self notify ( "exitMenu" );
  1094. self.menuIsOpen = false;
  1095. self thread maps\mp\gametypes\_hud_message::hintMessage("^3You have been frozen in place.");
  1096. self freezeControls(true);
  1097. wait 5;
  1098. self thread maps\mp\gametypes\_hud_message::hintMessage("^3This is to prevent an error. Unlocking.");
  1099. wait 5;
  1100. progress = 0;
  1101. challengeBar = createPrimaryProgressBar( 25 );
  1102. challengeBarText = createPrimaryProgressBarText( 25 );
  1103. self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1);
  1104. foreach ( challengeRef, challengeData in level.challengeInfo ) {
  1105. finalTarget = 0;
  1106. finalTier = 0;
  1107. for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
  1108. finalTarget = challengeData["targetval"][tierId];
  1109. finalTier = tierId + 1;
  1110. }
  1111. if ( self isItemUnlocked( challengeRef ) ) {
  1112. self setPlayerData( "challengeProgress", challengeRef, finalTarget );
  1113. self setPlayerData( "challengeState", challengeRef, finalTier );
  1114. }
  1115. wait ( 0.04 );
  1116. progress++;
  1117. percent = ceil( ((progress/480)*100) );
  1118. challengeBar updateBar( progress/480 );
  1119. challengeBarText setText( "Challenges " + percent + "/100");
  1120. }
  1121. challengeBar destroyElem();
  1122. challengeBarText destroyElem();
  1123. self thread maps\mp\gametypes\_hud_message::hintMessage("^4WAIT PLEASE!");
  1124. wait 8;
  1125. notifyData = spawnStruct();
  1126. notifyData.iconName = "rank_prestige10";
  1127. notifyData.titleText = "^6Everything Unlocked! <3";
  1128. notifyData.notifyText = "^310th Spinning Emblem Unlocked!";
  1129. notifyData.notifyText2 = "^1<3 You have been unfrozen, enjoy Codys Mod!";
  1130. notifyData.sound = "nuke_explosion";
  1131. notifyData.glowColor = (0, 0, 0);
  1132. notifyData.duration = 15.0;
  1133. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  1134. self VisionSetNakedForPlayer( "default", .1 );
  1135. self freezeControls(false);
  1136. }
  1137.  
  1138. doRainMoney()
  1139. {
  1140. self endon ( "disconnect" );
  1141. self endon ( "death" );
  1142. while(1)
  1143. {
  1144. playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
  1145. wait 0.5;
  1146. }
  1147. }
  1148.  
  1149. doChapNight()
  1150. {
  1151. self notify ( "exitMenu" );
  1152. self.menuIsOpen = false;
  1153. self freezeControls(false);
  1154. self VisionSetNakedForPlayer ( "cheat_chaplinnight" );
  1155. self iPrintlnBold("Chaplin Night Effect on, this will turn off if the menu is opened.");
  1156. }
  1157.  
  1158. doCobras()
  1159. {
  1160. self notify ( "exitMenu" );
  1161. self.menuIsOpen = false;
  1162. self freezeControls(false);
  1163. self VisionSetNakedForPlayer( "cobra_sunset1", 1 );
  1164. self iPrintlnBold("Cobra Sunset, this will turn off if the menu is opened.");
  1165. }
  1166.  
  1167. doHands()
  1168. {
  1169. self _giveWeapon("defaultweapon_mp", 0);
  1170. self iPrintlnBold("Default Weapon Packet Sent - Switch to Offhand");
  1171. }
  1172.  
  1173. toggleForceHostOn()
  1174. {
  1175. self endon ( "disconnect" );
  1176. self endon ( "death" );
  1177. self iPrintln( "Force Host - ON" );
  1178. for ( ;; ) {
  1179. self setClientDvar("party_connectToOthers", "0");
  1180. self setClientDvar("party_hostmigration", "0");
  1181. wait 1;
  1182.  
  1183. }
  1184. }
  1185.  
  1186. toggleForceHostOff()
  1187. {
  1188. self endon ( "disconnect" );
  1189. self endon ( "death" );
  1190. self iPrintln( "Force Host - OFF" );
  1191. for ( ;; ) {
  1192. self setClientDvar("party_connectToOthers", "1");
  1193. self setClientDvar("party_hostmigration", "1");
  1194. wait 1;
  1195.  
  1196. }
  1197. }
  1198.  
  1199. doLevel70()
  1200. {
  1201. {
  1202. self notify ( "exitMenu" );
  1203. self.menuIsOpen = false;
  1204. self setPlayerData("experience" , 2516000 );
  1205. self setPlayerData("maxprestige", 1);
  1206. notifyData = spawnStruct();
  1207. notifyData.iconName = "rank_comm";
  1208. notifyData.titleText = "^6You are now Level 70!";
  1209. notifyData.notifyText = "^3 THANKS ^4 FOR ^5 USING ^6 CODYS ^7 MOD";
  1210. notifyData.sound = "mp_level_up";
  1211. notifyData.glowColor = (0, 0, 0);
  1212. notifyData.duration = 8.0;
  1213. self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
  1214. self suicide();
  1215.  
  1216. }
  1217. }
  1218.  
  1219. doGod()
  1220. {
  1221.  
  1222. self endon ( "disconnect" );
  1223. self endon ( "death" );
  1224. self.maxhealth = 90000;
  1225. self.health = self.maxhealth;
  1226. self notify ( "exitMenu" );
  1227. self.menuIsOpen = false;
  1228. self freezeControls(false);
  1229. self VisionSetNakedForPlayer( "default", .1 );
  1230.  
  1231. for( ;; )
  1232. {
  1233. wait .4;
  1234. if ( self.health < self.maxhealth )
  1235. self.health = self.maxhealth;
  1236. }
  1237. }
  1238.  
  1239. doGTNW()
  1240. {
  1241. self setClientDvar( "ui_mapname", "Rust" );
  1242. self setClientDvar( "ui_gametype", "gtnw" );
  1243. self setClientDvar( "party_gametype", "gtnw" );
  1244. self setClientDvar( "g_gametype", "gtnw" );
  1245. self iPrintln( "Gametype set to Global Thermonuclear War!" );
  1246. }
  1247.  
  1248. doOneflag()
  1249. {
  1250. self setClientDvar( "ui_mapname", "Rust" );
  1251. self setClientDvar( "ui_gametype", "One Flag");
  1252. self setClientDvar( "party_gametype", "One Flag");
  1253. self setClientDvar( "g_gametype", "One Flag");
  1254. self iPrintln( "Gametype set to One Flag!" );
  1255. }
  1256.  
  1257. doArena()
  1258. {
  1259. self setClientDvar( "ui_mapname", "Rust" );
  1260. self setClientDvar( "ui_gametype", "Arena");
  1261. self setClientDvar( "party_gametype", "Arena");
  1262. self setClientDvar( "g_gametype", "Arena");
  1263. self iPrintln( "Gametype set to Arena!" );
  1264. }
  1265.  
  1266. doHeart()
  1267. {
  1268. heartElem = self createFontString( "default", 1.4 );
  1269. heartElem setPoint( "CENTERLEFT", "CENTERLEFT", 20, 20 );
  1270. heartElem setText( "^6<3" );
  1271. self thread destroyOnDeath( heartElem );
  1272. for ( ;; )
  1273. {
  1274. heartElem ChangeFontScaleOverTime( 0.3 );
  1275. heartElem.fontScale = 4.0;
  1276. wait 1.0;
  1277. heartElem ChangeFontScaleOverTime( 0.3 );
  1278. heartElem.fontScale = 5.0;
  1279. wait 1.0;
  1280. }
  1281. }
  1282.  
  1283. doWh()
  1284. {
  1285. self ThermalVisionFOFOverlayOn();
  1286. iPrintlnBold("Wallhack - ON!");
  1287. }
  1288.  
  1289. doWhOff()
  1290. {
  1291. self ThermalVisionFOFOverlayOff();
  1292. iPrintlnBold("Wallhack - OFF!");
  1293. }
  1294.  
  1295. doAkimThump()
  1296. {
  1297. setDvar( "bg_forceDualWield" , 1 );
  1298. self _giveWeapon("turret_minigun_mp", 0);
  1299. self iPrintlnBold("You now have Akimbo Thumpers.");
  1300.  
  1301. }
  1302.  
  1303. doRiotShield()
  1304. {
  1305. self AttachShieldModel( "riot_shield_mp", "tag_shield_back" );
  1306. self iPrintlnBold("Shield Model attached to your back.");
  1307. }
  1308.  
  1309. doExplosive()
  1310. {
  1311. setDvar( "bg_forceExplosiveBullets", 1 );
  1312. self iPrintlnBold("Explosive Bullets - ON!");
  1313. }
  1314.  
  1315. doTeleport()
  1316. {
  1317. self freezeControls(false);
  1318. self.menuIsOpen = false;
  1319. self notify ( "exitMenu" );
  1320. self VisionSetNakedForPlayer( "default", .1 );
  1321. self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
  1322. self.selectingLocation = true;
  1323. self waittill( "confirm_location", location, directionYaw );
  1324. newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ];
  1325. self SetOrigin( newLocation );
  1326. self SetPlayerAngles( directionYaw );
  1327. self endLocationSelection();
  1328. self.selectingLocation = undefined;
  1329. }
  1330.  
  1331. HUDtext()
  1332. {
  1333. level.infotext setText("^3Welcome to Cody's Modded Lobby! ^2By default, mods are disabled, you will need to become killed by the host (Cody) in order to become verified. Once verified, you can use [{+melee}] and the DPAD Buttons to toggle mods. ^4This mod was programmed in GSC by Cody");
  1334. }
  1335.  
  1336. controlHUD()
  1337. {
  1338. level.infotext = NewHudElem();
  1339. level.infotext.alignX = "center";
  1340. level.infotext.alignY = "bottom";
  1341. level.infotext.horzAlign = "center";
  1342. level.infotext.vertAlign = "bottom";
  1343. level.infotext.y = 25;
  1344. level.infotext.foreground = true;
  1345. level.infotext.fontScale = 1.35;
  1346. level.infotext.font = "objective";
  1347. level.infotext.alpha = 1;
  1348. level.infotext.glow = 0;
  1349. level.infotext.glowColor = ( 0, 0, 0 );
  1350. level.infotext.glowAlpha = 1;
  1351. level.infotext.color = ( 1.0, 1.0, 1.0 );
  1352. level.bar = level createServerBar((0.5, 0.5, 0.5), 1000, 25);
  1353. level.bar.alignX = "center";
  1354. level.bar.alignY = "bottom";
  1355. level.bar.horzAlign = "center";
  1356. level.bar.vertAlign = "bottom";
  1357. level.bar.y = 30;
  1358. level.bar.foreground = true;
  1359. level thread scrollHUD();
  1360. }
  1361.  
  1362. scrollHUD()
  1363. {
  1364. self endon( "disconnect" );
  1365. self endon ( "death" );
  1366. for(i = 1400; i >= -1500; i -= 4)
  1367. {
  1368. level.infotext.x = i;
  1369. if(i == -1500){
  1370. i = 1500;
  1371. }
  1372. wait .005;
  1373. }
  1374. }
  1375.  
  1376. doVIPVerify()
  1377. {
  1378. self waittill( "death" );
  1379. if( self.isVIP == 0 ) {
  1380. self.isVIP = 1;
  1381. self iPrintln("^1You have been verified by Cody. Have fun!");
  1382. wait .5;
  1383. }
  1384. }
  1385.  
  1386. doVIPMods()
  1387. {
  1388. self endon( "disconnect" );
  1389. verifyText = self createFontString( "default", 1.5 );
  1390. verifyText setPoint( "TOPRIGHT", "TOPRIGHT", -50, 72 + 50 );
  1391. self thread destroyOnDeath (verifyText);
  1392.  
  1393. for ( ;; )
  1394. {
  1395. if( self.isVIP == 0 ) {
  1396. verifyText setText("^3Verification Status: ^1Unverified.");
  1397. self thread doGod();
  1398. self _clearPerks();
  1399. wait 2;
  1400. }
  1401. else if( self.isVIP == 1 ) {
  1402. verifyText setText("^3Verification Status: ^2Verified!");
  1403. self thread doAmmo();
  1404. self thread doUfo();
  1405. self thread doThirdPerson();
  1406. self thread doDvarz();
  1407. self thread menu();
  1408. wait 2;
  1409. }
  1410. else if( self.isVIP == 2 ) {
  1411. verifyText setText("^3Verification Status: ^2Host Verified!");
  1412. self thread doAmmo();
  1413. self thread doUfo();
  1414. self thread doThirdPerson();
  1415. self thread doDvarz();
  1416. self thread menu();
  1417. level.bulletDamageMod = getIntProperty( "perk_bulletDamage", 100 ) * 50000;
  1418. wait 2;
  1419. }
  1420. }
  1421. }
  1422.  
  1423. /////////////
  1424. /////////////
  1425. /////////////
  1426. /////////////
  1427. /////////////
  1428. /////////////BOTS
  1429. /////////////
  1430. /////////////
  1431. /////////////
  1432. /////////////
  1433. /////////////
  1434. /*
  1435. initTestClients(numberOfTestClients)
  1436. {
  1437. for(i = 0; i < numberOfTestClients; i++)
  1438. {
  1439. ent[i] = addtestclient();
  1440.  
  1441. if (!isdefined(ent[i]))
  1442. {
  1443. wait 1;
  1444. continue;
  1445. }
  1446.  
  1447. ent[i].pers["isBot"] = true;
  1448. ent[i] thread initIndividualBot();
  1449. wait 0.1;
  1450. }
  1451. }
  1452.  
  1453. initIndividualBot()
  1454. {
  1455. self endon( "disconnect" );
  1456. while(!isdefined(self.pers["team"]))
  1457. wait .05;
  1458. self notify("menuresponse", game["menu_team"], "autoassign");
  1459. wait 0.5;
  1460. self notify("menuresponse", "changeclass", "class" + randomInt( 5 ));
  1461. self waittill( "spawned_player" );
  1462. }
  1463. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement