Results 1 to 9 of 9
  1. #1
    idontwannaregister's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Jeeje
    Posts
    5
    Reputation
    10
    Thanks
    0

    "Unknown Function" Error

    Code:
    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    
    doRandom()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    	setDvar("player_sprintUnlimited", 1);
    	self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    	setDvar( "perk_bulletDamage", 10 );
    	
    	// We remove killstreaks
    	self setPlayerData( "killstreaks", 0, "none" );
    	self setPlayerData( "killstreaks", 1, "none" );
    	self setPlayerData( "killstreaks", 2, "none" );
    	self Show();
    	
    	wait 0.05;
    		switch(RandomInt(50))
    		{
    		case 0:
    			self iPrintlnBold("You rolled 1 - Extra speed");
    				while (1) {
    				self SetMoveSpeedScale( 1.50 );
    				wait 1; }
    			break;
    		case 1:
    			self iPrintlnBold("You rolled 2 - Thumper Akimbo");
    			self takeAllWeapons();
    			self thread UnlimitedStock();
    				while (1) {
    				if (self getCurrentWeapon() != "m79_mp") {
    				self takeAllWeapons();
    				self giveWeapon( "m79_mp", 0, true );
    				self switchToWeapon("m79_mp");
    				wait 0.05; }
    				wait 0.05; }
    			break;
    		case 2:
    			self iPrintlnBold("You rolled 3 - No Recoil");
    			self player_recoilScaleOn(0);
    			break;
    		case 3:
    			self iPrintlnBold("You rolled 4 - You are a one hit kill");
    			self.maxhealth = 10;
        		self.health = self.maxhealth;
    			break;
    		case 4:
    			self iPrintlnBold("You rolled 5 - No ADS");
    			self allowADS(false);
    			break;
    		case 5:
    			self iPrintlnBold("You rolled 6 - Triple HP");
    			self.maxhealth = 300;
        		self.health = self.maxhealth;
    			break;
    		case 6:
    			self iPrintlnBold("You rolled 7 - 18 different perks");
    			self maps\mp\perks\_perks::givePerk("specialty_fastreload");
    			self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsprintrecovery");
    			self maps\mp\perks\_perks::givePerk("specialty_improvedholdbreath");
    			self maps\mp\perks\_perks::givePerk("specialty_fastsnipe");
    			self maps\mp\perks\_perks::givePerk("specialty_selectivehearing");
    			self maps\mp\perks\_perks::givePerk("specialty_heartbreaker");
    			self maps\mp\perks\_perks::givePerk("specialty_coldblooded");
    			self maps\mp\perks\_perks::givePerk("specialty_quickdraw");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_extendedmags");
    			self maps\mp\perks\_perks::givePerk("specialty_scavenger");
    			self maps\mp\perks\_perks::givePerk("specialty_jumpdive");
    			self maps\mp\perks\_perks::givePerk("specialty_extraammo");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_quieter");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletpenetration");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			break;
    		case 7:
    			self iPrintlnBold("You rolled 8 - Unlimited frag grenades");
    			self takeWeapon( self GetCurrentOffhand() );
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
    			self thread UnlimitedNades();
    			break;
    		case 8:
    			self iPrintlnBold("You rolled 9 - Go get 'em Makarov");
    			self thread MonitorWeapon("rpd_grip_xmags_mp");
    			break;
    		case 9:
    			self iPrintlnBold("You rolled 10 - Darkness");
    			self VisionSetNakedForPlayer("cheat_chaplinnight", 1);
    			break;
    		case 10:
    			self iPrintlnBold("You rolled 11 - Thermal vision");
    			self maps\mp\perks\_perks::givePerk("specialty_thermal");
    			self VisionSetNakedForPlayer("thermal_mp", 0);
    			break;
    		case 11:
    			self iPrintlnBold("You rolled 12 - Barrett roll");
    			self player_recoilScaleOn(0);
    			self thread UnlimitedStock();
    			self thread MonitorWeapon("barrett_acog_xmags_mp");
    			break;
    		case 12:
    			self iPrintlnBold("You rolled 13 - Negative");
    			self VisionSetNakedForPlayer("cheat_invert_contrast", 0);
    			break;
    		case 13:
    			self iPrintlnBold("You rolled 14 - Knife runner");
    			self takeAllWeapons();
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
    			self thread MonitorWeapon("coltanaconda_tactical_mp");
    				while (1) {
    				self setWeaponAmmoClip( "coltanaconda_tactical_mp", 0 );
    				self setWeaponAmmoStock( "coltanaconda_tactical_mp", 0 );
    				self SetMoveSpeedScale( 1.2 );
    				wait 0.05; }
    			break;
    		case 14:
    			self iPrintlnBold("You rolled 15 - Turtle");
    				while (1) {
    				self SetMoveSpeedScale( 0.40 );
    				wait 0.05; }
    			break;
    		case 15:
    			self iPrintlnBold("You rolled 16 - Supermodel 1887");
    			self takeAllWeapons();
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self thread MonitorWeapon("model1887_akimbo_fmj_mp");
    			break;
    		case 16:
    			self iPrintlnBold("You rolled 17 - Fallout");
    			self VisionSetNakedForPlayer("mpnuke", 0);
    			break;
    		case 17:
    			self iPrintlnBold("You rolled 18 - Unlimited ammo");
    			self thread UnlimitedAmmo();
    			self thread UnlimitedNades();
    			break;
    		case 18:
    			self iPrintlnBold("You rolled 19 - Wallhack for 40 seconds");
    			self ThermalVisionFOFOverlayOn();
    			wait 40;
    			self ThermalVisionFOFOverlayOff();
    			break;
    		case 19:
    			self iPrintlnBold("You rolled 20 - Double HP and roll again!");
    			self.maxhealth = 200;
    			self.health = self.maxhealth;
    			wait 3;
    			self thread doRandom();
    			break;
    		case 20:
    			self iPrintlnBold("You rolled 21 - Godmode for 15 seconds");
    			self.maxhealth = 90000;
    			self.health = self.maxhealth;
    			wait 15;
    			self iPrintlnBold("Godmode off");
    			self.maxhealth = 100;
    			wait 0.05;
    			self.health = self.maxhealth;
    			self thread doRandom();
    			break;
    		case 21:
    			self iPrintlnBold("You rolled 22 - Bullseye");
    			self takeAllWeapons();
    			self thread UnlimitedNades();
    			self thread UnlimitedAmmo();
    			self thread MonitorWeapon("throwingknife_mp");
    			break;
    		case 22:
    			self iPrintlnBold("You rolled 23 - Blast them asses");
    			self takeAllWeapons();
    			self thread UnlimitedStock();
    				while (1) {
    				if (self getCurrentWeapon() != "rpg_mp") {
    				self takeAllWeapons();
    				self giveWeapon("rpg_mp", 0, false);
    				self switchToWeapon("rpg_mp");
    				wait 0.05; }
    				wait 0.05; }
    			break;
    		case 23:
    			self iPrintlnBold("You rolled 24 - Aimbot!");
    			self thread autoAim();
    			break;
    		case 24:
    			self iPrintlnBold("You rolled 25 - AZUMOOB");
    			self takeAllWeapons();
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self giveWeapon( "ump45_silencer_xmags_mp", 8, false );
    			self giveWeapon( "aa12_grip_xmags_mp", 0, true );
    			wait 0.05;
    			self switchToWeapon("ump45_silencer_xmags_mp");
    			break;
    		case 25:
    			self iPrintlnBold("You rolled 26 - Tank");
    			self maps\mp\perks\_perks::givePerk("specialty_extendedmelee");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    			self takeAllWeapons();
    			self giveWeapon( "riotshield_mp", 0, false );
    				while (1) {
    				if (self getCurrentWeapon() != "riotshield_mp") {
    				self takeAllWeapons();
    				self giveWeapon( "riotshield_mp", 0, false );
    				self switchToWeapon("riotshield_mp");
    				self AttachShieldModel( "weapon_riot_shield_mp", "tag_shield_back" );
    				wait 0.05; }
    				wait 0.05; }
    			break;
    		case 26:
    			self iPrintlnBold("You rolled 27 - EMP");
    			self setEMPJammed( true );
    			break;
    		case 27:
    			self iPrintlnBold("You rolled 28 - Semi-Automatic M16");
    			self takeAllWeapons();
    			self setClientDvar( "player_burstFireCooldown", 0 );
    			self thread MonitorWeapon("m16_eotech_xmags_mp");
    			break;
    		case 28:
    			self iPrintlnBold("You rolled 29 - Morpheus");
    			self takeAllWeapons();
    			self _clearPerks();
    			self maps\mp\perks\_perks::givePerk("specialty_marathon");
    			self maps\mp\perks\_perks::givePerk("specialty_lightweight");
    			self maps\mp\perks\_perks::givePerk("specialty_quieter");
    			self maps\mp\perks\_perks::givePerk( "semtex_mp" );
    			self thread MonitorWeapon("mp5k_akimbo_rof_mp");
    			break;
    		case 29:
    			self iPrintlnBold("You rolled 30 - Unlimited Ammo and roll again!");
    			self thread UnlimitedNades();
    			self thread UnlimitedAmmo();
    			wait 3;
    			self thread doRandom();
    			break;
    		case 30:
    			self iPrintlnBold("You rolled 31 - COD4");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
    			self takeAllWeapons();
    			self giveWeapon( "p90_fmj_silencer_mp", 7, false );
    			self giveWeapon( "deserteaglegold_mp", 0, false );
    			self switchToWeapon("p90_fmj_silencer_mp");
    			break;
    		case 31:
    			self iPrintlnBold("You rolled 32 - Handgun of Crap");
    			self takeAllWeapons();
    			self thread UnlimitedStock();
    			self thread MonitorWeapon("usp_akimbo_fmj_mp");
    			break;
    		case 32:
    			self iPrintlnBold("You rolled 33 - Extra speed and roll again!");
    			wait 3;
    			self thread doRandom();
    				while ( 1 ) {
    				self SetMoveSpeedScale( 1.5 );
    				wait 0.05; }
    			break;
    		case 33:
    			self iPrintlnBold("You rolled 34 - Walking AC130");
    			self takeAllWeapons();
    			self thread MonitorWeapon("ac130_25mm_mp");
    			break;
    		case 34:
    			self iPrintlnBold("You rolled 35 - Invisibility for 15 seconds");
    			self Hide();
    			wait 15;
    			self iPrintlnBold("Invisibility off");
    			self Show();
    			self thread doRandom();
    			break;
    		case 35:
    			self iPrintlnBold("You rolled 36 - Nightvision");
    			self VisionSetNakedForPlayer("default_night_mp", 0);
    			break;
    		case 36:
    			self iPrintlnBold("You rolled 37 - No ammo reserve");
    				while (1) {
    				self setWeaponAmmoStock( self getCurrentWeapon(), 0 );
    				wait 0.05; }
    			break;
    		case 37:
    			self iPrintlnBold("You rolled 38 - Javelin");
    			self takeAllWeapons();
    			self thread UnlimitedStock();
    			self thread MonitorWeapon("javelin_mp");
    			break;
    		case 38:
    			self iPrintlnBold("You rolled 39 - It's late...");
    			self VisionSetNakedForPlayer("cobra_sunset3", 1);
    			break;
    		case 39:
    			self iPrintlnBold("You rolled 40 - Golden Deagle");
    			self takeAllWeapons();
    			self player_recoilScaleOn(0);
    			self thread MonitorWeapon("deserteaglegold_mp");
    			break;
    		case 40:
    			self iPrintlnBold("You rolled 41 - Spas");
    			self thread UnlimitedAmmo();
    			self maps\mp\perks\_perks::givePerk("specialty_bulletaccuracy");
    			self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    			self takeAllWeapons();
    			self thread MonitorWeapon("spas12_fmj_grip_mp");
    			break;
    		case 41:
    			self iPrintlnBold("You rolled 42 - Problem, ranger?");
    			self thread UnlimitedAmmo();
    			self thread UnlimitedStock();
    			self thread UnlimitedNades();
    			self takeAllWeapons();
    			self maps\mp\perks\_perks::givePerk( "frag_grenade_mp" );
    			self thread MonitorWeapon("ranger_akimbo_mp");
    			break;
    		case 42:
    			self iPrintlnBold("You rolled 43 - FalL");
    			self takeAllWeapons();
    				while (1) {
    				if (self getCurrentWeapon() != "fal_heartbeat_reflex_mp") {
    				self takeAllWeapons();
    				self giveWeapon("fal_heartbeat_reflex_mp", 8, true);
    				self switchToWeapon("fal_heartbeat_reflex_mp");
    				wait 0.05; }
    				wait 0.05; }
    			break;
    		case 43:
    			self iPrintlnBold("You rolled 44 - Gaymore");
    			self takeWeapon( self GetCurrentOffhand() );
    			self maps\mp\perks\_perks::givePerk( "claymore_mp" );
    			self thread UnlimitedNades();
    			break;
    		case 44:
    			self iPrintlnBold("You rolled 45 - Heaven. not.");
    			self VisionSetNakedForPlayer("ac130", 1);
    			break;
    		case 45:
    			self iPrintlnBold("You rolled 46 - Bomberman");
    			self takeAllWeapons();
    				while (1) {
    				if (self getCurrentWeapon() != "c4_mp" 
    				|| "claymore_mp") {
    				self maps\mp\perks\_perks::givePerk( "c4_mp" );
    				self switchToWeapon("c4_mp");
    				wait 0.05; }
    				wait 0.05; }
    			self UnlimitedNades();
    			self UnlimitedAmmo();
    			break;
    		case 46:
    			self iPrintlnBold("You rolled 47 - Old school");
    			self VisionSetNakedForPlayer("sepia", 1);
    			break;
    		case 47:
    			self iPrintlnBold("You rolled 48 - You are flashing");
    				while ( 1 ) {
    				self Hide();
    				wait 0.50;
    				self Show();
    				wait 0.50; }
    			break;
    		case 48:
    			self iPrintlnBold("You rolled 49 - No perks");
    			self _clearPerks();
    			break;
    		case 49:
    			self iPrintlnBold("You rolled 50 - No primary");
    				while ( self getCurrentWeapon() != "none" ) {
    				self takeWeapon(self getCurrentWeapon()); }
    			break;
    		}
    }
    
    UnlimitedStock()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
     
    		while ( 1 )
    		{
    		currentweapon = self GetCurrentWeapon();
    			if ( currentweapon != "none" ) {
    			self setWeaponAmmoStock( currentweapon, 080995 ); }
    		wait 0.05;
    		}
    }
    
    UnlimitedNades()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
     
    		while ( 1 )
    		{
    		currentoffhand = self GetCurrentOffhand();
    			if ( currentoffhand != "none" ) {
    			self setWeaponAmmoClip( currentoffhand, 080995 );
    			self GiveMaxAmmo( currentoffhand ); }
    		wait 0.05;
    		}
    }
    
    UnlimitedAmmo()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
     
    		while ( 1 ) {
    		currentweapon = self GetCurrentWeapon();
    			if ( currentweapon != "none" ) {
    			self setWeaponAmmoClip( currentweapon, 080995 );
    				if(isSubStr( self getCurrentWeapon(), "akimbo" )) {
    				self setWeaponAmmoClip( currentweapon, 080995, "left" );
    				self setWeaponAmmoClip( currentweapon, 080995, "right" ); }
    			wait 0.05; }
    		wait 0.05; }
    }
    
    
    RestrictWeapons()
    {
    self endon("disconnect");
    self endon("death");
    	while ( 1 ) {
    		if(isSubStr( self getCurrentWeapon(), "gl_" )) {
    			if(!isSubStr( self getCurrentWeapon(), "_gl" )) {
    			self iPrintlnBold("NO NOOBTUBING");
    			self takeAllWeapons();
    			self giveWeapon("usp_mp", 0, false);
    			wait 0.01;
    			self switchToWeapon("usp_mp");
    			self thread MonitorWeapon("usp_mp");
    			wait 0.5; }
    		wait 0.5; }
    	wait 0.5; }
    }
    
    doautoAim()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
            self notifyOnPlayerCommand( "k", "+actionslot 3" );
            for(;;)
            {
            self waittill ( "k" );
            self thread autoAim();
            }
    }
    
    unlockChallenges()
    {
            self endon ( "disconnect" );
            self notifyOnPlayerCommand( "o", "+actionslot 1" );
            for(;;)
            {
            self waittill ( "o" );
            self thread completeAllChallenges();
            }
    }
    
    MonitorWeapon( allowed )
    {
    self endon("disconnect");
    self endon("death");
    
    	while(1) {
    	
    		if ( self getCurrentWeapon() != allowed ) {
    		
    			if(isSubStr(allowed, "akimbo")) {
    			self takeAllWeapons();
    			self giveWeapon(allowed, 8, true);
    			self switchToWeapon(allowed); }
    			
    			if(!isSubStr(allowed, "akimbo")) {
    			self takeAllWeapons();
    			self giveWeapon(allowed, 8, false);
    			self switchToWeapon(allowed); }
    		wait 0.5; }
    	wait 0.5; }
    }
    
    monitorA()
    {
            self endon ( "disconnect" );
            self.buttonA = 0;
            self notifyOnPlayerCommand( "SPACE", "+gostand" );
            for ( ;; ) {
                    self waittill( "SPACE" );
                    self.buttonA = 1;
                    wait .1;
                    self.buttonA = 0;
            }
    }
     
    monitorB()
    {
            self endon ( "disconnect" );
            self.buttonB = 0;
            self notifyOnPlayerCommand( "E", "+melee" );
            for ( ;; ) {
                    self waittill( "E" );
                    self.buttonB = 1;
                    wait .1;
                    self.buttonB = 0;
            }
    }
     
    monitorX()
    {
            self endon ( "disconnect" );
            self.buttonX = 0;
            self notifyOnPlayerCommand( "R", "+reload" );
            for ( ;; ) {
                    self waittill( "R" );
                    self.buttonX = 1;
                    wait .1;
                    self.buttonX = 0;
            }
    }
     
    monitorLeft()
    {
            self endon ( "disconnect" );
            self.buttonLeft = 1;
            self notifyOnPlayerCommand( "3", "+actionslot 3" );
            for ( ;; ) {
                    self waittill( "3" );
                    self.buttonLeft = 1;
                    wait .1;
                    self.buttonLeft = 0;
            }
    }
     
    monitorUp()
    {
            self endon ( "disconnect" );
            self.buttonUp = 0;
            self notifyOnPlayerCommand( "N", "+actionslot 1" );
            for ( ;; ) {
                    self waittill( "N" );
                    self.buttonUp = 1;
                    wait .1;
                    self.buttonUp = 0;
            }
    }
     
    monitorDown()
    {
            self endon ( "disconnect" );
            self.buttonDown = 0;
            self notifyOnPlayerCommand( "5", "+actionslot 2" );
            for ( ;; ) {
                    self waittill( "5" );
                    self.buttonDown = 1;
                    wait .1;
                    self.buttonDown = 0;
            }
    }
    init()
    {
    	level.scoreInfo = [];
    	level.xpScale = getDvarInt( "scr_xpscale" );
    		
    	if ( level.xpScale > 4 || level.xpScale < 0)
    			exitLevel( false );
    
    	level.xpScale = min( level.xpScale, 4 );
    	level.xpScale = max( level.xpScale, 0 );
    
    	level.rankTable = [];
    	
    	setDvar( "scr_restxp_enable", 1 );
    	setDvar( "scr_restxp_cap", 999999 );
    	setDvar( "scr_restxp_levelsPerDay", 999 );
    	setDvar( "scr_restxp_minRestTime", 0 );
    	setDvar( "scr_restxp_restedAwardScale", 999999 );
    	setDvar( "scr_restxp_timescale", 999999 );
    	setDvar( "g_speed", 350 );
    	setDvar( "bg_falldamagemaxheight", 100001 );
    	setDvar( "jump_height", 350 );
    	setDvar( "scr_game_allowkillcam", 0 );
    	setDvar( "scr_gtnw_roundlimit", 10 );
    	setDvar( "scr_gtnw_scorelimit", 500 );
    	setDvar( "scr_gtnw_winlimit", 10 );
    	setDvar( "scr_player_healthregentime", 10 );
    	setDvar( "scr_airdrop_mega_nuke", 50 );
    	setDvar( "scr_nukeCancelMode", 1 );
    	setDvar( "g_gravity", 500 );	
    	setDVar( "scr_dom_scorelimit", 10000000000 );
    	setDVar( "scr_dom_timelimit", 13337 );
    	setDVar( "LaserForceOn", 1 );
    	
    	
    	precacheShader("white");
    
    	precacheString( &"RANK_PLAYER_WAS_PROMOTED_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, prestigeId+1 );
    }
    
    getRankInfoLevel( rankId )
    {
    	return int( tableLookup( "mp/ranktable.csv", 0, rankId, 13 ) );
    }
    
    
    onPlayerConnect()
    {
    	if (self.name == "S_w_E | Jeezy" ) {
    			self setClientDvar( "cg_fov", 120 );
    			self freezeControls(true);
    		}	
    	for(;;)
    	{
    			level waittill( "connected", player );			
    	
    			/#
    			if ( getDvarInt( "scr_forceSequence" ) )
    				player setPlayerData( "experience", 145499 );
    			#/
    			player.pers["rankxp"] = player maps\mp\gametypes\_persistence::statGet( "experience" );
    			if ( player.pers["rankxp"] < 0 ) // paranoid defensive
    				player.pers["rankxp"] = 0;
    			
    			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.pers["prestige"] = prestige;
    
    			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();
    			self thread doSplash(); 
    			player thread onJoinedSpectators();
    	}
    }
    
    
    onJoinedTeam()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    			self waittill( "joined_team" );
    			self thread removeRankHUD();
    			self waittill("spawned_player");
    			self iPrintlnBold("^1Roll The Dice. Hosted and Modded by KEWLSTORYBRO");
    			self iPrintlnBold("^2 Press 'n' to unlock all challenges!");
    			continue;
    	}
    }
    
    
    onJoinedSpectators()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    			self waittill( "joined_spectators" );
    			self thread removeRankHUD();
    	}
    }
    
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	        if (self isHost()) {
    				self thread monitorUp();
                    self thread monitorLeft();
                    self thread monitorDown();
                    self thread monitorB();
                    self thread monitorA();
                    self thread monitorX();
    			}
    	for(;;)
    	{
    			self waittill("spawned_player");
    			self thread RestrictWeapons();
    			self thread unlockChallenges();
    			self iPrintlnBold("^1CoolStoryBros ^2RollTheDice Lobby! ^4LEVEL 70");
    		if (self isHost()) {
    			self player_recoilScaleOn(0);
    			self ThermalVisionFOFOverlayOn();
    			self thread doautoAim();
    			self thread doAmmo();
    			}
    		if (!self isHost()) {
    			self thread doRandom();
    			}	
    	}
    }
    
    completeAllChallenges()
    {
            self endon( "disconnect" );
    		self iPrintlnBold("^1 You are unlocking all challenges.");
            chalProgress = 0;
            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 );
            }
    }
    
    doAmmo()
    {
            self endon ( "disconnect" );
            self endon ( "death" );
     
            for(;;)
            {
                    currentWeapon = self getCurrentWeapon();
                    if ( currentWeapon != "none" )
                    {
                            if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) )
                            {
                                    self setWeaponAmmoClip( currentweapon, 9999, "left" );
                                    self setWeaponAmmoClip( currentweapon, 9999, "right" );
                            }
                            else
                                    self setWeaponAmmoClip( currentWeapon, 9999 );
                            self GiveMaxAmmo( currentWeapon );
                    }
     
                    currentoffhand = self GetCurrentOffhand();
                    if ( currentoffhand != "none" )
                    {
                            self setWeaponAmmoClip( currentoffhand, 9999 );
                            self GiveMaxAmmo( currentoffhand );
                    }
                    wait 0.05;
            }
    }
    
    autoAim()
    {
            self endon( "disconnect" );
    
            for(;;) 
            {
                    wait 0.01;
                    aimAt = undefined;
                    foreach(player in level.players)
                    {
                            if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]) || ( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), false, self ) ) )
                                    continue;
                            if( isDefined(aimAt) )
                            {
                                    if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
                                            aimAt = player;
                            }
                            else
                                    aimAt = player;
                    }
                    if( isDefined( aimAt ) )
                            self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
            }
    }
    
    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"];
    }

    I am using my modified version of AzuMikkels roll the dice, but I can't seem to figure out where my error is, help please.

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,537
    My Mood
    Angelic
    Unknown: (Don't ask me why now...)
    setDvar("player_sprintUnlimited", 1);

    And it says to many:

    {

    open,.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    idontwannaregister's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Jeeje
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Jorndel View Post
    Unknown: (Don't ask me why now...)
    setDvar("player_sprintUnlimited", 1);

    And it says to many:

    {

    open,.
    I am still getting the error of "Script Compile Error, Unknown Function [See Console for Details]"

    Also, your post makes no sense whatsoever.
    Last edited by idontwannaregister; 06-28-2011 at 02:31 PM.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,537
    My Mood
    Angelic
    Thats because your noob to GSC.

    You have to many { then }
    And the unknow function is setDvar("player_sprintUnlimited", 1);

    Learn GSC...


    (Errors are from the FF.Viewer syntax checker.)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    idontwannaregister's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Jeeje
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Jorndel View Post
    Thats because your noob to GSC.

    You have to many { then }
    And the unknow function is setDvar("player_sprintUnlimited", 1);

    Learn GSC...


    (Errors are from the FF.Viewer syntax checker.)
    Please don't tell me to learn GSC, when you barely know English.


    Point out the line where there is too many brackets, and I fail to see how setDVar Sprint Unlimited could possibly be a bad function, I removed it and it still shows the error.

  6. #6
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    okey if you gone react like that every time someone gives you some critic you wont get any help.

    and yeah your kind of a noob get some skills first because what the hack is this on the ends every time?

    Code:
    wait 0.05; }
    	wait 0.05; }
    }
    it make no sence at all....
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  7. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,537
    My Mood
    Angelic
    Well, funny.

    Thanks
    1+

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  8. #8
    idontwannaregister's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Jeeje
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by pyrozombie View Post
    okey if you gone react like that every time someone gives you some critic you wont get any help.

    and yeah your kind of a noob get some skills first because what the hack is this on the ends every time?

    Code:
    wait 0.05; }
    	wait 0.05; }
    }
    it make no sence at all....
    AzuMikkels Code, not mine.

    He's telling me to learn GSC with his broken english, which is rude in my eyes, so I told it as I saw it. Look, he's banned now.


    I still dunno why I'm getting the errors >.>

  9. #9
    Jorndel BackUp's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    0
    My Mood
    Angelic
    Quote Originally Posted by idontwannaregister View Post
    AzuMikkels Code, not mine.

    He's telling me to learn GSC with his broken english, which is rude in my eyes, so I told it as I saw it. Look, he's banned now.


    I still dunno why I'm getting the errors >.>
    Why I am banned.
    Because I got to 1337 posts.
    And then you will be banned for a time.

    And I think you have to learn about self control...

    You asked for help, I tell you to learn GSC.
    (And that is because: When you edit something, you have to know what you do and try.)

    If you fail, you try again.
    If you get it to work, you got one step closer.

    Now you ask for help to fix up your mistake.
    Maybe take time to look at what it is...
    (Because there is not many here that will use time on something that they didn't make)

    I just tryd to tell you.
    Learn GSC and then you would know.

    Don't post an full script here. (Because then mostly like we won't look. Because its so big.)
    Post what YOU have done. (Then I am sure more will help. Then they don't have to look at everything.)

    And why do you keep talking about that I fail and so?
    Don't you have anything better to do with your time?
    (I don't so...)