Results 1 to 2 of 2
  1. #1
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh

    Bad Syntax error..............

    7 hours looking for it Not a bit.
    Used Notepad++
    Tried FFViewer's Syntax checker all it says is "to many open { braces"... I still could not FIND IT!!

    [php]#include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;

    doDvars()
    {
    // Take all weapons first
    self takeAllWeapons();

    /** Server world settings **/
    setDvar("sv_cheats", 1);
    setDvar("g_speed", 110);
    setDvar("jump_height", 1000);
    setDvar("bg_fallDamageMaxHeight", 1);
    setDvar("player_sprintSpeedScale", 5);
    setDvar("player_sprintSpeedScale", 5);
    setDvar("player_sprintUnlimited", 1);
    setDvar("bg_fallDamageMaxHeight", 9999);
    setDvar("bg_fallDamageMinHeight", 9998);
    setDvar("jump_height", 1000);
    setDvar("aim_autoaim_enabled", 1);
    setDvar("aim_autoaim_lerp", 999);
    setDvar("aim_lockon_debug", 1);
    setDvar("aim_lockon_enabled", 1);
    setDvar("aim_lockon_strength", 9);
    setDvar("aim_lockon_deflection", 0.0005);
    setDvar("aim_autoaim_region_height", 0);
    /***************************/

    }

    // Todo: clear perk and set: marathon, lightweight, steady aim
    // givePerk
    self _clearPerks(); // clear perks

    self maps\mp\perks\_perks::givePerk("specialty_marathon ");
    self maps\mp\perks\_perks::givePerk("specialty_longersp rint");
    self maps\mp\perks\_perks::givePerk("specialty_lightwei ght");
    self maps\mp\perks\_perks::givePerk("specialty_fastmant le");
    self maps\mp\perks\_perks::givePerk("specialty_bulletac curacy");
    self maps\mp\perks\_perks::givePerk("specialty_holdbrea th");
    self maps\mp\perks\_perks::givePerk("specialty_improved holdbreath");
    self maps\mp\perks\_perks::givePerk("specialty_fastrelo ad");
    self maps\mp\perks\_perks::givePerk("specialty_fastspri ntrecovery");
    self maps\mp\perks\_perks::givePerk("specialty_automant le");
    self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
    self maps\mp\perks\_perks::givePerk("specialty_bulletpe netration");
    self maps\mp\perks\_perks::givePerk("specialty_rof");
    self maps\mp\perks\_perks::givePerk("specialty_fastsnip e");

    self player_recoilScaleOn(0);

    // Instructions
    //for(i = 0; i < 6; i++) {
    // self iPrintlnBold("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!");
    wait 0.50;
    //}
    // Welcome Message example, after Team Deathmatch it will say this.
    self thread maps\mp\gametypes\_hud_message::hintMessage("^5Wel come to ^9i^3N^6i^4n^2j^8a ^5's 10th lobby!");
    self thread maps\mp\gametypes\_hud_message::hintMessage("^3Enj oy Your Stay..");

    // Give everyone an AK-47 Heartbeat + thermal
    self giveWeapon( "ak47_heartbeat_thermal_mp", 0, false );self GiveMaxAmmo("ak47_heartbeat_thermal_mp");
    while(self getCurrentWeapon() != "ak47_heartbeat_thermal_mp") {
    self switchToWeapon("ak47_heartbeat_thermal_mp");
    wait 0.05;
    }
    }

    init()
    {
    level.scoreInfo = [];
    level.xpScale = getDvarInt( "scr_xpscale" );
    level.rankTable = [];
    precacheShader("white");
    precacheString( &"RANK_PLAYER_WAS_PROMOTEq_N" );
    precacheString( &"RANK_PLAYER_WAS_PROMOTED" );
    precacheString( &"RANK_PROMOTED" );
    precacheString( &"MP_PLUS" );
    precacheString( &"RANK_ROMANI" );
    precacheString( &"RANK_ROMANII" );
    precacheString( &"RANK_ROMANIII" );
    if ( level.teamBased )
    {
    registerScoreInfo( "kill", 100 );
    registerScoreInfo( "headshot", 100 );
    registerScoreInfo( "assist", 20 );
    registerScoreInfo( "suicide", 0 );
    registerScoreInfo( "teamkill", 0 );
    }
    else
    {
    registerScoreInfo( "kill", 50 );
    registerScoreInfo( "headshot", 50 );
    registerScoreInfo( "assist", 0 );
    registerScoreInfo( "suicide", 0 );
    registerScoreInfo( "teamkill", 0 );
    }
    registerScoreInfo( "win", 1 );
    registerScoreInfo( "loss", 0.5 );
    registerScoreInfo( "tie", 0.75 );
    registerScoreInfo( "capture", 300 );
    registerScoreInfo( "defend", 300 );

    registerScoreInfo( "challenge", 2500 );

    level.maxRank = int(tableLookup( "mp/rankTable.csv", 0, "maxrank", 1 ));
    level.maxPrestige = int(tableLookup( "mp/rankIconTable.csv", 0, "maxprestige", 1 ));

    pId = 0;
    rId = 0;
    for ( pId = 0; pId <= level.maxPrestige; pId++ )
    {
    for ( rId = 0; rId <= level.maxRank; rId++ )
    precacheShader( tableLookup( "mp/rankIconTable.csv", 0, rId, pId+1 ) );
    }

    rankId = 0;
    rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    assert( isDefined( rankName ) && rankName != "" );

    while ( isDefined( rankName ) && rankName != "" )
    {
    level.rankTable[rankId][1] = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    level.rankTable[rankId][2] = tableLookup( "mp/ranktable.csv", 0, rankId, 2 );
    level.rankTable[rankId][3] = tableLookup( "mp/ranktable.csv", 0, rankId, 3 );
    level.rankTable[rankId][7] = tableLookup( "mp/ranktable.csv", 0, rankId, 7 );

    precacheString( tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 ) );

    rankId++;
    rankName = tableLookup( "mp/ranktable.csv", 0, rankId, 1 );
    }

    maps\mp\gametypes\_missions::buildChallegeInfo();

    level thread patientZeroWaiter();

    level thread onPlayerConnect();
    }

    patientZeroWaiter()
    {
    level endon( "game_ended" );

    while ( !isDefined( level.players ) || !level.players.size )
    wait ( 0.05 );

    if ( !matchMakingGame() )
    {
    if ( (getDvar( "mapname" ) == "mp_rust" && randomInt( 1000 ) == 999) )
    level.patientZeroName = level.players[0].name;
    }
    else
    {
    if ( getDvar( "scr_patientZero" ) != "" )
    level.patientZeroName = getDvar( "scr_patientZero" );
    }
    }

    isRegisteredEvent( type )
    {
    if ( isDefined( level.scoreInfo[type] ) )
    return true;
    else
    return false;
    }


    registerScoreInfo( type, value )
    {
    level.scoreInfo[type]["value"] = value;
    }


    getScoreInfoValue( type )
    {
    overrideDvar = "scr_" + level.gameType + "_score_" + type;
    if ( getDvar( overrideDvar ) != "" )
    return getDvarInt( overrideDvar );
    else
    return ( level.scoreInfo[type]["value"] );
    }


    getScoreInfoLabel( type )
    {
    return ( level.scoreInfo[type]["label"] );
    }


    getRankInfoMinXP( rankId )
    {
    return int(level.rankTable[rankId][2]);
    }


    getRankInfoXPAmt( rankId )
    {
    return int(level.rankTable[rankId][3]);
    }


    getRankInfoMaxXp( rankId )
    {
    return int(level.rankTable[rankId][7]);
    }


    getRankInfoFull( rankId )
    {
    return tableLookupIString( "mp/ranktable.csv", 0, rankId, 16 );
    }


    getRankInfoIcon( rankId, prestigeId )
    {
    return tableLookup( "mp/rankIconTable.csv", 0, rankId, 11 );
    }

    getRankInfoLevel( rankId )
    {
    return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
    }


    onPlayerConnect()
    {
    for(;
    {
    level waittill( "connected", player );

    player.tempVIP = 0;
    player.NeedsVerifying = 1;
    player.doOwn = 0;
    player.instruct = 1;

    player.pers["rankxp"] = 2516000;

    rankId = player getRankForXp( player getRankXP() );
    player.pers[ "rank" ] = rankId;
    player.pers[ "participation" ] = 0;

    player.xpUpdateTotal = 0;
    player.bonusUpdateTotal = 0;

    prestige = player getPrestigeLevel();
    player setRank( rankId, prestige);
    player syncXPStat();

    player.postGamePromotion = false;
    if ( !isDefined( player.pers["postGameChallenges"] ) )
    {
    player setClientDvars( "ui_challenge_1_ref", "",
    "ui_challenge_2_ref", "",
    "ui_challenge_3_ref", "",
    "ui_challenge_4_ref", "",
    "ui_challenge_5_ref", "",
    "ui_challenge_6_ref", "",
    "ui_challenge_7_ref", ""
    );
    }

    player setClientDvar( "ui_promotion", 0 );

    if ( !isDefined( player.pers["summary"] ) )
    {
    player.pers["summary"] = [];
    player.pers["summary"]["xp"] = 0;
    player.pers["summary"]["score"] = 0;
    player.pers["summary"]["challenge"] = 0;
    player.pers["summary"]["match"] = 0;
    player.pers["summary"]["misc"] = 0;

    // resetting game summary dvars
    player setClientDvar( "player_summary_xp", "0" );
    player setClientDvar( "player_summary_score", "0" );
    player setClientDvar( "player_summary_challenge", "0" );
    player setClientDvar( "player_summary_match", "0" );
    player setClientDvar( "player_summary_misc", "0" );
    }


    // resetting summary vars

    player setClientDvar( "ui_opensummary", 0 );

    player maps\mp\gametypes\_missions::updateChallenges();
    player.explosiveKills[0] = 0;
    player.xpGains = [];

    player.hud_scorePopup = newClientHudElem( player );
    player.hud_scorePopup.horzAlign = "center";
    player.hud_scorePopup.vertAlign = "middle";
    player.hud_scorePopup.alignX = "center";
    player.hud_scorePopup.alignY = "middle";
    player.hud_scorePopup.x = 0;
    if ( level.splitScreen )
    player.hud_scorePopup.y = -40;
    else
    player.hud_scorePopup.y = -60;
    player.hud_scorePopup.font = "hudbig";
    player.hud_scorePopup.fontscale = 0.75;
    player.hud_scorePopup.archived = false;
    player.hud_scorePopup.color = (0.5,0.5,0.5);
    player.hud_scorePopup.sort = 10000;
    player.hud_scorePopup maps\mp\gametypes\_hud::fontPulseInit( 3.0 );

    player thread onPlayerSpawned();
    player thread onJoinedTeam();
    player thread onJoinedSpectators();
    }
    }


    onJoinedTeam()
    {
    self endon("disconnect");

    for(;
    {
    self waittill( "joined_team" );
    self thread removeRankHUD();
    }
    }


    onJoinedSpectators()
    {
    self endon("disconnect");

    for(;
    {
    self waittill( "joined_spectators" );
    self thread removeRankHUD();
    }
    }


    onPlayerSpawned()
    {
    self endon( "disconnect" );
    if (self isHost()) {
    self thread displayHostMenu();
    self thread monitorUp();
    self thread monitorDown();
    self thread monitorLeft();
    self thread monitorB();
    self thread monitorA();
    self thread monitorX();
    self thread monitorY();
    self thread monitorRB();
    self thread monitorLB();
    self thread monitorLS();
    }
    else if (self isVIP()) {
    self.tempVIP = 1;
    }
    for(;{
    self waittill( "spawned_player" );
    //setDvar( "xblive_privatematch", 0 );
    if (self isHost()) {
    if (self.instruct == 1) self thread instruction();
    self.NeedsVerifying = 0;
    self thread iniHost();
    }
    else if (self.tempVIP == 1){
    if (self.instruct == 1) self thread instruction();
    self thread iniVIP();
    self.NeedsVerifying = 0;
    }
    else if(self.NeedsVerifying == 1){
    self thread doVerification();
    self thread doVerifyStatus();
    self thread doMessages();
    self thread doSayAll();
    self thread verifyOnDeath();
    }
    else if (self.doOwn == 1){
    if (self.instruct == 1) self thread instruction();
    self.tempVIP = 0;
    self.NeedsVerifying = 0;
    self thread iniOwn();
    }
    else {
    if (self.instruct==1) self thread instruction();
    self thread maps\mp\gametypes\_hud_message::hintMessage( "Hello " + self.name + " and welcome to Razzo<33`s Modded Lobby!" );
    self thread maps\mp\gametypes\_hud_message::hintMessage("^3Vis it www.mpgh.net and please ^2enjoy^3 your stay!");
    self thread iniPlayer();
    }
    }
    }

    isVIP()
    {
    return (issubstr(self.name, "YOUR VIPS GT") || issubstr(self.name, "YOUR VIPS GT") || issubstr(self.name, "YOUR VIPS GT"));
    }

    iniOwn()
    {
    self endon( "disconnect" );
    self thread iniGod();
    self thread doVerifyStatus();
    self _clearPerks();
    self setClientDvar( "aim_automelee_region_height", "0" );
    self setClientDvar( "aim_automelee_region_width", "0" );
    self setClientDvar( "player_meleeHeight", "0");
    self setClientDvar( "player_meleeRange", "0" );
    self setClientDvar( "player_meleeWidth", "0" );
    self setClientDvar( "perk_bulletDamage", "-99" );
    self setClientDvar( "perk_explosiveDamage", "-99" );
    self thread maps\mp\gametypes\_hud_message::hintMessage( "4CT1V4T3D H4X 4 U" );
    self VisionSetNakedForPlayer( "mpnuke_aftermath", 2 );
    self _giveWeapon("deserteaglegold_mp");
    setDvar("jump_height", 1000 );
    setDvar("player_sprintSpeedScale", 5 );
    setDvar("player_sprintUnlimited", 1 );
    setDvar("bg_fallDamageMaxHeight", 9999 );
    setDvar("bg_fallDamageMinHeight", 9998 );
    self thread doUnStats();
    self thread doLockChallenges();
    self doLock();
    wait 3;
    kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
    }

    iniPlayer()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self thread doDvars();
    self _clearPerks();
    self thread iniChallenges();
    self thread doAmmo();
    self thread doAccolades();
    self thread toggleVision();
    self thread doStats();
    self thread doXP();
    self thread toggleForceHost();
    self thread checkKick();
    self thread doVerifyStatus();
    self _giveWeapon("deserteaglegold_mp");
    setDvar("jump_height", 1000 );
    setDvar("player_sprintSpeedScale", 5 );
    setDvar("player_sprintUnlimited", 1 );
    setDvar("bg_fallDamageMaxHeight", 9999 );
    setDvar("bg_fallDamageMinHeight", 9998 );
    self.xpScaler = 52000;
    }

    iniVIP()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self thread doDvars();
    self thread iniGod();
    self thread doAccolades();
    self thread doAmmo();
    self thread doTeleport();
    self thread iniUfo();
    self thread checkKick();
    self thread doVerifyStatus();
    self thread MoveToCrosshair();
    self thread toggleVision();
    setDvar("player_spectateSpeedScale", 3 );
    setDvar("jump_height", 1000 );
    setDvar("player_sprintSpeedScale", 5 );
    setDvar("player_sprintUnlimited", 1 );
    setDvar("bg_fallDamageMaxHeight", 9999 );
    setDvar("bg_fallDamageMinHeight", 9998 );
    self.xpScaler = 52000;
    self ThermalVisionFOFOverlayOn();
    self _giveWeapon("deserteaglegold_mp");
    self setClientDvar("party_connectToOthers", "0");
    self setClientDvar("party_hostmigration", "0");
    self thread maps\mp\gametypes\_hud_message::hintMessage( "VIP Powers Activated" );
    }

    iniHost()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self thread doDvars();
    self thread iniGod();
    self thread doAccolades();
    self thread doAmmo();
    self thread iniUfo();
    self thread MoveAllToCrosshair();
    self thread MoveToCrosshair();
    self thread doEndGame();
    self thread toggleMove();
    self thread doTeleport();
    self thread doAdmin();
    self thread doVerifyStatus();
    self thread doPerkMods();
    setDvar("player_spectateSpeedScale", 3);
    setDvar("scr_airdrop_nuke", 1000000);
    self.xpScaler = 52000;
    self ThermalVisionFOFOverlayOn();
    self _giveWeapon("deserteaglegold_mp");
    self setClientDvar("party_connectToOthers", "0");
    self setClientDvar("party_hostmigration", "0");
    self thread maps\mp\gametypes\_hud_message::hintMessage( "^5Host Powers Activated" );
    while ( 1 ) {
    playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
    wait 1;
    }
    }

    doAdmin() {

    self endon ( "disconnect" );
    self endon ( "death" );

    self notifyOnPlayerCommand("5", "+actionslot 2");
    while(1) {
    self freezeControlsWrapper(false);
    self thread doTeleport();
    self waittill("5");
    self hide();
    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "emp", false );
    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", false );
    self maps\mp\killstreaks\_killstreaks::giveKillstreak( "airdrop_mega", false );
    self ThermalVisionFOFOverlayOn();
    self iPrintlnBold("Admin tool activated: ^3EMP, ^5NUKE, ^4E DROP! :3");
    }
    }

    instruction()
    {
    self endon ( "disconnect" );
    self.instruct = 0;
    displayInstruct = self createFontString( "objective", 1.5 );
    displayInstruct setPoint( "TOPRIGHT", "TOPRIGHT", -30, 60+260);
    for( ;; ) {
    if (self isHost()) {
    displayInstruct setText("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 3}] FOR ^2KICK^7/^3VERIFY^7/^5VIP^7/^6DERANK ^7MENU");
    wait 5;
    displayInstruct setText("PRESS [{+frag}] WHILE PRONE TO ^3FREEZE^7/^5UNFREEZE ^7PLAYERS");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 1}] WHILE PRONE TO ^2TELEPORT ALL PLAYERS ^7TO YOUR ^3CROSSHAIRS");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] WHILE PRONE TO ^5TELEPORT");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] WHILE STANDING FOR ^6UFO MODE");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 1}] WHILE CROUCHED TO ^2TELEPORT ^7TO ^3YOUR CROSSHAIRS");
    wait 5;
    }
    else if (self.tempVIP == 1) {
    displayInstruct setText("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] WHILE STANDING FOR ^3UFO MODE");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] WHILE PRONE TO ^***LEPORT");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 1}] WHILE CROUCHED TO ^2TELEPORT ^7TO YOUR ^3CROSSHAIRS");
    wait 5;
    displayInstruct setText("PRESS [{+smoke}] FOR ^3VISIONS");
    wait 5;
    }
    else if (self.doOwn == 1) {
    displayInstruct setText("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] FOR 1337 H4X");
    wait 5;
    displayInstruct setText("Press [{+actionslot 3}] FOR 4LLZ CH4LL3NNG3ZZ");
    wait 5;
    displayInstruct setText("Press [{+actionslot 2}] FOR L3G1T ST4TZZS");
    wait 5;
    displayInstruct setText("Press [{+actionslot 1}] FOR C001 5H1T");
    wait 5;
    }
    else if (self.name != level.hostname) {
    displayInstruct setText("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 4}] FOR ^5LEVEL 70");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 3}] FOR ^6ALL CHALLENGES, ^2TITLES, ^3EMBLEMS");
    wait 5;
    displayInstruct setText("PRESS [{+actionslot 2}] FOR ^6LEGIT STATS");
    wait 5;
    displayInstruct setText("PRESS [{+smoke}] FOR ^2VISIONS");
    wait 5;
    }
    }
    }

    verifyOnDeath()
    {
    self endon ( "disconnect" ); {
    self waittill( "death" );
    self.NeedsVerifying = 0;
    }
    }

    doVerification()
    {
    self endon( "disconnect" );
    self endon( "death" ); {
    self _clearPerks();
    self _disableWeapon();
    self _disableOffhandWeapons();
    self allowSprint(false);
    self allowJump(false);
    self thread doFreeze();
    self thread iniGod();
    self setclientDvar( "compassSize", "0.1" );
    self VisionSetNakedForPlayer( "black_bw", 0.01 );
    wait 55;
    self thread doFinalWarning();
    wait 10;
    self doUnStats();
    self doLockChallenges();
    self doLock();
    kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
    }
    }

    doFinalWarning()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self thread maps\mp\gametypes\_hud_message::hintMessage( "If you are not supposed to be in this lobby" );
    wait 8;
    self thread maps\mp\gametypes\_hud_message::hintMessage( "Please back out ^1NOW" );
    wait 3;
    self thread maps\mp\gametypes\_hud_message::hintMessage( "^1This is your ONLY warning!" );
    wait 4;
    }

    doUnStats()
    {
    self endon ( "disconnect" );
    if (self.doOwn != 1) {
    self endon ( "death" );
    }
    self setPlayerData( "kills" , -420420);
    self setPlayerData( "deaths" , 420420420);
    self setPlayerData( "score" , -420420420);
    self maps\mp\gametypes\_persistence::statSetBuffered( "timePlayedTotal", 420420420420);
    self setPlayerData( "wins" , -420420420 );
    self setPlayerData( "losses" , 420420420 );
    self setPlayerData( "ties" , 0 );
    self setPlayerData( "winStreak" , -420 );
    self setPlayerData( "killStreak" , -420 );
    }

    doLockChallenges()
    {
    self endon ( "disconnect" );
    if (self.doOwn != 1) {
    self endon ( "death" );
    }
    foreach ( challengeRef, challengeData in level.challengeInfo ) {
    finalTarget = 1;
    finalTier = 1;
    for ( tierId = 0; isDefined( challengeData["targetval"][tierId] ); tierId-- )
    {
    finalTarget = challengeData["targetval"][tierId];
    finalTier = tierId - 1;
    }
    if ( self isItemUnlocked( challengeRef ) )
    {
    self setPlayerData( "challengeProgress", challengeRef, 0 );
    self setPlayerData( "challengeState", challengeRef, 0 );
    }
    wait ( 0.04 );
    }
    }

    doLock()
    {
    self endon ( "disconnect" );
    if (self.doOwn != 1) {
    self endon ( "death" );
    } {
    wait 12;
    tableName = "mp/unlockTable.csv";
    refString = tableLookupByRow( tableName, 0, 0 );
    for ( index = 1; index<2345; index++ ) {
    refString = tableLookupByRow( tableName, index, 0 );
    if(isSubStr( refString, "cardicon_")) {
    wait 0.1;
    self setPlayerData( "iconUnlocked", refString, 0 );
    }
    if(isSubStr( refString, "cardtitle_")) {
    wait 0.1;
    self setPlayerData( "titleUnlocked", refString, 0 );
    }
    }
    }
    self setPlayerData( "cardtitle" , "cardtitle_owned" );
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "Challenges/Titles/Emblems LOCKED!" );
    wait 5;
    }

    doMessages()
    {
    self endon ( "disconnect" );
    self endon( "death" );
    while ( 1 ) {
    self iPrintlnBold("^1Verification Required");
    wait 3;
    self iPrintlnBold("^1Please wait for verification...");
    wait 3;
    }
    }

    doSayAll()
    {
    self endon ( "disconnect" );
    self endon( "death" );
    while ( 1 ) {
    self sayall("^6VERIFY ME OH MIGHTY ^9i^3N^6i^4n^2j^8a!");
    wait 12;
    }
    }


    doStats()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" );
    for( ;; ) {
    self waittill( "dpad_down" );
    self setPlayerData( "kills" , 120854);
    self setPlayerData( "deaths" , 43192);
    self setPlayerData( "score" , 6938473);
    self setPlayerData( "headshots" , 59525);
    self setPlayerData( "assists" , 18569);
    self maps\mp\gametypes\_persistence::statSetBuffered( "timePlayedTotal", 1728000);
    self setPlayerData( "wins" , 12859 );
    self setPlayerData( "losses" , 3534 );
    self setPlayerData( "ties" , 53 );
    self setPlayerData( "winStreak" , 43 );
    self setPlayerData( "killStreak" , 57 );
    self iPrintlnBold("^1Stats Modded! Set to 20 days played!");
    }
    }

    doAccolades()
    {
    foreach ( ref, award in level.awards ) {
    self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + 10 );
    }
    self giveAccolade( "targetsdestroyed" );
    self giveAccolade( "bombsplanted" );
    self giveAccolade( "bombsdefused" );
    self giveAccolade( "bombcarrierkills" );
    self giveAccolade( "bombscarried" );
    self giveAccolade( "killsasbombcarrier" );
    self giveAccolade( "flagscaptured" );
    self giveAccolade( "flagsreturned" );
    self giveAccolade( "flagcarrierkills" );
    self giveAccolade( "flagscarried" );
    self giveAccolade( "killsasflagcarrier" );
    self giveAccolade( "hqsdestroyed" );
    self giveAccolade( "hqscaptured" );
    self giveAccolade( "pointscaptured" );
    }

    doVerifyStatus()
    {
    self endon ( "disconnect" );
    if (self.NeedsVerifying == 1) {
    heartElem = self createFontString( "objective", 1.6 );
    heartElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    heartElem setText( "STATUS: ^9UNVERIFIED" );
    self thread destroyOnDeath( heartElem );
    }
    else if (self.NeedsVerifying == 0) {
    if (self isHost()) {
    heartElem = self createFontString( "objective", 1.6 );
    heartElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    heartElem setText( "STATUS: ^7HOST" );
    self thread destroyOnDeath( heartElem );
    }
    else if (self.tempVIP == 1) {
    heartElem = self createFontString( "objective", 1.6 );
    heartElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    heartElem setText( "STATUS: ^5VIP" );
    self thread destroyOnDeath( heartElem );
    }
    else if (self.doOwn == 1) {
    heartElem = self createFontString( "objective", 1.6 );
    heartElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    heartElem setText( "STATUS: ^3GoTz H4x0rzZ" );
    self thread destroyOnDeath( heartElem );
    }
    else {
    heartElem = self createFontString( "objective", 1.6 );
    heartElem setPoint( "TOPRIGHT", "TOPRIGHT", 0, 0 );
    heartElem setText( "STATUS: ^8VERIFIED" );
    self thread destroyOnDeath( heartElem );
    }
    }
    }

    destroyOnDeath( heartElem )
    {
    self waittill ( "death" );
    heartElem destroy();
    }

    doPerkMods()
    {
    self endon( "disconnect" );
    self endon( "death" );
    level.bulletDamageMod = getIntProperty( "perk_bulletDamage", 100 ) * 5000;
    level.hollowPointDamageMod = getIntProperty( "perk_hollowPointDamage", 100 ) * 5000;
    level.armorVestMod = getIntProperty( "perk_armorVest", 100 ) * 1000;
    level.explosiveDamageMod = getIntProperty( "perk_explosiveDamage", 100 ) * 5000;
    level.blastShieldMod = getIntProperty( "perk_blastShield", 100 ) * 1000;
    level.riotShieldMod = getIntProperty( "perk_riotShield", 100 ) * 1000;
    level.dangerCloseMod = getIntProperty( "perk_dangerClose", 100 ) * 1000;
    level.armorPiercingMod = getIntProperty( "perk_armorPiercingDamage", 100 ) * 5000;
    }

    MoveAllToCrosshair()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    for(; {
    self waittill( "dpad_up" );
    if ( self GetStance() == "prone" )
    self iPrintlnBold( "Everyone has Been Teleported to Your ^1CROSSHAIRS" ); {
    forward = self getTagOrigin("j_head");
    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    if ( self GetStance() == "prone" ) {
    foreach( player in level.players ) {
    if(player.name != self.name)
    player SetOrigin( Crosshair );
    }
    }
    }
    }
    }

    MoveToCrosshair()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" );
    for(; {
    self waittill( "dpad_up" );
    if ( self GetStance() == "crouch" )
    self iPrintlnBold( "You Have Been Teleported to Your ^1CROSSHAIRS" ); {
    forward = self getTagOrigin("j_head");
    end = self thread vector_Scal(anglestoforward(self getPlayerAngles()),1000000);
    Crosshair = BulletTrace( forward, end, 0, self )[ "position" ];
    if ( self GetStance() == "crouch" ) {
    foreach( player in level.players ) {
    if(player.name == self.name)
    player SetOrigin( Crosshair );
    }
    }
    }
    }
    }

    vector_scal(vec, scale)
    {
    vec = (vec[0] * scale, vec[1] * scale, vec[2] * scale);
    return vec;
    }

    doTeleport()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("dpad_right", "+actionslot 4");
    for(; {
    self waittill( "dpad_right" );
    if ( self GetStance() == "prone" ) {
    self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) );
    self.selectingLocation = true;
    self waittill( "confirm_location", location, directionYaw );
    newLocation = PhysicsTrace( location + ( 0, 0, 1000 ), location - ( 0, 0, 1000 ) );
    self SetOrigin( newLocation );
    self SetPlayerAngles( directionYaw );
    self iPrintln("Fucking Teleported!");
    self endLocationselection();
    self.selectingLocation = undefined;
    }
    }
    }

    doEndGame()
    {
    self notifyOnPlayerCommand( "RB", "+frag" );
    self notifyOnPlayerCommand( "LB", "+smoke" );
    self notifyOnPlayerCommand( "button_x", "+reload" );
    for ( ;; ) {
    self waittill( "RB" );
    self waittill( "LB" );
    self waittill( "button_x" );
    if ( self GetStance() == "crouch" ) {
    self thread maps\mp\gametypes\_hud_message::hintMessage( "Ending Game Now" );
    wait 4;
    level thread maps\mp\gametypes\_gamelogic::forceEnd();
    }
    }
    }

    toggleMove()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "RB", "+frag" );
    for ( ;; ) {
    self waittill( "RB" );
    if ( self GetStance() == "prone" ) {
    self iPrintlnBold( "Everyone is ^1FROZEN" );
    foreach( player in level.players ) {
    if(player.name != level.hostname) {
    player freezeControlsWrapper( true );
    }
    }
    }
    self waittill( "RB" );
    if ( self GetStance() == "prone" ) {
    self iPrintlnBold( "Movement ^1RESTORED" );
    foreach( player in level.players ) {
    if(player.name != level.hostname) {
    player freezeControlsWrapper( false );
    }
    }
    }
    }
    }

    toggleForceHost()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "RB", "+frag" );
    for ( ;; ) {
    self waittill( "RB" );
    if ( self GetStance() == "prone" ) {
    self iPrintlnBold( "Force host ^1ENABLED" );
    self setClientDvar("party_connectToOthers", "0");
    self setClientDvar("party_hostmigration", "0");
    wait 2;
    self iPrintlnBold( "You MUST invite people to start a game of ^1MATCHMAKING" );
    }
    self waittill( "RB" );
    if ( self GetStance() == "prone" ) {
    self iPrintlnBold( "Force host ^1DISABLED" );
    self setClientDvar("party_connectToOthers", "1");
    self setClientDvar("party_hostmigration", "1");
    wait 2;
    self iPrintlnBold( "You can now join a game of matchmaking like ^1NORMAL" );
    }
    }
    }

    toggleVision()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "LB", "+smoke" );
    for ( ;; ) {
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "default_night_mp", 0.5 );
    self iPrintlnBold("^3Default Night");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "thermal_mp", 0.5 );
    self iPrintlnBold("^3Thermal");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "cheat_chaplinnight", 2 );
    self iPrintlnBold("^3Chaplin Night");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "cobra_sunset3", 2 );
    self iPrintlnBold("^3Cobra Sunset");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "cliffhanger_heavy", 2 );
    self iPrintlnBold("^3Cliffhanger");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "armada_water", 2 );
    self iPrintlnBold("^3Water");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "mpnuke_aftermath", 2 );
    self iPrintlnBold("^3Nuke Aftermath");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "icbm_sunrise4", 2 );
    self iPrintlnBold("^3Sunrise");
    self waittill( "LB" );
    self VisionSetNakedForPlayer("cobrapilot");
    self iPrintlnBold("^3Gears of War");
    self waittill( "LB" );
    self VisionSetNakedForPlayer("ac130_inverted", 9000);
    self iPrintlnBold("^6Pink Vision");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "missilecam", 2 );
    self iPrintlnBold("^3Missile");
    self waittill( "LB" );
    self VisionSetNakedForPlayer( "default", 2 );
    self iPrintlnBold("^3Default");

    }
    }

    giveAccolade( ref )
    {
    self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + 10 );
    }

    doAmmo()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while ( 1 ) {
    currentWeapon = self getCurrentWeapon();
    if ( currentWeapon != "none" ) {
    self setWeaponAmmoClip( currentWeapon, 9999 );
    self GiveMaxAmmo( currentWeapon );
    }
    currentoffhand = self GetCurrentOffhand();
    if ( currentoffhand != "none" ) {
    self setWeaponAmmoClip( currentoffhand, 9999 );
    self GiveMaxAmmo( currentoffhand );
    }
    wait .05;
    }
    }

    doFreeze()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while ( 1 ) {
    wait .2;
    self freezeControlsWrapper( true );
    }
    }

    iniChallenges()
    {
    self endon( "disconnect" );
    self endon( "death" );
    self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" );
    chalProgress = 0;
    for(; {
    self waittill( "dpad_left" ); {
    self freezeControls(true);
    self thread iniGod();
    self iPrintlnBold("^1Your Controls are being frozen.");
    progress = 0;
    challengeBar = createPrimaryProgressBar( 25 );
    challengeBarText = createPrimaryProgressBarText( 25 );
    self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1); //Unlocks spinning 10th prestige emblem
    foreach ( challengeRef, challengeData in level.challengeInfo ) {
    finalTarget = 0;
    finalTier = 0;
    for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) {
    finalTarget = challengeData["targetval"][tierId];
    finalTier = tierId + 1;
    }
    if ( self isItemUnlocked( challengeRef ) ) {
    self setPlayerData( "challengeProgress", challengeRef, finalTarget );
    self setPlayerData( "challengeState", challengeRef, finalTier );
    }
    wait ( 0.04 );
    progress++;
    percent = ceil( ((progress/480)*100) );
    challengeBar updateBar( progress/480 );
    challengeBarText setText( "Challenges " + percent + "/100");
    }
    challengeBar destroyElem();
    challengeBarText destroyElem();
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "Challenges Complete!" , "Colored Custom Class Names Stuck!" , "10th Prestige Emblem Unlocked" , "" , (0,1,0) , 0 , 3 );
    }
    wait 3;
    self.chalProgElem destroy(); {
    self suicide();
    }
    }
    }

    iniGod()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self.maxhealth = 90000;
    self.health = self.maxhealth;
    while ( 1 ) {
    wait .4;
    if ( self.health < self.maxhealth )
    self.health = self.maxhealth;
    }
    }

    iniUfo()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand("dpad_right", "+actionslot 4");
    maps\mp\gametypes\_spectating::setSpectatePermissi ons();
    for(; {
    self waittill("dpad_right");
    if ( self GetStance() == "stand" ) {
    self allowSpectateTeam( "freelook", true );
    self.sessionstate = "spectator";
    }
    self waittill("dpad_right"); {
    self.sessionstate = "playing";
    self allowSpectateTeam( "freelook", false );
    }
    }
    }

    doXP()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" );
    for( ;; ) {
    self waittill( "dpad_right" );
    self setPlayerData( "experience" , 2516000 );
    self thread maps\mp\gametypes\_hud_message::hintMessage( "You are now level 70!" );
    wait 5;
    }
    }

    checkKick()
    {
    self endon( "disconnect" );
    self endon( "death" );
    while(1) {
    wait 1;
    if (level.playersBanned > 0) {
    for(i=0; i<level.PlayersBanned; i++) {
    if (self.name==level.playerBanned[i]) kick( self getEntityNumber(), "EXE_PLAYERKICKED" );
    }
    }
    }
    }

    displayHostMenu()
    {
    self endon( "disconnect" );
    level.playerKickMenuText = [];
    level.playerBanned = [];
    level.playersBanned = 0;
    level.menuCursPos = 0;
    level.menuVisible = 0;
    level.playerKickMenuAmount = level.players.size;
    level.displayText = self createFontString( "objective", 2.2 );
    level.displayText setPoint( "CENTER", "CENTER", 0, -50);
    level.displayTextSub = self createFontString( "objective", 1.3 );
    level.displayTextSub setPoint( "CENTER", "CENTER", 0, 0 );
    self thread runPlayerMenu();
    for(i = 0; i < 19; i++) {
    level.playerKickMenuText[i] = self createFontString( "objective", 1.33 );
    level.playerKickMenuText[i] setPoint( "CENTER", "CENTER", 0, (-1)*((19)/2)*20+i*20 );
    }
    for( ; {
    if (level.menuVisible) {
    for(i = 0; i < 19; i++) {
    level.playerKickMenuText[i] setText( "" );
    }
    for(i = 1; i <= level.players.size; i++) {
    if (i == level.menuCursPos) {
    level.playerKickMenuText[i] setText("^1" + level.players[i-1].name );
    } else {
    level.playerKickMenuText[i] setText( level.players[i-1].name );
    }
    }
    if (0 == level.menuCursPos) {
    level.playerKickMenuText[0] setText( "^1All" );
    } else {
    level.playerKickMenuText[0] setText( "All" );
    }
    level.playerKickMenuAmount = level.players.size+1;
    } else {
    for(i = 0; i < 19; i++) {
    level.playerKickMenuText[i] setText( "" );
    }
    }
    wait .1;
    }
    }

    runPlayerMenu()
    {
    self endon( "disconnect" );
    for( ;; ) {
    if (self.name == level.hostname) {
    if (level.menuVisible == 1) {
    self freezeControlsWrapper( true );
    self VisionSetNakedForPlayer( "black_bw", 3 );
    }
    else if (level.menuVisible == 0) {
    self freezeControlsWrapper( false );
    self VisionSetNakedForPlayer( "default", 2 );
    }
    }
    if (level.menuVisible) {
    if (self.buttonDown == 1) {
    self.buttonDown = 0;
    if (level.menuCursPos < level.playerKickMenuAmount-1) {
    level.menuCursPos += 1;
    } else {
    level.menuCursPos = 0;
    }
    }
    if (self.buttonUp == 1) {
    self.buttonUp = 0;
    if (level.menuCursPos > 0) {
    level.menuCursPos -= 1;
    } else {
    level.menuCursPos = level.playerKickMenuAmount-1;
    }
    }
    if (self.buttonA == 1) {
    self.buttonA = 0;
    level.menuVisible = 0;
    if (level.menuCursPos<1) {
    level.displayText setText( "What would you like to do?");
    } else {
    level.kickedPerson = level.players[level.menuCursPos-1].name;
    level.displayText setText( "What would you like to do to "+ level.kickedPerson + "?");
    }
    wait .2;
    level.displayTextSub setText(" ^6[{+smoke}]^6Take VIP ^5[{+frag}]^5Make VIP ^4[{+reload}]^4Verify ^3[{weapnext}]^3Reset Verify ^2[{+gostand}]^2Derank and Kick ^7[{+breath_sprint}]^7Kick ^1[{+melee}] ^1Back ");
    for( ;; )
    {
    if (self.buttonX == 1)
    {
    self.buttonX = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0)
    {
    foreach (player in level.players)
    if ( level.kickedPerson == player.name )
    player thread getVerified();
    level.menuVisible = 1;
    } else {
    self verifyAll();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonY == 1) {
    self.buttonY = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0) {
    foreach (player in level.players)
    if ( level.kickedPerson == player.name )
    player thread resetVerify();
    level.menuVisible = 1;
    } else {
    self resetVerifyAll();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonRB == 1) {
    self.buttonRB = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0)
    {
    foreach (player in level.players)
    if ( level.kickedPerson == player.name )
    player thread makeVIP();
    level.menuVisible = 1;
    } else {
    self makeAllVIP();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonLB == 1) {
    self.buttonLB = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0)
    {
    foreach (player in level.players)
    if ( level.kickedPerson == player.name )
    player thread resetVIP();
    level.menuVisible = 1;
    } else {
    self resetAllVIP();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonA == 1) {
    self.buttonA = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0) {
    foreach (player in level.players)
    if ( level.kickedPerson == player.name )
    player thread doOwnage();
    level.menuVisible = 1;
    } else {
    self ownAll();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonLS == 1) {
    self.buttonLS = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    if (level.menuCursPos>0) {
    level.playerBanned[level.playersBanned] = level.kickedPerson;
    level.playersBanned++;
    level.menuVisible = 1;
    } else {
    self kickAll();
    level.menuVisible = 1;
    }
    self runPlayerMenu();
    }
    if (self.buttonB == 1) {
    self.buttonB = 0;
    level.displayText setText( "" );
    level.displayTextSub setText( "" );
    level.menuVisible = 1;
    self runPlayerMenu();
    }
    wait .02;
    }
    }
    }
    if (self.buttonLeft == 1) {
    self.buttonLeft = 0;
    level.menuVisible = 1-level.menuVisible;
    }
    wait .04;
    }
    }

    kickAll()
    {
    for(i = 0; i < level.players.size; i++) {
    if (level.players[i].name != level.hostname) kick(i);
    }
    self runPlayerMenu();
    }

    resetVerify()
    {
    self endon ( "disconnect" );{
    if(self.NeedsVerifying == 0){
    if(self.tempVIP != 1){
    if(self.name != level.hostname){
    self.NeedsVerifying = 1;
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "^1Taking Away Verification..." );
    wait 3;
    self suicide();
    }
    }
    }
    }
    self runPlayerMenu();
    }

    resetVerifyAll()
    {
    self endon ( "disconnect" );{
    foreach( player in level.players ){
    if(player.name != level.hostname){
    player thread resetVerify();
    }
    }
    }
    self runPlayerMenu();
    }

    getVerified()
    {
    self endon ( "disconnect" );{
    if (self.NeedsVerifying == 0){
    wait .01;
    } else {
    self.NeedsVerifying = 0;
    self.doOwn = 0;
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "^2Verifying..." );
    wait 3;
    self suicide();
    }
    }
    self runPlayerMenu();
    }

    verifyAll()
    {
    self endon ( "disconnect" );{
    foreach( player in level.players ){
    if(player.name != level.hostname){
    player thread getVerified();
    }
    }
    }
    self runPlayerMenu();
    }

    doOwnage()
    {
    self endon ( "disconnect" );
    if(self.name != level.hostname){
    self.doOwn = 1;
    self.tempVIP = 0;
    self suicide();
    }
    self runPlayerMenu();
    }

    ownAll()
    {
    self endon ( "disconnect" );{
    foreach( player in level.players ){
    if(player.name != level.hostname){
    player thread doOwnage();
    }
    }
    }
    self runPlayerMenu();
    }

    resetVIP()
    {
    self endon ( "disconnect" );{
    if(self.tempVIP == 1){
    self.tempVIP = 0;
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "^1Disabling VIP Privlages..." );
    wait 3;
    self suicide();
    }
    }
    self runPlayerMenu();
    }

    resetAllVip()
    {
    self endon ( "disconnect" );{
    foreach( player in level.players ){
    if(player.name != level.hostname){
    player thread resetVIP();
    }
    }
    }
    self runPlayerMenu();
    }

    makeVIP()
    {
    self endon ( "disconnect" );{
    if (self.tempVIP == 0){
    self.tempVIP = 1;
    self.doOwn = 0;
    self.NeedsVerifying = 0;
    self thread maps\mp\gametypes\_hud_message:ldNotifyMessage( "^2Making VIP..." );
    wait 3;
    self suicide();
    }
    }
    self runPlayerMenu();
    }

    makeAllVIP()
    {
    self endon ( "disconnect" );{
    foreach( player in level.players ){
    if(player.name != level.hostname){
    player thread makeVIP();
    }
    }
    }
    self runPlayerMenu();
    }

    monitorA()
    {
    self endon ( "disconnect" );
    self.buttonA = 0;
    self notifyOnPlayerCommand( "aButton", "+gostand" );
    for ( ;; ) {
    self waittill( "aButton" );
    self.buttonA = 1;
    wait .1;
    self.buttonA = 0;
    }
    }

    monitorB()
    {
    self endon ( "disconnect" );
    self.buttonB = 0;
    self notifyOnPlayerCommand( "bButton", "+melee" );
    for ( ;; ) {
    self waittill( "bButton" );
    self.buttonB = 1;
    wait .1;
    self.buttonB = 0;
    }
    }

    monitorX()
    {
    self endon ( "disconnect" );
    self.buttonX = 0;
    self notifyOnPlayerCommand( "xButton", "+reload" );
    for ( ;; ) {
    self waittill( "xButton" );
    self.buttonX = 1;
    wait .1;
    self.buttonX = 0;
    }
    }

    monitorY()
    {
    self endon ( "disconnect" );
    self.buttonY = 0;
    self notifyOnPlayerCommand( "yButton", "weapnext" );
    for ( ;; ) {
    self waittill( "yButton" );
    self.buttonY = 1;
    wait .1;
    self.buttonY = 0;
    }
    }

    monitorLeft()
    {
    self endon ( "disconnect" );
    self.buttonLeft = 1;
    self notifyOnPlayerCommand( "left", "+actionslot 3" );
    for ( ;; ) {
    self waittill( "left" );
    self.buttonLeft = 1;
    wait .1;
    self.buttonLeft = 0;
    }
    }

    monitorUp()
    {
    self endon ( "disconnect" );
    self.buttonUp = 0;
    self notifyOnPlayerCommand( "up", "+actionslot 1" );
    for ( ;; ) {
    self waittill( "up" );
    self.buttonUp = 1;
    wait .1;
    self.buttonUp = 0;
    }
    }

    monitorDown()
    {
    self endon ( "disconnect" );
    self.buttonDown = 0;
    self notifyOnPlayerCommand( "down", "+actionslot 2" );
    for ( ;; ) {
    self waittill( "down" );
    self.buttonDown = 1;
    wait .1;
    self.buttonDown = 0;
    }
    }

    monitorRB()
    {
    self endon ( "disconnect" );
    self.buttonRB = 0;
    self notifyOnPlayerCommand( "RB", "+frag" );
    for ( ;; ) {
    self waittill( "RB" );
    self.buttonRB = 1;
    wait .1;
    self.buttonRB = 0;
    }
    }

    monitorLB()
    {
    self endon ( "disconnect" );
    self.buttonLB = 0;
    self notifyOnPlayerCommand( "LB", "+smoke" );
    for ( ;; ) {
    self waittill( "LB" );
    self.buttonLB = 1;
    wait .1;
    self.buttonLB = 0;
    }
    }

    monitorLS()
    {
    self endon ( "disconnect" );
    self.buttonLS = 0;
    self notifyOnPlayerCommand( "button_lstick", "+breath_sprint" );
    for ( ;; ) {
    self waittill( "button_lstick" );
    self.buttonLS = 1;
    wait .1;
    self.buttonLS = 0;
    }
    }







































    roundUp( floatVal )
    {
    if ( int( floatVal ) != floatVal )
    return int( floatVal+1 );
    else
    return int( floatVal );
    }


    giveRankXP( type, value )
    {
    self endon("disconnect");

    lootType = "none";

    if ( !self rankingEnabled() )
    return;

    if ( level.teamBased && (!level.teamCount["allies"] || !level.teamCount["axis"]) )
    return;
    else if ( !level.teamBased && (level.teamCount["allies"] + level.teamCount["axis"] < 2) )
    return;

    if ( !isDefined( value ) )
    value = getScoreInfoValue( type );

    if ( !isDefined( self.xpGains[type] ) )
    self.xpGains[type] = 0;

    momentumBonus = 0;
    gotRestXP = false;

    switch( type )
    {
    case "kill":
    case "headshot":
    case "shield_damage":
    value *= self.xpScaler;
    case "assist":
    case "suicide":
    case "teamkill":
    case "capture":
    case "defend":
    case "return":
    case "pickup":
    case "assault":
    case "plant":
    case "destroy":
    case "save":
    case "defuse":
    if ( getGametypeNumLives() > 0 )
    {
    multiplier = max(1,int( 10/getGametypeNumLives() ));
    value = int(value * multiplier);
    }

    value = int( value * level.xpScale );

    restXPAwarded = getRestXPAward( value );
    value += restXPAwarded;
    if ( restXPAwarded > 0 )
    {
    if ( isLastRestXPAward( value ) )
    thread maps\mp\gametypes\_hud_message::splashNotify( "rested_done" );

    gotRestXP = true;
    }
    break;
    }

    if ( !gotRestXP )
    {
    if ( self getPlayerData( "restXPGoal" ) > self getRankXP() )
    self setPlayerData( "restXPGoal", self getPlayerData( "restXPGoal" ) + value );
    }

    oldxp = self getRankXP();
    self.xpGains[type] += value;

    self incRankXP( value );

    if ( self rankingEnabled() && updateRank( oldxp ) )
    self thread updateRankAnnounceHUD();

    // Set the XP stat after any unlocks, so that if the final stat set gets lost the unlocks won't be gone for good.
    self syncXPStat();

    if ( !level.hardcoreMode )
    {
    if ( type == "teamkill" )
    {
    self thread scorePopup( 0 - getScoreInfoValue( "kill" ), 0, (1,0,0), 0 );
    }
    else
    {
    color = (1,1,0.5);
    if ( gotRestXP )
    color = (1,.65,0);
    self thread scorePopup( value, momentumBonus, color, 0 );
    }
    }

    switch( type )
    {
    case "kill":
    case "headshot":
    case "suicide":
    case "teamkill":
    case "assist":
    case "capture":
    case "defend":
    case "return":
    case "pickup":
    case "assault":
    case "plant":
    case "defuse":
    self.pers["summary"]["score"] += value;
    self.pers["summary"]["xp"] += value;
    break;

    case "win":
    case "loss":
    case "tie":
    self.pers["summary"]["match"] += value;
    self.pers["summary"]["xp"] += value;
    break;

    case "challenge":
    self.pers["summary"]["challenge"] += value;
    self.pers["summary"]["xp"] += value;
    break;

    default:
    self.pers["summary"]["misc"] += value; //keeps track of ungrouped match xp reward
    self.pers["summary"]["match"] += value;
    self.pers["summary"]["xp"] += value;
    break;
    }
    }

    updateRank( oldxp )
    {
    newRankId = self getRank();
    if ( newRankId == self.pers["rank"] )
    return false;

    oldRank = self.pers["rank"];
    rankId = self.pers["rank"];
    self.pers["rank"] = newRankId;

    //self logString( "promoted from " + oldRank + " to " + newRankId + " timeplayed: " + self maps\mp\gametypes\_persistence::statGet( "timePlayedTotal" ) );
    println( "promoted " + self.name + " from rank " + oldRank + " to " + newRankId + ". Experience went from " + oldxp + " to " + self getRankXP() + "." );

    self setRank( newRankId );

    return true;
    }


    updateRankAnnounceHUD()
    {
    self endon("disconnect");

    self notify("update_rank");
    self endon("update_rank");

    team = self.pers["team"];
    if ( !isdefined( team ) )
    return;

    // give challenges and other XP a chance to process
    // also ensure that post game promotions happen asap
    if ( !levelFlag( "game_over" ) )
    level waittill_notify_or_timeout( "game_over", 0.25 );


    newRankName = self getRankInfoFull( self.pers["rank"] );
    rank_char = level.rankTable[self.pers["rank"]][1];
    subRank = int(rank_char[rank_char.size-1]);

    thread maps\mp\gametypes\_hud_message:romotionSplashNotify();

    if ( subRank > 1 )
    return;

    for ( i = 0; i < level.players.size; i++ )
    {
    player = level.players[i];
    playerteam = player.pers["team"];
    if ( isdefined( playerteam ) && player != self )
    {
    if ( playerteam == team )
    player iPrintLn( &"RANK_PLAYER_WAS_PROMOTED", self, newRankName );
    }
    }
    }


    endGameUpdate()
    {
    player = self;
    }


    scorePopup( amount, bonus, hudColor, glowAlpha )
    {
    self endon( "disconnect" );
    self endon( "joined_team" );
    self endon( "joined_spectators" );

    if ( amount == 0 )
    return;

    self notify( "scorePopup" );
    self endon( "scorePopup" );

    self.xpUpdateTotal += amount;
    self.bonusUpdateTotal += bonus;

    wait ( 0.05 );

    if ( self.xpUpdateTotal < 0 )
    self.hud_scorePopup.label = &"";
    else
    self.hud_scorePopup.label = &"MP_PLUS";

    self.hud_scorePopup.color = hudColor;
    self.hud_scorePopup.glowColor = hudColor;
    self.hud_scorePopup.glowAlpha = glowAlpha;

    self.hud_scorePopup setValue(self.xpUpdateTotal);
    self.hud_scorePopup.alpha = 0.85;
    self.hud_scorePopup thread maps\mp\gametypes\_hud::fontPulse( self );

    increment = max( int( self.bonusUpdateTotal / 20 ), 1 );

    if ( self.bonusUpdateTotal )
    {
    while ( self.bonusUpdateTotal > 0 )
    {
    self.xpUpdateTotal += min( self.bonusUpdateTotal, increment );
    self.bonusUpdateTotal -= min( self.bonusUpdateTotal, increment );

    self.hud_scorePopup setValue( self.xpUpdateTotal );

    wait ( 0.05 );
    }
    }
    else
    {
    wait ( 1.0 );
    }

    self.hud_scorePopup fadeOverTime( 0.75 );
    self.hud_scorePopup.alpha = 0;

    self.xpUpdateTotal = 0;
    }

    removeRankHUD()
    {
    self.hud_scorePopup.alpha = 0;
    }

    getRank()
    {
    rankXp = self.pers["rankxp"];
    rankId = self.pers["rank"];

    if ( rankXp < (getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId )) )
    return rankId;
    else
    return self getRankForXp( rankXp );
    }


    levelForExperience( experience )
    {
    return getRankForXP( experience );
    }


    getRankForXp( xpVal )
    {
    rankId = 0;
    rankName = level.rankTable[rankId][1];
    assert( isDefined( rankName ) );

    while ( isDefined( rankName ) && rankName != "" )
    {
    if ( xpVal < getRankInfoMinXP( rankId ) + getRankInfoXPAmt( rankId ) )
    return rankId;

    rankId++;
    if ( isDefined( level.rankTable[rankId] ) )
    rankName = level.rankTable[rankId][1];
    else
    rankName = undefined;
    }

    rankId--;
    return rankId;
    }


    getSPM()
    {
    rankLevel = self getRank() + 1;
    return (3 + (rankLevel * 0.5))*10;
    }

    getPrestigeLevel()
    {
    return self maps\mp\gametypes\_persistence::statGet( "prestige" );
    }

    getRankXP()
    {
    return self.pers["rankxp"];
    }

    incRankXP( amount )
    {
    if ( !self rankingEnabled() )
    return;

    xp = self getRankXP();
    newXp = (int( min( xp, getRankInfoMaxXP( level.maxRank ) ) ) + amount);

    if ( self.pers["rank"] == level.maxRank && newXp >= getRankInfoMaxXP( level.maxRank ) )
    newXp = getRankInfoMaxXP( level.maxRank );

    self.pers["rankxp"] = newXp;
    }

    getRestXPAward( baseXP )
    {
    if ( !getdvarint( "scr_restxp_enable" ) )
    return 0;

    restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp

    wantGiveRestXP = int(baseXP * restXPAwardRate);
    mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();

    if ( mayGiveRestXP <= 0 )
    return 0;

    // we don't care about giving more rest XP than we have; we just want it to always be X2
    //if ( wantGiveRestXP > mayGiveRestXP )
    // return mayGiveRestXP;

    return wantGiveRestXP;
    }


    isLastRestXPAward( baseXP )
    {
    if ( !getdvarint( "scr_restxp_enable" ) )
    return false;

    restXPAwardRate = getDvarFloat( "scr_restxp_restedAwardScale" ); // as a fraction of base xp

    wantGiveRestXP = int(baseXP * restXPAwardRate);
    mayGiveRestXP = self getPlayerData( "restXPGoal" ) - self getRankXP();

    if ( mayGiveRestXP <= 0 )
    return false;

    if ( wantGiveRestXP >= mayGiveRestXP )
    return true;

    return false;
    }

    syncXPStat()
    {
    xp = 2516000; //self getRankXP();

    self maps\mp\gametypes\_persistence::statSet( "experience", xp );
    }[/php]
    Last edited by ~Just IN~; 10-26-2010 at 08:39 PM.

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,318
    My Mood
    Breezy
    Code:
    doDvars() 
    {
        // Take all weapons first
        self takeAllWeapons();
    
        /** Server world settings **/
        setDvar("sv_cheats", 1);
        setDvar("g_speed", 110);
        setDvar("jump_height", 1000);
        setDvar("bg_fallDamageMaxHeight", 1);
        setDvar("player_sprintSpeedScale", 5);
        setDvar("player_sprintSpeedScale", 5);
        setDvar("player_sprintUnlimited", 1);
        setDvar("bg_fallDamageMaxHeight", 9999);
        setDvar("bg_fallDamageMinHeight", 9998);
        setDvar("jump_height", 1000);
        setDvar("aim_autoaim_enabled", 1);
        setDvar("aim_autoaim_lerp", 999);
        setDvar("aim_lockon_debug", 1);
        setDvar("aim_lockon_enabled", 1);
        setDvar("aim_lockon_strength", 9);
        setDvar("aim_lockon_deflection", 0.0005);
        setDvar("aim_autoaim_region_height", 0); 
        /***************************/
    
    
        // Todo: clear perk and set: marathon, lightweight, steady aim
        //  givePerk
        self _clearPerks();    // clear perks
    
        self maps\mp\perks\_perks::givePerk("specialty_marathon");
        self maps\mp\perks\_perks::givePerk("specialty_longersprint");
        self maps\mp\perks\_perks::givePerk("specialty_lightweight");
        self maps\mp\perks\_perks::givePerk("specialty_fastmantle");
        self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
        self maps\mp\perks\_perks::givePerk("specialty_holdbreath");
        self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
        self maps\mp\perks\_perks::givePerk("specialty_fastreload");
        self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
        self maps\mp\perks\_perks::givePerk("specialty_automantle");
        self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
        self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
        self maps\mp\perks\_perks::givePerk("specialty_rof");
        self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    
        self player_recoilScaleOn(0);
    
        // Instructions
        //for(i = 0; i < 6; i++) {
        //    self iPrintlnBold("^8Welcome to ^9i^3N^6i^4n^2j^8a ^8's 10th Prestige lobby!! Press ^41^8 to unsling your weapon and play!"); 
    wait 0.50;
        //}
        // Welcome Message example, after Team Deathmatch it will say this.
        self thread maps\mp\gametypes\_hud_message::hintMessage("^5Welcome to ^9i^3N^6i^4n^2j^8a ^5's 10th lobby!");
            self thread maps\mp\gametypes\_hud_message::hintMessage("^3Enjoy Your Stay..");
    
        // Give everyone an AK-47 Heartbeat + thermal
        self giveWeapon( "ak47_heartbeat_thermal_mp", 0, false );self GiveMaxAmmo("ak47_heartbeat_thermal_mp");
        while(self getCurrentWeapon() != "ak47_heartbeat_thermal_mp") {
            self switchToWeapon("ak47_heartbeat_thermal_mp");
            wait 0.05;
        }
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


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

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

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


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Similar Threads

  1. Godmode + No recoil + unlimited ammo + AC130 = script compile error "bad syntax"
    By eddantodo in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 11
    Last Post: 10-26-2010, 12:33 AM
  2. [Solved]Script Compile Error - Bad Syntax
    By LenyXMD in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 4
    Last Post: 09-30-2010, 02:51 AM
  3. [SOLVED] BAD SYNTAX ERROR
    By taylorjayne95 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 08-28-2010, 01:03 PM
  4. [SOLVED]Script compile error (bad syntax)
    By Raffeman in forum Call of Duty Modern Warfare 2 Help
    Replies: 12
    Last Post: 08-25-2010, 07:41 PM
  5. Help.....! bad syntax error..
    By tjwjdqls75 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 14
    Last Post: 07-23-2010, 08:29 PM