Advertisement
Guest User

Untitled

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